Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Do not include dependencies with PrivateAssets="All" in the compiler package #526

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

bamarsha
Copy link
Contributor

FindNuspecReferences.ps1 adds all dependencies to Compiler.nuspec, even ones marked with PrivateAssets="All". That meant that the StyleCop analyzers for the Q# compiler source code were propagating to projects that have a reference to the Q# compiler package, which is a bit unwelcome for downstream projects.

Copy link
Contributor

@ScottCarda-MS ScottCarda-MS left a comment

Choose a reason for hiding this comment

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

This seems like the right thing to prevent private assets from propagating to other repoes, but I don't know what all the possible implications of making this change will be. Are there any dependencies with PrivateAssets="All" that are supposed to be propagated? Is there an easy way to tell?

@bamarsha
Copy link
Contributor Author

It seems that PrivateAssets="All" implies that something is a development-only (i.e. build-time only) reference, and shouldn't be a package dependency:

@bamarsha bamarsha merged commit d72b05b into master Jul 21, 2020
@bamarsha bamarsha deleted the samarsha/privateassets-nuspec branch July 21, 2020 16:42
@filipw
Copy link
Contributor

filipw commented Aug 3, 2020

I just ran into this today. Thanks for fixing this, currently the compiler nuget package drags in Stylecop reference when installed and ruins the project's code analysis 😂 it would be good to release the new version out

@bamarsha
Copy link
Contributor Author

bamarsha commented Aug 3, 2020

Yes, sorry about that! I believe you can work around it for now by adding this .editorconfig to your project, which should disable all StyleCop rules...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants