Skip to content

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

Closed

Description

@natidea

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:

  • Package is unresolved, we used to have an error
  • Version was unified , we used to have a warning

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

  • Diagnostics should be another item type and following your data schema we should have new collections DiagnosticsDefinitions, and DiagnosticsDependencies, which would associate diagnostic messages with packages. ItemSpec could be TFM/package/version/, with metadata “Message” and “Type” (error or warning)
  • Each package might have multiple diagnostics at the same time: errors and warnings.
  • Diagnostics will be displayed under package in the tree
  • Also diagnostics should be displayed in the error list as Intellisense errors. I am not sure if Dependencies Tree should be the one pushing them to error list or not, but I can do that too.
  • It might not be a pri 0 workitem to make diagnostics work right now, but we at least need a schema ready , just return empty for now. I would already made Tree to be aware or them.

Activity

  1. self-assigned this
    on Aug 8, 2016
  2. natidea commented on Aug 23, 2016

    @natidea
    ContributorAuthor

    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

  3. brthor commented on Aug 24, 2016

    @brthor
    Contributor

    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

  4. eerhardt commented on Aug 24, 2016

    @eerhardt
    Member

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

  5. abpiskunov commented on Aug 24, 2016

    @abpiskunov
    Contributor

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

  6. modified the milestone: 1.0 RC on Sep 16, 2016
  7. davidfowl commented on Nov 24, 2016

    @davidfowl
    Member

    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

  8. modified the milestones: 1.0 RC3, 1.0 RC2 on Nov 29, 2016
  9. modified the milestones: 1.0 RC3, 1.0 RTM on Jan 11, 2017
  10. modified the milestones: 1.1, 1.0 RTM on Jan 27, 2017
  11. modified the milestones: , 1.1 on May 10, 2017
  12. dsplaisted commented on May 10, 2017

    @dsplaisted
    Member

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

  13. livarcocc commented on Jun 30, 2017

    @livarcocc
    Contributor

    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.

  14. added a commit that references this issue on Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions