Skip to content
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

Add Analyzer packaging support and packaging documentation #52554

Merged
merged 9 commits into from
May 14, 2021

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented May 10, 2021

To package Microsoft.Extensions.Logging.Abstractions we needed support
for packing an Analyzer. This adds that support.

I wanted to document this addition, so I created the start of a doc that's
meant to describe the packaging options for libraries in dotnet/runtime.

Hopefully folks can pitch in and improve this doc.

To package Microsoft.Extensions.Logging.Abstractions we needed support
for packing an Analyzer.  This adds that support.

I wanted to document this addition, so I created the start of a doc that's
meant to describe the packaging options for libraries in dotnet/runtime.
@ghost
Copy link

ghost commented May 10, 2021

Tagging subscribers to this area: @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

To package Microsoft.Extensions.Logging.Abstractions we needed support
for packing an Analyzer. This adds that support.

I wanted to document this addition, so I created the start of a doc that's
meant to describe the packaging options for libraries in dotnet/runtime.

Hopefully folks can pitch in and improve this doc.

Author: ericstj
Assignees: -
Labels:

area-Extensions-Logging

Milestone: -

@ghost ghost added this to Active PRs in ML, Extensions, Globalization, etc, POD. May 10, 2021
Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

Thanks for writing such clear docs as well 🎉

@ViktorHofer
Copy link
Member

With this changes we do have P2Ps in place which means we can remove the extra ProjectReferences in src.proj. Can you please remove these:

@ericstj
Copy link
Member Author

ericstj commented May 12, 2021

With this changes we do have P2Ps in place which means we can remove the extra ProjectReferences in src.proj. Can you please remove these:

Actually I haven't moved System.Text.Json to csproj pack yet, so I think that's still needed. I'll see if I can make that work with only the CSProj change (not migrating to pkgproj yet).

@ericstj
Copy link
Member Author

ericstj commented May 12, 2021

src\libraries\pkg\test\testPackages.proj(88,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Object reference not set to an instance of an object.

This is due to https://github.com/dotnet/arcade/blob/57707a9e0150de043f8fc4a849f1f4f47dd3219a/src/Microsoft.DotNet.PackageTesting/NupkgParser.cs#L60 returning null for assets outside lib/ref/runtimes. I think this will coincidentally be fixed by dotnet/arcade@5faea1b since that fixes the file filtering to include packageId.dll, right now it's using title.dll and title is empty so the analyzer dlls are being included.

@ericstj
Copy link
Member Author

ericstj commented May 13, 2021

Failure is happening in Microsoft.Extensions.DependencyInjection.Specification.Tests

  Testing Microsoft.Extensions.DependencyInjection.Specification.Tests TFM=net462
C:\h\w\9EF60927\p\packageTest.targets(53,5): error : Assembly 'netfx.force.conflicts' has insufficient version for dependency 'System.ServiceModel.Duplex' : 4.0.0.0 < 4.0.2.0. [C:\h\w\9EF60927\w\AF2B09D2\u\net462\project.csproj]
  Testing Microsoft.Extensions.DependencyInjection.Specification.Tests TFM=net461
C:\h\w\9EF60927\p\packageTest.targets(53,5): error : Assembly 'netfx.force.conflicts' has insufficient version for dependency 'System.ServiceModel.Duplex' : 4.0.0.0 < 4.0.2.0. [C:\h\w\9EF60927\w\AF2B09D2\u\net461\project.csproj

This is saying that netfx.force.conflicts references version 4.0.2.0 of System.ServiceModel.Duplex yet the version provided is 4.0.0.0. This is due to System.ServiceModel.Duplex being produced OOB by WCF, but is not part of the package closure. netfx.force.conflicts is part of the netstandard support shims and contains a reference to the OOB version, yet the one in the product is lower.

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Minor Nit's but looks great otherwise, glad that we are moving away from pkgprojs 🙌

@ericstj
Copy link
Member Author

ericstj commented May 13, 2021

glad that we are moving away from pkgprojs 🙌

Much thanks to @Anipik for making this possible

@ericstj
Copy link
Member Author

ericstj commented May 14, 2021

Staging failures are #52736.

@ericstj ericstj merged commit a50f309 into dotnet:main May 14, 2021
ML, Extensions, Globalization, etc, POD. automation moved this from Active PRs to Done May 14, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2021
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.

None yet

8 participants