-
Notifications
You must be signed in to change notification settings - Fork 255
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
Control assets flow for transitive packages #6720
Comments
what would you expect your project output to be when you pack it? would it list the resolved version of B and say Exclude="compile, runtime" ? |
@rohit21agrawal My biggest concern here, is that I'm not sure what the language to express this intent in, would be, Example: |
if A has a runtime dependency on B, the consumer of Package X (produced as a result of packing the project) would be broken because he won't get compile/runtime assets from B even though A explicitly expressed B as it's dependency. |
B would be packed with exclude compile, not exclude runtime though? Let's sync up offline. |
Synced up offline. This shouldn't impact pack, in my opinion. The primary feature here is to allow package consumers to more granular control over what flows in their project. |
@nkolev92 Hi! Any progress on this? There seems to be a sort of related discussion, but from the package author's point of view #6614 And another one dotnet/roslyn#22095 |
Hey @v-zubritsky This feature needs a design in order to make progress on it, and it's not on our immediate backlog (think next 3 months). I can't speak on any scheduling beyond that, but customer feedback is one aspect we use for prioritization. |
As a package consumer, I want to be able to control the assets flow for transitive packages.
Example:
Example
Project -> A.nupkg -> B.nupkg.
Sometimes, I don't want to be able to access Bs APIs in my project, because I don't want to effectively take a compile dependency on a package that I didn't explicitly add as one.
Additionally, when I upgrade A.nupkg, it's possible that B.nupkg is not a dependency anymore, so it'll break my project.
Effectively I want to say, B.nupkg ExcludeAssets=compile.
This is completely safe, and will not break the usage of package A.
Now if I was so concerned with not having B nupkg code in my project, I could elevate it to a top level dependency as a workaround, but that would mean I have to manage the versioning of B.nupkg right now, which defeats the purpose of transitivity.
The approach here is similar to the dependency exclusions concept of Maven, but a bit more granular.
//cc
@rrelyea
The text was updated successfully, but these errors were encountered: