Skip to content

Conversation

@AndyGerlicher
Copy link
Contributor

First attempt, looking for feedback. It works and fixes the error, but it scares me a bit!

This issue occurs when two targets are scheduled to be built (e.g.
ProduceError1 and ProduceError2) and the condition of the first target
causes it to not execute and a dependent target
(BeforeTargets='ProduceError1') fails. In this example, ProduceError2
still executes.

Fixes #2116

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

I'm not saying this is wrong, but I'm not sure it's right yet.

What's the timeline of events in the problem case? Specifically, when is the ActionCode of the skipped-by-condition target considered? (I'm a bit concerned that this doesn't update it in time in all cases.)

Copy link
Member

Choose a reason for hiding this comment

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

Do you need to explicitly request all three?

Copy link
Member

Choose a reason for hiding this comment

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

So:

  • We're in this method because a dependent target failed
  • But this target is already marked completed/skipped/continue

And therefore we want to update the current status to completed/skipped/stop?

Copy link
Member

Choose a reason for hiding this comment

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

topEntry.ParentEntry?.Result?.ResultCode == TargetResultCode.Skipped

Copy link
Member

Choose a reason for hiding this comment

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

copypasta: state/resultcode

This issue occurs when two targets are scheduled to be built (e.g.
ProduceError1 and ProduceError2) and the condition of the first target
prevents it from executing and a dependent target
(BeforeTargets='ProduceError1') fails. This change prevents
ProduceError2 from executing by marking the parent of the failure
(ProduceError1) with the Stop WorkUnitActionCode.

Fixes dotnet#2116

Update
@AndyGerlicher
Copy link
Contributor Author

@dotnet-bot test OSX Build for CoreCLR please

@AndyGerlicher AndyGerlicher merged commit 6f37ab9 into dotnet:master May 25, 2017
@dsplaisted
Copy link
Member

@AndyGerlicher Thanks a bunch for fixing this! I've verified that it fixes a lot of the issues with extra errors in the .NET SDK.

How will this flow into a release? Does it need to go into a 15.3 branch in order to insert it into the CLI and VS?

@rainersigwald
Copy link
Member

@dsplaisted This went to master which is currently our branch for 15.3 preview 3 and should follow the normal code flows. @AndyGerlicher is working on getting it pulled into VS now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In certain cases, errors in one target don't stop a subsequent target from running and generating errors

4 participants