-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Background
Currently
> dart run <package>[:<executable>]
will ensure that resolution and .dart_tool/package_config.json in the current working dir is up to date, and then find bin/<executable>.dart relative to the <package> package dir.
As part of the workspace work, we will search in parent directories to current working dir
However:
> dart run path/to/file.dart
Will pass path/to/file.dart directly to the VM without doing any resolution. The package will be run with the nearest enclosing .dart_tool/package_config.dart to path/to and no snapshotting is done. This corresponds to running dart path/to/file.dart (though it is slower because it enters the dartdev command-line handling).
Proposal
Let dart run path/to/file.dart search for a .dart_tool/package_config.json (or, failing that a pubspec.yaml) enclosing path/to, ensuring the resolution is up-to-date and doing the same snapshotting it would do for dart run <package>:<executable>.
This will slightly change the current observed behavior, and could be considered a bug fix or a breaking change depending on how you look at it.