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

Fix build-plan causes everything to need recompiling #7604

Closed

Conversation

edwin0cheng
Copy link
Member

@edwin0cheng edwin0cheng commented Nov 18, 2019

This PR fix a bug which cause everything to recompiling after cargo build --build-plan.

Note: This is my first PR in cargo repo, so I please tell me if I missed anything.

CC: @CAD97

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2019
@CAD97
Copy link
Contributor

CAD97 commented Nov 18, 2019

cc @vlad20012

@CAD97
Copy link
Contributor

CAD97 commented Nov 18, 2019

The potential issue I see right off the bat is whether this breaks "run build plan" as a way of building. Specifically, if the cache busting behavior is required to make sure an external build system running these steps gets the correct output.

Maybe the solution is to insert the cache busting into the build plan?

@vlad20012
Copy link
Member

Great! I just thought about how we can workaround this bug in IntelliJ Rust...

@edwin0cheng
Copy link
Member Author

edwin0cheng commented Nov 18, 2019

@CAD97 If I understand correctly :

  1. The build-plan should not be executing anything and touch any cache.
  2. And I basically touched three parts of code: Two parts are updating for timestamps of files which seem to be harmless. One is preventing to remove a file which is not important in build-plan. (If I understand the comment correctly)

But of course I didn't dig too deep about the whole build-plan flow...

@edwin0cheng
Copy link
Member Author

edwin0cheng commented Nov 18, 2019

@vlad20012 This bug is blocking us to implement env! macro in rust-analyzer too :)

@edwin0cheng
Copy link
Member Author

edwin0cheng commented Nov 18, 2019

Same as this comment, it looks to be unrelated to my change too. And I tried it for master in my Windows machine, it failed too.

@alexcrichton
Copy link
Member

The Cargo team discussed this PR yesterday and we're somewhat hesitant to merge this due to the state of build plans. I've opened #7614 to continue the discussion about that.

@edwin0cheng
Copy link
Member Author

Okay, let this PR closed first and continue the discussion in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants