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

Deprecate the "bench" and "test" profiles #2085

Closed
briansmith opened this issue Oct 27, 2015 · 4 comments
Closed

Deprecate the "bench" and "test" profiles #2085

briansmith opened this issue Oct 27, 2015 · 4 comments
Labels
A-profiles Area: profiles

Comments

@briansmith
Copy link

AFAICT, any time the "bench" or "test" profile is different from "release", it is a misconfiguration. Cargo should warn whenever a "bench" or "test" profile is defined, and it should always use the "dev" or "release" profile, based on whether or not "--release" was passed.

From #cargo IRC chat today:

I also noticed something strange about profiles: why would one want the "test" profile or "bench" profile to ever be different from "release"?
If they were different, then you wouldn't be testing or measuring what you release.
that's a good point, I've never seen a difference in practice at least
I had mine different for a while because I hadn't thought about it. I'd only changed "release"

@jonas-schievink
Copy link
Contributor

Test should be different from release because I don't want to spend ten minutes waiting for optimizations every time I run tests.

@briansmith
Copy link
Author

Test should be different from release because I don't want to spend ten minutes waiting for optimizations every time I run tests.

cargo test should use the dev profile and cargo test --release should use the release profile. cargo bench should always build a release build.

@jonas-schievink
Copy link
Contributor

Ah, yes. That makes sense.

@carols10cents carols10cents added the A-configuration Area: cargo config files and env vars label May 11, 2017
@ehuss ehuss added the A-profiles Area: profiles label Feb 15, 2019
@ehuss ehuss removed the A-configuration Area: cargo config files and env vars label Sep 1, 2020
@weihanglo
Copy link
Member

Cargo named profile (RFC 2678) has been landed since 1.57 (2021-12-02). That should (hopefully) make everyone happy as test/bench profiles now inherits settings from dev/release, but still open to customizations.

Going to close this now. If you found this is a fault, please comment, and we'll consider re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-profiles Area: profiles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants