You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[package.metadata.lambda.deploy] isn't respected if binary-name is used #866
I’ve been trying to look into it - main hurdle is just trying to understand the code architecture. If you can point me to where the cargo metadata should be loaded I can take a stab at it
I see now that the cargo-lambda-metadata assumes that the function name is also the package name; so name is kind of overloaded here.
Thoughts
Override ConfigOptions.name to --binary-name
Add a --package-name (or assume --binary-name is a package name), and add that to ConfigOptions. (e.g. name would be options.package_name.as_deref().or(options.name.as_deref()))
Add a --function-name parameter (potentially more confusing)
(1) would probably be the easiest, but I can only assume that will break things. (2) probably makes the most sense.
Activity
calavera commentedon Jul 10, 2025
This might be related to #864 . If you want to try to fix it, I really appreciate the contributions.
nemosupremo commentedon Jul 10, 2025
I’ve been trying to look into it - main hurdle is just trying to understand the code architecture. If you can point me to where the cargo metadata should be loaded I can take a stab at it
calavera commentedon Jul 10, 2025
Of course. Everything related to Cargo’s metadata should be in the
cargo-lambda-metadatacrate. You can probably start here:cargo-lambda/crates/cargo-lambda-metadata/src/config.rs
Line 177 in 1ac4297
Thanks a lot for your help!
nemosupremo commentedon Jul 10, 2025
I see now that the
cargo-lambda-metadataassumes that the function name is also the package name; sonameis kind of overloaded here.Thoughts
ConfigOptions.nameto--binary-name--package-name(or assume--binary-nameis a package name), and add that to ConfigOptions. (e.g.namewould beoptions.package_name.as_deref().or(options.name.as_deref()))--function-nameparameter (potentially more confusing)(1) would probably be the easiest, but I can only assume that will break things. (2) probably makes the most sense.
github-actions commentedon Jul 15, 2025
This issue has been automatically locked. Create a new discussion if you'd like to continue the conversation. https://github.com/cargo-lambda/cargo-lambda/discussions/new?category=general
calavera commentedon Jul 18, 2025
Version 1.8.6 released with a fix for this issue: https://github.com/cargo-lambda/cargo-lambda/releases/tag/v1.8.6