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 new option: unique-by-package-name option to group packages only by name #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomchavakis
Copy link
Owner

@tomchavakis tomchavakis commented May 3, 2021

This PR introduces a new option, the unique-by-package-name option.
This option group the licenses only by name.
This option differs from unique option which groups the licenses by name and version.

@wgnf
Copy link

wgnf commented May 5, 2021

What do you think about having a parameter like --unique-mode with the following options:

  • ByNameAndVersion (default, current approach)
  • ByName

This way you would be able to add more "uniqueness"-options by only having two parameters where you add a new enum for the --unique-mode.

What you could also do, would be to only have --unique and expand it by accepting UnqiueModes. This would help by keeping the list of parameters pretty short.
I was thinking about a list of UniqueModes like this:

  • None (default, when --unique is not provided as a parameter)
  • ByNameAndVersion (default, when only --unique is provided as a parameter)
  • ByName

Other modes could then be selected by doing i.e. --unique "ByName".

@henk-van-der-vaart
Copy link

henk-van-der-vaart commented May 21, 2021

I noticed that now in case of UniqueByPackageName they are simply grouped by PackageName and first one is taken as unique one. Maybe better to still group by PackageName but select not fixed the first one but maybe the one with highest version.
Because it is most likely that this highest version is deployed and to ensure the license URL is OK for highest.
Theoretically it can happen that license URLs differs between NuGet package versions because e.g. version is part of the URL.
What do you think?

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

Successfully merging this pull request may close these issues.

3 participants