Use compiler-generated doc XML for PNSE builds#126241
Use compiler-generated doc XML for PNSE builds#126241ericstj wants to merge 2 commits intodotnet:mainfrom
Conversation
For PNSE assemblies that opt into UseCompilerGeneratedDocXmlFile, resolve a compatible non-PNSE sibling target framework via IsCandidateCompilerGeneratedDocFile and use its compiler-generated doc XML instead of requiring the intellisense package. - Add IsCandidateCompilerGeneratedDocFile property and flow it through AdditionalTargetFrameworkInfoProperty so the outer build can identify candidate TFs. - Derive IsPlatformNotSupportedAssembly as a standalone property instead of computing it inline in ItemDefinitionGroup metadata. - Rename IntellisensePackageXmlFilePath to DocFileOverride to reflect that the doc file override can come from any source. - Add GetPNSEDocTargetFramework, AddProjectReferenceToPNSEDocSource, and SetDocFileOverrideFromPNSEDocSource targets to resolve and consume the sibling doc file. - Suppress the missing-intellisense-file warning for PNSE builds.
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries |
There was a problem hiding this comment.
Pull request overview
This PR updates the libraries intellisense/doc-XML build logic so PNSE (platform-not-supported) target frameworks can reuse compiler-generated XML documentation from a compatible non-PNSE sibling target framework, rather than depending on an intellisense package doc file.
Changes:
- Introduces
IsCandidateCompilerGeneratedDocFileand flows it viaAdditionalTargetFrameworkInfoPropertyso the outer build can pick a sibling TFM as the PNSE doc source. - Reworks “intellisense package XML” plumbing into a more general
DocFileOverride, and adds targets to resolve and apply a PNSE sibling doc file. - Suppresses the “missing intellisense file” warning for PNSE builds and refactors
IsPlatformNotSupportedAssemblyinto a standalone property.
|
The intent looks good to me. I do not understand the libraries msbuild plumbing well enough to tell whether the implementation is right. Are there any packages currently that this is going to kick in for? |
Not at the moment, but I added one artificially (choosing one already using compiler generated docs, and added a PNSE) to test this and validated it's behavior. @gewarren -- do you know if we have any libraries that are only blocked on this to make the switch? |
Yes, I think these PRs are blocked on it: |
For PNSE assemblies that opt into UseCompilerGeneratedDocXmlFile, resolve a compatible non-PNSE sibling target framework via IsCandidateCompilerGeneratedDocFile and use its compiler-generated doc XML instead of requiring the intellisense package.