-
Notifications
You must be signed in to change notification settings - Fork 229
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
pub deps --json #2896
pub deps --json #2896
Conversation
lib/src/command/deps.dart
Outdated
@@ -67,23 +72,59 @@ class DepsCommand extends PubCommand { | |||
if (argResults['executables']) { | |||
_outputExecutables(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have mixed feelings about this.
We could choose to output different JSON output when either --dev
and/or --executable
is given, or we could just ignore (or forbid) these flags when outputting JSON, and always output the same thing.
Since a JSON output could contain a property "relation": "direct | dev | transitive | transitive-dev"
or something like that, and we leave it up to the reader to parse it.
Didn't we do this for dart pub outdated --json
?
cc: @DanTup do you have any comments about the json output, seen from the perspective of dart-code? |
@sigmundch I haven't looked properly yet, but I'll aim to take a look this afternoon and let you know! |
@sigmundch looks great! It should make both Dart-Code/Dart-Code#3095 and Dart-Code/Dart-Code#3202 very easy to add. Thanks! :-) |
Is it intended that I can work around it, it's just a little clunky (the event fired to tell VS Code to refresh the tree is somewhat disconnected from the code that then later calls the command when asked for the tree nodes) so I thought it was worth checking. |
@DanTup please file an issue if you can reproduce it.
I couldn't trivially reproduce it. |
Hmm, I can't repro in one project but can in another:
I'll see if I can figure out the difference and file an issue. Thanks! |
That's not a problem for me here - the issue was just with |
#2892