The analysis server runs dart pub get (or upgrade) in a synthetic pub package directory for analyzer plugins. If that command fails (like a plugin has a version constraint of it's dependency on analysis_server_plugin which is incompatible with DAS's constraint, or two plugins have incompatible constraints of their dependencies on analysis_server_plugin, etc.) then DAS just takes the stderr/stdout and dumps it to the user, like if they are executing dart analyze.
A user pointed out, dart-lang/sdk#63568, that much of the recommendations in the error text are inapplicable to the user, and actively lead them astray.
It would be great if DAS could instead call dart pub get --json or something similar, which would spit out its errors in a machine-readable format.
(Alternatively, DAS could execute dart pub get via a programmatic API, but I'm unaware that one exists. That would probably be faster and we'd have more fine-grained control. I'm sure that's a huge ask if it's not available today.)
CC @bwilkerson @keertip
The analysis server runs
dart pub get(orupgrade) in a synthetic pub package directory for analyzer plugins. If that command fails (like a plugin has a version constraint of it's dependency onanalysis_server_pluginwhich is incompatible with DAS's constraint, or two plugins have incompatible constraints of their dependencies onanalysis_server_plugin, etc.) then DAS just takes the stderr/stdout and dumps it to the user, like if they are executingdart analyze.A user pointed out, dart-lang/sdk#63568, that much of the recommendations in the error text are inapplicable to the user, and actively lead them astray.
It would be great if DAS could instead call
dart pub get --jsonor something similar, which would spit out its errors in a machine-readable format.(Alternatively, DAS could execute
dart pub getvia a programmatic API, but I'm unaware that one exists. That would probably be faster and we'd have more fine-grained control. I'm sure that's a huge ask if it's not available today.)CC @bwilkerson @keertip