Skip to content

Add --json output for pub add #4712

@DanTup

Description

@DanTup

In Dart-Code/Dart-Code#5802 there is some discussion about having the analysis server use pub add --dry-run to get the version number to add, but then writing it directly into pubspec.yaml (there are a number of reasons why this might be better, in particular supporting unsaved files in the editor, and also allowing the actual pub get to happen in the client, in front of the user where they can see output better).

To do this, it would be better if we could parse structured output from pub add --dry-run instead of regexing human output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions