Skip to content

Add missing node state transition#61308

Merged
JoeRobich merged 3 commits intomainfrom
update-runstep-table
May 24, 2022
Merged

Add missing node state transition#61308
JoeRobich merged 3 commits intomainfrom
update-runstep-table

Conversation

@chsienki
Copy link
Copy Markdown
Member

It's valid for an input to be modified causing a downstream input to be removed (for example a syntax tree can change what is in it, leading to the downstream node not generating something).

//cc @jkoritzinsky in case I'm missing something obvious.

It's valid for an input to be modified causing a downstream input to be removed (for example a syntax tree can change what is in it, leading to the downstream node not generating something). 

//cc @jkoritzinsky in case I'm missing something obvious.
@jkoritzinsky
Copy link
Copy Markdown
Member

I've had a PR open to fix this exact issue for a while (including a test): #60759

If we merge this PR, can we add the test from my PR?

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Crashes for (modified, added) as well. See TestSourceFileChanged_AttributeAdded1 in my recent PR.

@jaredpar
Copy link
Copy Markdown
Member

@RikkiGibson, @cston PTAL

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Note: still needs the line added for (EntryState.Modified, EntryState.Added). I mapped that to IncrementalStepRunReason.New, but i'm not sure if those are the semantics needed.

@RikkiGibson
Copy link
Copy Markdown
Member

Seems like we should also follow the suggestion in #61308 (comment) here.

@jcouv
Copy link
Copy Markdown
Member

jcouv commented May 16, 2022

Let's add a test (seems there's one in PR https://github.com/dotnet/roslyn/pull/60759/files)


values = ImmutableArray.Create(1, 2, 3);

// second time we'll see that the "Input" step is modified, but the outputs of the "SelectMany" step are removed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

"modified"?

@JoeRobich
Copy link
Copy Markdown
Member

CI weirdness caused one Job to run twice. One passing and one failing. Once artifacts are published for a passing job it cannot be run again, meaning we can't get both jobs passing. Force merging.

@JoeRobich JoeRobich merged commit 4e0e256 into main May 24, 2022
@ghost ghost added this to the Next milestone May 24, 2022
sbergen added a commit to sbergen/roslyn that referenced this pull request May 28, 2022
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.
@Cosifne Cosifne modified the milestones: Next, 17.3 P2 May 31, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the update-runstep-table branch June 1, 2022 14:52
jjonescz added a commit that referenced this pull request May 12, 2023
* Record added node output states as new

The `(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.Modified` state mapping was recently added in #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.

* Update tests that were added since I originally implemented the change

* Update documentation for IncrementalStepRunReason

* Update VB tests also

* Add note about breaking changes with IncrementalStepRunReason

---------

Co-authored-by: Jan Jones <janjones@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants