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

Repeated "warning: profiles for the non root package will be ignored" when building Rust #46951

Closed
SimonSapin opened this issue Dec 22, 2017 · 1 comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@SimonSapin
Copy link
Contributor

Sample output while in the middle of working on something:

% ./x.py build
Updating submodules
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/simon/rust3/src/tools/cargo/Cargo.toml
workspace: /home/simon/rust3/src/Cargo.toml
    Finished dev [unoptimized] target(s) in 0.0 secs
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/simon/rust3/src/tools/cargo/Cargo.toml
workspace: /home/simon/rust3/src/Cargo.toml
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/simon/rust3/src/tools/cargo/Cargo.toml
workspace: /home/simon/rust3/src/Cargo.toml
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/simon/rust3/src/tools/cargo/Cargo.toml
workspace: /home/simon/rust3/src/Cargo.toml
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/simon/rust3/src/tools/cargo/Cargo.toml
workspace: /home/simon/rust3/src/Cargo.toml
   Compiling alloc v0.0.0 (file:///home/simon/rust3/src/liballoc)
   Compiling alloc_system v0.0.0 (file:///home/simon/rust3/src/liballoc_system)
[]

15 of the 18 first lines of output are effectively noise due to this warning.

Indeed, src/tools/cargo/Cargo.toml contains:

[profile.release]
overflow-checks = true

But this same Cargo.toml file is both the root of a workspace when the cargo repository is used on its own, and a member of a larger workspace when use like here as a submodule of the rust repository. So this [profile] section is both sometimes significant (and perhaps should not be remove) and sometimes not (so the warning is not a false-positive).

Should there be an exception list to silence this somewhat verbose warning? Or is this not worth doing without fixing the underlying issue: adding a mechanism for enabling overflow checking per-crate rather than per-workspace? (Is there a tracking issue for that? It is close to but not quite rust-lang/cargo#1359.)

@pietroalbini pietroalbini added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 30, 2018
@SimonSapin
Copy link
Contributor Author

src/tools/cargo/Cargo.toml no longer contains a profile section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants