-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean-up pkgproj leftovers in libs and apply fixes #56899
Conversation
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsRemove any pkgproj infrastructure that was only used by src/libraries Avoid any incremental builds during packaging by removing Remove the runtime.native.System.IO.Ports s390x variant as that one Fix the addition of the DocumentationFile during packaging when Removing a few leftover PackageDescription properties from the projects' Cleaning up properties in Directory.Build.props & Directory.Build.targets
|
Nice cleanup! 🙂
I think we just need to distinguish a bit more between official and community supported platforms in config files. e.g. in coreclr all community-maintained platforms are also getting OfficialBuildRID. I tried to clean that up here https://github.com/dotnet/runtime/pull/55279/files#diff-8ff7afaf3544b3026538912211057b70e70c5957b1581d3623ad34d4eba2fc59L69 but it's a bit tricky to pass the official build validation (which runs on vertical matrix) without first testing it on local machine. (I will get back to it when i get some cycles) 😅 |
FYI I moved the revert out into #56906.
Are you saying that the meta-package should ignore community supported build configurations like x390x and not have them as a dependency in the nuspec? If so, would that mean that s390x needs to be source-built to get such a package? |
Do you mean all compatible rids that that we (Microsoft) build in official builds are in the OfficialBuildRID item and everything else should be filtered out in meta-packages? Having such a list in a common place would definitely be great and tbh necessary. |
Currently, it is unclear what does it mean to be a community supported platform, where do we draw the line and what is the right way to handle such new platforms. source-build sounds like a step in right direction. One viable option I think could be that community supported packages are source-built and published to NuGet by responsible maintainer of that platform. In the package description, a note to the effect "it is a drop-in replacement of S.IO.P for XYZ platform" would help discoverability for the consumers. If we think of a platform as "OS+Arch+LibC+TFM", then it is a very similar thing as, e.g., System.Data.Linq is not supported by Microsoft on new TFMs, but Mindbox.Data.Linq provides a drop-in replacement on those platforms (TFMs) for users who are requiring it. |
@@ -63,7 +63,7 @@ | |||
<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or | |||
'$(BuildTargetFramework)' == '' or | |||
'$(BuildAllConfigurations)' == 'true'">libs.native+</DefaultLibrariesSubsets> | |||
<DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.ref+libs.src+libs.packages</DefaultLibrariesSubsets> | |||
<DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.ref+libs.src</DefaultLibrariesSubsets> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the workflow to just build packages no? build.cmd libs -pack
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build.cmd libs.src -pack
is probably the quickest and easiest one after this change is in. But as before build.cmd libs -allconfigurations
also builds the packages. Another alternative is invoking the source project directly: dotnet pack src\libraries\src.proj
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add an entry on the docs regarding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely want to have a dedicated doc page about packaging to also document the new switches that I introduced to i.e. add placeholder files for .NETFramework/Xamarin, framework assembly references, the docs switch, etc. I would like to focus on documentation in a follow-up PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sounds good. Just FYI, we already have docs dedicated to packaging. https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/libraries-packaging.md, that's why I thought it might make sense to update on this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That document is actually pretty well written :) I will add some parts to it in a follow-up :)
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' == '' and '$(BuildAllConfigurations)' == 'true'">true</GeneratePackageOnBuild> | ||
<!-- Search for the documentation file in the intellisense package and otherwise pick up the generated one. --> | ||
<LibIntellisenseDocumentationFilePath>$(XmlDocFileRoot)1033\$(AssemblyName).xml</LibIntellisenseDocumentationFilePath> | ||
<UseIntellisenseDocumentationFile Condition="'$(UseIntellisenseDocumentationFile)' == '' and Exists('$(LibIntellisenseDocumentationFilePath)')">true</UseIntellisenseDocumentationFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding support for this! does this work for shared framework assemblies?
cc: @carlossanlop @jeffhandley we can now annotate the 3 projects that ported their comments to triple slash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm don't know from the top of my head, will need to give it a try. Could be that binplacing uses a different extension point for the doc files.
@@ -9,6 +9,8 @@ | |||
|
|||
<IsSourceProject>false</IsSourceProject> | |||
<IsPackable>true</IsPackable> | |||
<!-- TODO: Enable after AvoidRestoreCycleOnSelfReference hack is removed. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue to remove that hack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -19,6 +19,8 @@ | |||
<IsPackable>true</IsPackable> | |||
<PackageDescription>Exposes new experimental APIs from System.Runtime</PackageDescription> | |||
<PackageId>$(MSBuildProjectName)</PackageId> | |||
<!-- TODO: Remove when the package shipped with NET6. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this package will be removed in .NET 7 anyways. cc: @tannergooding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, assuming it doesn't get delayed by something else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the comment as-is until we know for sure.
Remove any pkgproj infrastructure that was only used by src/libraries (which is the majority). Delete the packageindex *YAY*. Update the documentation that covered the packageindex and the pkgprojs. Avoid any incremental builds during packaging by removing libraries-packages.proj and use src.proj for packaging instead. Make use of the `GeneratePackageOnBuild` property to build package during the allconfigurations without requiring a different entry target. Fix the addition of the DocumentationFile during packaging when `GeneratePackageOnBuid` is used by hooking onto the `DocumentationProjectOutputGroup` that NuGet uses and replacing the generated documentation file with the one that comes via the intellisense package. Also introduce a property to choose the generated documentation file over the one from the intellisense package: <UseIntellisenseDocumentationFile>false</UseIntellisenseDocumentationFile> Removing a few leftover PackageDescription properties from the projects' Directory.Build.props file. Cleaning up properties in Directory.Build.props & Directory.Build.targets files.
c18667c
to
3d10eb1
Compare
I just rebased upon latest main, nothing changed in the code. |
This PR makes the allconfiguration leg 5 min faster :) |
Nice!!! Hopefully that is not cause we are accidentally loosing test coverage 😆 |
It seems to be because the packages tests are not running 😢 :
|
f*** :D |
@ViktorHofer, was there any +/- impact when pkg validation was turned on? |
Not 5 but 3 minutes. So we are back at where we were before with pkgprojs before we migrated to csprojs which still is quite a good result :) (nuget does more) |
Remove any pkgproj infrastructure that was only used by src/libraries
(which is the majority). Delete the packageindex YAY.
Update the documentation that covered the packageindex and the pkgprojs.
Avoid any incremental builds during packaging by removing
libraries-packages.proj and use src.proj for packaging instead. Make use
of the
GeneratePackageOnBuild
property to build package during theallconfigurations without requiring a different entry target.
Fix the addition of the DocumentationFile during packaging when
GeneratePackageOnBuid
is used by hooking onto theDocumentationProjectOutputGroup
that NuGet uses and replacing thegenerated documentation file with the one that comes via the
intellisense package.
Also introduce a property to choose the generated documentation file
over the one from the intellisense package:
false
Removing a few leftover PackageDescription properties from the projects'
Directory.Build.props file.
Cleaning up properties in Directory.Build.props & Directory.Build.targets
files.