Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

buildTarget/restore #675

Unanswered
schinnerld asked this question in Q&A
May 31, 2024 · 3 comments · 2 replies
Discussion options

I was wondering if there should be an explicit buildTarget/restore request. Currently BSP has no direct way to handle dependency restore (like dotnet restore).

In your opinion, would this be useful? If not, is there a recommended way to call dependency restore (e.g. with buildTarget/compile arguments)? Or do you think it should just be an implicit step (task) of the compile request?

You must be logged in to vote

Replies: 3 comments · 2 replies

Comment options

Hi! Can you describe what the semantics of restore should be and why it is needed? I'm not familiar with dotnet restore.

You must be logged in to vote
0 replies
Comment options

I also don't know what you mean by "dependency restore"

You must be logged in to vote
0 replies
Comment options

Sorry for the confusion. I'm talking about package managers to download and update necessary libraries. In the .NET ecosystem for example that would be NuGet.

The dotnet commands can be wonderfully matched to the BSP requests.
dotnet build = buildTarget/compile
dotnet run = buildTarget/run
dotnet test = builtTarget/test
dotnet clean = buildTarget/cleanCache

But I miss a dotnet restore counterpart, hence my question.

You must be logged in to vote
2 replies
@tgodzik
Comment options

Servers like the Bazel one would get the dependencies at the start since that is anyway needed to compile anything. We also have a reload request that could work here for updating deps etc.

@adpi2
Comment options

adpi2 Jun 3, 2024
Maintainer

It seems the .NET documentation of restore and @tgodzik say about the same thing.

In most cases, you don't need to explicitly use the dotnet restore command, since if a NuGet restore is necessary, the following commands run it implicitly:
dotnet build
dotnet run
dotnet test
...

So maybe we don't need such a method yet. Or maybe you can use the buildTarget/dependencyModules request instead, which needs to resolve and download the dependencies to return them to the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.