Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding workspace profiles to the member's manifest at cargo package #14470

Closed
dalance opened this issue Aug 30, 2024 · 1 comment
Closed

Adding workspace profiles to the member's manifest at cargo package #14470

dalance opened this issue Aug 30, 2024 · 1 comment
Labels
A-profiles Area: profiles C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-package Command-publish S-needs-team-input Status: Needs input from team on whether/how to proceed.

Comments

@dalance
Copy link

dalance commented Aug 30, 2024

Problem

[profile.*] can be added only to the root Cargo.toml in workspace.
But cargo package at the each member doesn't add the profiles into the Cargo.toml in crate package.
As a result,

  • cargo build --release or cargo install --path .. at the local environment uses the profiles
  • cargo install .. through crates.io doesn't use the profiles

For example, https://crates.io/crates/veryl requires the following profile to avoid rust-lang/rust#129776.
In this case, cargo install .. through crates.io will take too long time because the profile is not affected.

[profile.release]
codegen-units = 1

Proposed Solution

I think adding workspace profiles to the member's manifest at cargo package is reasonable.
This change will reduce the behaviour difference between cargo build --release and cargo install.

Notes

No response

@dalance dalance added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Aug 30, 2024
@epage epage added Command-publish Command-package A-profiles Area: profiles S-needs-team-input Status: Needs input from team on whether/how to proceed. and removed S-triage Status: This issue is waiting on initial triage. labels Aug 30, 2024
@epage
Copy link
Contributor

epage commented Aug 30, 2024

The underlying need seems to be the same as #8264 and one of the proposed solutions is copying the profiles. I'm going to close in favor of that. If there is a reason for us to re-open this, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-profiles Area: profiles C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-package Command-publish S-needs-team-input Status: Needs input from team on whether/how to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants