Skip to content

Conversation

@messense
Copy link
Member

I wonder if a separate --profile make sense vs. just using --cargo-extra-args

This is a fair point. Note that because maturin passes --release automatically in some contexts, the user cannot override the --profile without also figuring out how to invoke maturin to not pass the flag:

$ cargo build --release --profile dev
error: conflicting usage of --profile=dev and --release
The `--release` flag is the same as `--profile=release`.
Remove one flag or the other to continue.

Originally posted by @davidhewitt in #774 (comment)

@netlify
Copy link

netlify bot commented Jan 23, 2022

✔️ Deploy Preview for maturin-guide canceled.

🔨 Explore the source changes: 30100e0

🔍 Inspect the deploy log: https://app.netlify.com/sites/maturin-guide/deploys/61eccf183a06040008874b66

.iter()
.any(|arg| *arg == "--profile" || arg.starts_with("--profile="));
// --release and --profile are conflicting options
if !has_cargo_profile {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a warning/error here, but we can't differentiate --release from user input and default value of some commands here.

@messense messense marked this pull request as ready for review January 23, 2022 04:50
@messense messense merged commit 3464683 into PyO3:main Jan 24, 2022
@messense messense deleted the cargo-profile branch January 24, 2022 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant