Skip to content

Conversation

@sfoslund
Copy link
Member

No description provided.

@sfoslund
Copy link
Member Author

@dsplaisted I've identified and added fixes for the cases I've found where we're seeing double writes to publish output. Do you have any feedback or know of a better approach?

@dsplaisted
Copy link
Member

@sfoslund Can you link this with the other related PRs / issues?

@sfoslund
Copy link
Member Author

@dsplaisted sure, the main one is #10850 and one of the test cases comes from #3904

@sfoslund
Copy link
Member Author

sfoslund commented Jul 1, 2020

@dsplaisted do you mind taking a look at this when you have a chance?

@dsplaisted
Copy link
Member

@sfoslund So this is a continuation of #11875, with fixes to prevent the error from happening in common cases?


<!--
_FilterDuplicateCopyLocalPublishAssets
Remove CopyLocalPublishAssets items that could overwrite resolved files to publish.
Copy link
Member

Choose a reason for hiding this comment

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

So ResolvedFileToPublish has precedence over _ResolvedCopyLocalPublishAssets? Why is that? What do each of these items mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's the main reason this PR is a draft, I wanted to check with you which should have precedence. _ResolvedCopyLocalPublishAssets consists of assets from packages that need to be copied for publishing and ResolvedFileToPublish is eventually everything else, so at this point in execution it contains everything calculated here which includes child project items, content, resources, compile items, etc.

For example, in the second test System.Runtime.CompilerServices.Unsafe.dll is coming from both the microsoft.netcore.app.runtime.win-x64 package (which is in the _ResolvedCopyLocalPublishAssets itemgroup) and it is copied as content in the microsoft.testplatform.cli package (which is originally in the None itemgroup and added to the ResolvedFileToPublish itemgroup in GetCopyToPublishDirectoryItems).

Here I'm choosing ResolvedFileToPublish to have precedence but I'm not confident that this is the right choice.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dsplaisted circling back around to this, do you have any thoughts as to the right behavior here?

As it's getting late in the release cycle and it's possible that there are other cases in which we have duplicte writes that would now produce an error with this change, I'm wondering if it makes more sense to hold off on this and include it in an early preview of 6 so we can get feedback?

@sfoslund
Copy link
Member Author

sfoslund commented Jul 7, 2020

@sfoslund So this is a continuation of #11875, with fixes to prevent the error from happening in common cases?

@dsplaisted Yes, I found 3 common cases, the two covered by tests added in this PR and one that's covered by this test.

@sfoslund
Copy link
Member Author

Closing for now, will reopen when we can get back to this.

@sfoslund sfoslund closed this Jul 27, 2020
@sfoslund sfoslund deleted the PublishOutputDuplications branch December 9, 2020 22:04
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.

2 participants