-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
profile.dev/profile.test confusion #4438
Comments
cc @matklad Yeah this is unfortunately working as intended today, it's just not working great to begin with :(. Definitely confusing! |
I feel like this topic is brought up often. Doesn't this duplicate existing tickets? cc @ehuss |
I don't think there are any other tickets that capture exactly what this is conveying. In the new documentation, I attempted to explain profile selection a little more, such as here, but it's still not terribly clear. And the "profiles" section in manifest.md should be expanded with a clarification on how it works. I'm often a little wary of making manifest.md even longer, since it's already quite long. What do you think about breaking it up a little? Maybe add dedicated pages for "profiles", "features", and "workspaces"? Maybe even a dedicated page describing targets (lib/bins/examples/tests/benches) and their configuration? It's tricky with documentation to hit a good balance between concise and complete. I like the brevity of the current way the profiles are shown as a toml document. But some of the options definitely need expanding. And when profile overrides lands, it will only get longer. |
Various doc updates This is a collection of documentation updates that have been in my todo list for a while. Each change is in a separate commit. The "features" chapter will probably get significant changes in the future, as it is pretty bare right now. Similarly the "workspace" chapter could probably use more examples. Closes #3062 Closes #3817 Closes #3971 Closes #4212 Closes #4438 Closes #4756 Closes #5822 Closes #6913 Closes #7055
This issue applies to #[test] in libraries but not #[test] in binaries.
It also applies to tests in tests/ directory for both libraries and binaries.
When I run
cargo test
in one of the above cases the tests are compiled seperately to the main project.The project uses profile.dev and the tests use profile.test
With the following cargo.toml:
cargo test -v
outputs the followingMy reading of http://doc.crates.io/manifest.html had led me to assume that ALL compilation that occurs with
cargo test
would use profile.testThe current functionality seems to be intended. So maybe just a change to the documentation to make that more obvious would be useful.
The reason this was an issue for me was because I set [profile.dev] opt-level=2 without realizing it would cause my unittests to time out on travis. (Followed by hours of fiddling and research)
The text was updated successfully, but these errors were encountered: