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

Use package:package_config to pass --packages to all dart compile subcommands #48540

Open
bkonyi opened this issue Mar 10, 2022 · 3 comments
Open
Assignees
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-compile Issues related to the 'dart compile' tool

Comments

@bkonyi
Copy link
Contributor

bkonyi commented Mar 10, 2022

Each of the various tools invoked by dart compile are currently responsible for discovering the correct package-config.json if one isn't explicitly provided. We should instead move discovery into the dart compile subcommands in the CLI and always pass --packages to the tooling.

@bkonyi bkonyi added area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-compile Issues related to the 'dart compile' tool labels Mar 10, 2022
@bkonyi bkonyi self-assigned this Mar 10, 2022
@bkonyi
Copy link
Contributor Author

bkonyi commented Apr 23, 2024

@sigurdm, I was going through my issue backlog and came across this. Is this something that's worth doing? If so, what's the best way to go about doing it using package:package_config?

@lrhn
Copy link
Member

lrhn commented Apr 24, 2024

Seems like #55548 is related to this issue.
It doesn't use package:package_config directly because it has to look for pubspec.yaml too.

@sigurdm
Copy link
Contributor

sigurdm commented Apr 25, 2024

I think dart compile <foo> should invoke the getExecutableForCommand like dart run currently does. That would let pub find the relevant package config, and also allow things like:

dart compile <package>:<executable>

to reference bin/<executable>.dart inside a dependency's package dir. And it would make sure that dependencies are resolved and up-to-date before compiling.

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. dart-cli-compile Issues related to the 'dart compile' tool
Projects
None yet
Development

No branches or pull requests

3 participants