Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding to PackageIndex all of the information about our release from 6.0 and fixing packages that needed placeholders#27385

Closed
joperezr wants to merge 4 commits into
dotnet:release/2.1from
joperezr:FixPackageIndex
Closed

Adding to PackageIndex all of the information about our release from 6.0 and fixing packages that needed placeholders#27385
joperezr wants to merge 4 commits into
dotnet:release/2.1from
joperezr:FixPackageIndex

Conversation

@joperezr
Copy link
Copy Markdown
Member

Fixes #27100

After shipping UAP 6.0 we didn't update the package index with this data so package validation has not been testing for breaks on packages that we will soon release. These changes include updating said index and reacting to the validation errors.

cc: @weshaggard @ericstj @joshfree

@joshfree
Copy link
Copy Markdown
Member

can you PR this to master first instead of release/2.1?

Comment thread external/uap/uap.depproj
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>$(UAPPackageVersion)</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Emit">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a comment around these additions and their purpose.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will do

netcoreapp2.0;
uap10.0.16299-Windows_NT;
uap10.0.16299aot-Windows_NT;
uapaot-Windows_NT;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Following the netcoreapp2.0 pattern perhaps you should remove the version-less ones into BuildConfigurations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sounds good, I'll do that.

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<ProjectGuid>{7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}</ProjectGuid>
<PackageTargetFramework>netstandard2.0;uap10.0.16299</PackageTargetFramework>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't the NS2.0 version apply or are we still missing a NuGet.Frameworks update?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I believe we are still missing an update of the mappings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would expect this mapping to exist as well.

@joperezr
Copy link
Copy Markdown
Member Author

@joshfree

can you PR this to master first instead of release/2.1?

That was the original idea, but because we have turned off all of the uap build in there, it was impossible to get the right validation since the builds were incomplete.

Comment thread dir.props
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
<_packageRID Condition="'$(TargetGroup)' == 'uap'">win10-$(ArchGroup)</_packageRID>
<_packageRID Condition="'$(TargetGroup)' == 'uapaot'">win10-$(ArchGroup)-aot</_packageRID>
<_packageRID Condition="$(TargetGroup.StartsWith('uap'))">win10-$(ArchGroup)</_packageRID>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nevermind I see the other aot configurations.

@@ -811,11 +826,13 @@
"4.2.1.0": "4.5.0"
}
},
/*The shim of System.ComponentModel.Composition shipped on netcoreapp2.0 and uap6.0 and we now have an implementation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would you mind fixing this while you are in here.

"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
"netcoreapp2.0": "Any",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can remove the comment now.

@joperezr
Copy link
Copy Markdown
Member Author

@weshaggard & @ericstj do you mind taking another peak at this before merging?

System.Security.Principal.Windows;
</Value>
</ValidatePackageSuppression>
<!-- Permit missing Inbox since we this used to be a shim and it is now OOB -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo: since we this -> since this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

System.Private.Reflection.Metadata.Ecma335;
</Value>
</ValidatePackageSuppression>
<!-- Permit missing Inbox since we this used to be a shim and it is now OOB -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo: since we this -> since this

<PropertyGroup>
<PackageConfigurations>
netstandard;
netstandard-Windows_NT;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this netstandard-Windows_NT configuration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because since we harvest a Windows specific netstandard1.3, then package validation will complain given that the compile asset resolved for UAP6.0 (the netstandard2.0 ref) will have a higher assembly version than the resolved implementation for UAP6.0 (the windows specific netstandard1.3 implementation) because the runtime specific assets will be prefered over the non rid specific (lib/netstandard2.0) . This is required in order to pass package validation and in order to be consumed on UAP.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ericstj do you think adding the netstandard-Windows_NT configuration is better then remapping the harvested location to put the NS13 asset in the lib instead of the windows RID. I suppose there is a chance that remapping the path might actually cause breaks but it would depend on the actual package.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That ns1.3 asset is a windows specific implementation. If you started putting that in a RID-less folder you'd change the behavior for non-windows (previously it got a PNS exception).

If you go back and look at the history as to why this is targeting NETCoreapp-window_nt today instead of netstandard-windows_nt, it is because of this: joperezr@28097ca#diff-6b3a566cbc8f4a17c79fa82c0a0feafc. I needed to create a netcoreapp configuration to avoid an assembly cycle in the implementation of netcoreapp.

In that case the better fix here would be to move the netcoreapp-* configurations into BuildConfigurations only (since their only difference from netstandard version will be referenced assemblies) and have a netstandard-windows_NT version in the package.

<PropertyGroup>
<PackageConfigurations>
netstandard;
netstandard-Windows_NT;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this configuration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same reason as above.

<PropertyGroup>
<PackageConfigurations>
netstandard;
netstandard-Windows_NT;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this needed? In general I like to avoid RID netstandard configurations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree, but as explained above, this is required because we are harvesting a windows specific netstandard1.3 implementation for this package, which will be prefered over the lib/netstandard2.0 implementation for UAP.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@weshaggard why do you want to avoid RID-netstandard configurations? What if we want to share a windows implementation between netcoreapp and UAP? That's the reason why those old harvested assets existed that were RID-specific and targeted netstandard.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe it is the purity in me speaking but I just don't like mixing netstandard library assets, which should be simple and free (mostly) of any OS specific code, with a RID. While I think there might be exceptions I would generally push for keeping RID specific assets targeting a concrete framework.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is nothing impure about having a RID + netstandard assets. Consider that the netstandard version targeted by the assembly represents the managed API needed by that assembly and the RID represents the platform API/behavior. It's actually more pure to have the assembly be win+netstandard since that's technically all it depends on. Making it win+UAP / win+netcoreapp implies it depends on something specific to those TFMs which at least the package asset does not.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

By purity I'm thinking about netstandard being pure IL and no pinvokes, which is where I would like most libraries to live. I know that isn't a reality but it is my ideal world. I agree using a combination of netstandard+RID can be useful in some scenarios but it also adds some risk as the native dependencies may or may not work on any netstandard supported platform. I guess that is true for all assets that go under a RID and I've never really liked how "undefined" RID's are which also leads me to not liking these. At any rate netstandard+RID is a tool and we should use it if necessary but that doesn't make me like it :)

@weshaggard
Copy link
Copy Markdown
Member

@joperezr we are going to be merging master into release/2.1 later this week. It might be worth waiting on this until after that otherwise I expect the merge is going to be a little challenging.

@joperezr
Copy link
Copy Markdown
Member Author

sounds good, I'll wait for the merge from master and then I'll merge this.

@ChadNedzlek
Copy link
Copy Markdown

Is this making progress? 9 days ago we said "later this week", but seems like there hasn't been any activity recently. This is blocking a buildtools uptake which is blocking some infrastructure work.

@ericstj
Copy link
Copy Markdown
Member

ericstj commented Mar 8, 2018

I think @joperezr mentioned that he was going to undo the buildtools change in release and wait for the changes from master to integrate. @joperezr are you still planning on that?

@joperezr
Copy link
Copy Markdown
Member Author

joperezr commented Mar 9, 2018

yup already did that. This work has been now moved to master and merged so I'm closing this PR now.

@joperezr joperezr closed this Mar 9, 2018
@karelz karelz added this to the 2.1.0 milestone Mar 18, 2018
@joperezr joperezr deleted the FixPackageIndex branch November 2, 2018 20:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants