-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Distinguish between compiling the build script and the rest #8025
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I think the confusion lies with how it is choosing to display the "Compiling build script" message. The dependency graph for a package with a build script looks something like this:
Since building starts at the leaves, Cargo starts with "Compiling" the build script. The From a high level, I'm not sure how this should behave. I'd be reluctant to report every time a build script is built or run. And in a sense, for
It would probably be good, if we change this, to do similar treatment for |
Hey Eric. Thanks for the explanation. Just want to make sure I understand, in the example of
For the second
Is that the correct understanding? As for the 3 options you laid out, I think 2 makes the most sense. Could you elaborate on the last point regarding |
Correct!
Yes. It isn't necessarily a separate issue, because Cargo does the equivalent of Another thing to keep in mind is that proc-macros are also "compiled" (both for |
The options are laid out in #8025.
@ehuss Does the latest commit look ok? |
FWIW this UI has been an issue for quite a long time with issues like #833. I'm not really sure if this will improve things though since it only prints out that build scrips are being compiled, and then this doesn't actually print anything else for the main build. Users might, for example, get confused when there's not another annotation saying that something other than the build script is being built. Overall I feel like this is maybe something we don't necessarily need to fix. Astute users can find that Cargo isn't printing everything that's happening, but I'm wary to add more output since it runs the risk of unnecessarily drowning out what's actually happening. (already I feel Cargo is a bit too verbose nowadays). |
Agree. I took this issue assuming it's a minor problem we want to address. But I'm totally ok with dropping it. I'm gonna close it for now. Feel free to reopen and let me know :) |
Fixes #7921.
Even though unit tests passed. I would like some guidance on why for the same project, some times the build script is compiled but not in others.
One example:
In the
rebuild_preserves_out_dir
test, ln 2178 does not compile the build script but line 2188 does.Another example:
In the
path_dep_build_cmd
test, ln 716 does not compile the build script but ln 737 does.