dotnet / dotnet/project-system
Re-enabling the fast up-to-date check doesn't populate correct state until project reload
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
## Steps to Reproduce
1. Enable verbose fast up-to-date logging
2. Create a console app
3. Build twice and notice the (second) log output
4. Add `true` to the project file
5. Build twice and notice it is disabled
6. Remove `DisableFastUpToDateCheck` from the project
7. Build twice and notice the second log output is shorter than in step 3
When the fast up-to-date check is disabled, we clear out our snapshot and stop processing deltas.
If, during a project's lifetime, the fast up-to-date check transitions from being disabled to being enabled, then deltas observed from that point forward will be applied upon that empty snapshot, which explains the shorter output we saw in step 7 above.
We need to ensure that the first update following the transition from disabled to enabled applies the full project state, not just the delta. That will get us back into the correct state.
The current workaround is to reload the project.
If a customer is re-enables the fast up-to-date check then discovers it is not working correctly, they may disable it again.
Contributor guide
Assessment
This issue has not been assessed yet.