Skip to content

Conversation

@dsplaisted
Copy link
Member

@dsplaisted dsplaisted commented Jun 21, 2019

Implement some of the unification in #3311, but without changing the product behavior.

Determines which assets should be copied local for both build and publish in the ResolvePackageAssets task.

@dsplaisted dsplaisted force-pushed the build-publish-tweaks branch from aacf9ca to d253daf Compare June 22, 2019 01:18
@dsplaisted dsplaisted force-pushed the build-publish-tweaks branch from 3659d26 to 5c959e9 Compare June 24, 2019 05:50
@dsplaisted dsplaisted marked this pull request as ready for review June 24, 2019 07:32
@dsplaisted dsplaisted requested review from a team, nguerrera and peterhuene June 24, 2019 13:51
Copy link
Contributor

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

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

Looks great over all. One step closer to removing a bunch of stuff out of the publish targets.

Just a nit and question or two.

packageExclusions.UnionWith(_runtimeTarget.GetPlatformExclusionList(platformLibrary, libraryLookup));
copyLocalPackageExclusions.UnionWith(_runtimeTarget.GetPlatformExclusionList(platformLibrary, libraryLookup));

// If the platform library is not Microsoft.NETCore.App, treat it as an implicit dependency.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't I see this being removed from:

// If the platform library is not Microsoft.NETCore.App, treat it as an implicit dependency.

Do we need both, and why? I was expecting to see things moved in to here from elsewhere. Is that the right way to think about this change?

Copy link
Contributor

@peterhuene peterhuene Jun 24, 2019

Choose a reason for hiding this comment

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

I think the duplicate logic is still used by ResolveCopyLocalAssets (the old publish asset resolving code that still gets invoked when there are runtime stores being used after these changes).

We might be able to consolidate this bit, but might also not be worth the effort if the intent is to remove ResolveCopyLocalAssets and the AssetsFileResolver (and then by extension, ProjectContext.GetRuntimeLibraries as referenced) in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the code in ProjectContext is still used by ResolveCopyLocalAssets.

My hope is that we can remove ResolveCopyLocalAssets with further refactoring. This would require supporting the equivalent of PreserveStoreLayout and RuntimeStorePackages in ResolvePackageAssets.

@dsplaisted dsplaisted force-pushed the build-publish-tweaks branch from 3a5f47f to 213e3b0 Compare June 25, 2019 15:10
@dsplaisted dsplaisted merged commit d49d89e into dotnet:master Jun 25, 2019
dsplaisted pushed a commit to dsplaisted/sdk that referenced this pull request Feb 19, 2020
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.

3 participants