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

Add debugging flag to assert state of incremental cache #85864

Closed
Aaron1011 opened this issue May 31, 2021 · 2 comments · Fixed by #90386
Closed

Add debugging flag to assert state of incremental cache #85864

Aaron1011 opened this issue May 31, 2021 · 2 comments · Fixed by #90386
Assignees
Labels
A-incr-comp Area: Incremental compilation A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@Aaron1011
Copy link
Member

Aaron1011 commented May 31, 2021

In PR #85702, I added a test that relies on the incremental cache still being saved if a linker error occurs. It would be good for the test to assert that this assumption is actually true. We could add a new flag -Z assert-incr-state=<state>, where <state> can be:

  • none - we didn't find any previous session dirs whatsoever
  • mismatch - we found an existing session dir, but did not load it to do a command-line arg hash mismatch.
  • loaded - we found and loaded an existing session dir. Note that this says nothing about whether any particular query will be found to be red or green.
@Aaron1011 Aaron1011 added A-incr-comp Area: Incremental compilation C-enhancement Category: An issue proposing an enhancement or a PR with one. labels May 31, 2021
@jonas-schievink jonas-schievink added the A-testsuite Area: The testsuite used to check the correctness of rustc label May 31, 2021
@Mark-Simulacrum
Copy link
Member

It'd be good to add these flags to rustc-perf's incr tests once this flag is implemented, I think, FWIW.

@pierwill
Copy link
Member

@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 18, 2021
…=Aaron1011

Add `-Zassert-incr-state` to assert state of incremental cache

Closes rust-lang#85864.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Nov 18, 2021
…=Aaron1011

Add `-Zassert-incr-state` to assert state of incremental cache

Closes rust-lang#85864.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Nov 18, 2021
…=Aaron1011

Add `-Zassert-incr-state` to assert state of incremental cache

Closes rust-lang#85864.
@bors bors closed this as completed in 728b3f2 Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants