-
-
Notifications
You must be signed in to change notification settings - Fork 107
Description
When building with cargo lambda build --release from a subdirectory in a workspace, the overrides for the release profile in the root Cargo.toml are not respected.
I.e. adding
[profile.release]
debug = true
to the root Cargo.toml has no effect.
The behavior only appears when building in a workspace subdirectory and only when using the --release flag (not --profile release)
cargo lambda build --quiet --profile release # Profile override read correctly
cargo lambda build --quiet --release # Profile override read correctly
cd subdirectory
cargo lambda build --quiet --profile release # Profile override read correctly
cargo lambda build --quiet --release # Profile override not read
My expectation would be that cargo lambda build would behave similarly to cargo build, as described in the docs:
The --release flag is equivalent to --profile=release.
Here's a repo that reproduces the issue by running ./reproduce.sh, comparing multiple different ways of building with different results.
Tested with:
$ cargo --version
cargo 1.84.1 (66221abde 2024-11-19)
$ rustc --version
rustc 1.84.1 (e71f9a9a9 2025-01-27)
$ cargo lambda --version
cargo-lambda 1.6.3 (7b294c9 2025-01-27Z)
Reactions are currently unavailable