-
Notifications
You must be signed in to change notification settings - Fork 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
Record added node output states as new #61575
Conversation
The `(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.Modified` state mapping was recently added in dotnet#61308, but doesn't look correct to me. Since this value is used as the output status, and the outputs are new, I believe the correct state should be `IncrementalStepRunReason.New` instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 1)
@sbergen We've had some CI issues. Could you merge latest bits from the |
Thanks for the contribution @sbergen! |
I don't know how, but it seems that after this PR some tests in |
Hey, I haven't been able to get back to this recently, but will try to take a look during this week. I originally made the changes a long time ago, so I'm not too surprised if merging them now is causing some issues :) |
* upstream/main: (547 commits) Add VerifyMethodBody helper as a replacement of VerifyIL (dotnet#66536) don't offer rename for ctor snippet (dotnet#66704) Get `ConditionalAttribute` type only once per compilation Convert language-specific option types to records (dotnet#66633) Enable MSBuild COMM log (dotnet#66708) ⚡️Share AssemblyloadTestFixture on Framework (dotnet#66684) NRT Don't overwrite binary logs in CI (dotnet#66683) Fix 'Generate Enum Member' to work in a 'Color Color' case. Find bitwise operators accessed through logical operators in FAR Semantic snippets - `propg` and `propi` snippets (dotnet#65979) NRT Properly classify aliases in quick info Fix Add tests Add support for finding collection initialiers with FAR Do not suggest replacing lambda with method group if the invoked mehod has `Conditional` attribute Revert "Record added node output states as new (dotnet#61575)" (dotnet#66696) Record added node output states as new (dotnet#61575) Fix formatting issue with convert-to-full-prop ...
The
(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.Modified
state mapping was recently added in #61308, but it doesn't look correct to me. Since this value is used as the output status, and the outputs are new, I believe the correct state should beIncrementalStepRunReason.New
instead.Here's an example test where I tried to use the node states, but ran into the missing switch cases (and found the PR adding them): https://github.com/sbergen/GenSubstitute/blob/TestImprovements/src/Tests/IncrementalGenerationTests.cs#L22-L33
Since there's a new source file being generated with the modified input, I would expect to see the status for that output as
New
.