You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should consider adding support for user-defines as command-line arguments from Dart and Flutter.
CLI sketch:
dart run --hook-define=<package>.<key>=<value>
flutter run --hook-define=<package>.<key>=<value>
The defines are namespace by package similar to how these are nested in the pubspec.yaml user defines.
The defines are shared for all hooks, similar to how the are shared across all hooks (currently only build.dart and link.dart) in the pubspec.yaml user-defines.
Hooks API: Unchanged from current API. Command-line arguments "override" arguments from the pubspec.
Overrides the non-cli-args cache with cli args. So for a second invocation with the same cli args the cache is used.
A later invocation without cli args needs to be rerun.
If no CLI args are passed the whole command_line_arguments from the JSON is omitted. So invoking builds from multiple root packages in the same directory without cli arguments will always hit caching.
Using cli args invalidates caching.
(If we keep the config in JSON dictates cache directory, we could use a different cache directory if there are any CLI arguments. E.g. config->has_cli_args = true.)
The text was updated successfully, but these errors were encountered:
We should consider adding support for user-defines as command-line arguments from Dart and Flutter.
CLI sketch:
The defines are namespace by package similar to how these are nested in the
pubspec.yaml
user defines.The defines are shared for all hooks, similar to how the are shared across all hooks (currently only build.dart and link.dart) in the
pubspec.yaml
user-defines.Hooks API: Unchanged from current API. Command-line arguments "override" arguments from the pubspec.
JSON protocol sketch:
Caching behavior:
Overrides the non-cli-args cache with cli args. So for a second invocation with the same cli args the cache is used.
A later invocation without cli args needs to be rerun.
If no CLI args are passed the whole
command_line_arguments
from the JSON is omitted. So invoking builds from multiple root packages in the same directory without cli arguments will always hit caching.Using cli args invalidates caching.
(If we keep the
config
in JSON dictates cache directory, we could use a different cache directory if there are any CLI arguments. E.g.config
->has_cli_args
=true
.)The text was updated successfully, but these errors were encountered: