dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.75k stars 1.07k forks source link

Provide Diagnostic Items as part of Package Dependency Resolution task #26

Closed natidea closed 7 years ago

natidea commented 8 years ago

Diagnostics. In some cases when your task can detect error or warning for some packages, it should send diagnostics associated with that package. For example:

Here is a full list of diagnostics we had (not all of them are applicable to lock file): https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.DotNet.ProjectModel/ErrorCodes.NuGet.cs

natidea commented 8 years ago

It appears unresolved packages are not in the project.assets.json (project.lock.json) and will need to be added in order to create a diagnostic

brthor commented 8 years ago

The cli ProjectModel would determine this by comparing the projectFileDependencyGroups in the lock file section with the actual resolved dependencies.

https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.DotNet.ProjectModel/Graph/LockFile.cs#L35

eerhardt commented 8 years ago

Won't the "restore" fail when a package is unresolved?

abpiskunov commented 8 years ago

restore would fail , but lock file should still be generated. Yes, we could do same thing what ProjectMOdel did.

davidfowl commented 8 years ago

Here are the list of diagnostics:

Here's where we created them (if that's relevant)

Plumbing

Once a system like this is in place and going to all the right places and all the right editors and command line experiences, it becomes trivial to add new ones.

/cc @emgarten @rrelyea

dsplaisted commented 7 years ago

@natidea I think some of these diagnostics will be covered by the work you are doing for #1026

livarcocc commented 7 years ago

I believe these have been addressed. So, I am closing this item. @natidea, if there is anything missing, please, re-activate and let us know what you need from SDK.