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

feat(nuget): add download option to source and implement repository_url #1781

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

616b2f
Copy link

@616b2f 616b2f commented Sep 4, 2024

Hi,

A little bit of context for the PR:

I was looking into a way to be able to install a "regular" nuget package to be able to install the official roslyn LSP from Microsoft which is not hosted on nuget.org (for details see dotnet/roslyn#71474 (comment)).

The way currently nuget install works is we use "dotnet tool" to install nuget packages, but this works only with nuget packages which are "tools nuget packages" which means they have a specific structure and are for that also marked as tools in nuget repositories. When you try to install "regular" nuget packages via "dotnet tool" cli, it fails because the structure of the package is a different and it expect it to be formatted as a tool.

In this PR I introduced two things that allow us to install any nuget package if the "package" author decides to do that:

  • possibility to describe we want only download the nuget package as is and extract it (because nupkg are just zip files)
  • possibility to provide an alternative "repository_url" in the packages purl (which I implemented to work with dotnet tool and the new download way)

After this PR we should be able to do this PR (mason-org/mason-registry#6330) for roslyn LSP in a more convenient way and more importantly to use the origin source for the LSP from the roslyn team.

This is my first PR here so please feel free to comment what I can improve or change.

PS: if possible we should squash the PR, because some commits where for a different solution initially which I abandoned when I came up with the current solution, but I thought it maybe helpful to keep it in the PR history.

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.

1 participant