Skip to content
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

Introduce dart doctor #55117

Open
dcharkes opened this issue Mar 6, 2024 · 0 comments
Open

Introduce dart doctor #55117

dcharkes opened this issue Mar 6, 2024 · 0 comments
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool.

Comments

@dcharkes
Copy link
Contributor

dcharkes commented Mar 6, 2024

Flutter has a flutter doctor that helps installing prerequisite tools.

We've discussed adding a similar dart doctor (#54254 (comment)) but didn't have a tracking issue yet.

One use case is C linker invocation from the Dart tooling (#49418).

However, we might have arbitrary tools being invoked by build.dart or link.dart hooks (#50565). A rust compiler, a C linker, a Go compiler, a Wasm compiler, some Java tooling, a JSON minifier, you name it.

In those cases it might make more sense that each package has a bin/doctor.dart. So that one would run dart run intl doctor.

Now, such packages would then likely shell out to helper packages again native_toolchain_c, native_toolchain_rust.

If we make dart doctor basically invoke all bin/doctor.dart of all packages in sequence that would lead to duplicate reports if multiple packages use the same helper package. (Maybe that is okay?)

If we would like to catch duplicate reports before reporting back to the user, we'd need a hook/doctor.dart in every package instead. And for that we would probably need to somehow make the tools abstraction (dart-lang/native#856) public and serializable. (Which might be a bit far fetched.)

Before committing to a dart doctor, we could prototype something in package:dart_doctor.

cc @mosuem @mit-mit @bkonyi

@bkonyi bkonyi added the area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. label Mar 6, 2024
@bkonyi bkonyi removed the pkg-dartdev label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool.
Projects
None yet
Development

No branches or pull requests

2 participants