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

Should we be enforcing 1 package type per package #6298

Closed
nkolev92 opened this issue Dec 11, 2017 · 2 comments
Closed

Should we be enforcing 1 package type per package #6298

nkolev92 opened this issue Dec 11, 2017 · 2 comments
Assignees
Labels
Functionality:Pack Type:DCR Design Change Request

Comments

@nkolev92
Copy link
Member

nkolev92 commented Dec 11, 2017

Motivated by https://github.com/NuGet/Home/wiki/Global-Tools---NuGet-Implementation/

@rrelyea thinks that we should have already been enforcing 1 package type per package, but currently that's allowed by both specification and the implementation of Pack.

Update:

Pack doesn't validate.
Install through PM UI validates.
Adding in the package reference manually and restoring doesn't validate.

This would be a breaking change.

@nkolev92 nkolev92 self-assigned this Dec 11, 2017
@nkolev92 nkolev92 added Functionality:Pack Type:DCR Design Change Request labels Dec 11, 2017
@natemcmaster
Copy link

What exactly is the concern with having multiple packageType's per package? I'm not sure I understand why this restriction is important to NuGet when last year the design was intentional about supporting multiple types per package. https://github.com/NuGet/Home/wiki/Package-Type-%5BPacking%5D

For example, today, this is a totally valid package:

<nuspec>
  <metadata>
     <packageTypes>
        <packageType name="Dependency" />
        <packageType name="DotNetCliTool" />
        <packageType name="Template" />
    </packageTypes>
   </metadata>
</nuspec>

It is possible for a package author to construct one template that provides multiple pieces of functionality in one package.

@nkolev92
Copy link
Member Author

The answer here is no for the general feature.

However, certain package types can declare themselves incompatible with others and we have done that with DotnetTool and DotnetPlatform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

2 participants