Open natebosch opened 6 years ago
Should we also enable using these aliases when statically configuring a builder somehow?
Should we also enable using these aliases when statically configuring a builder somehow?
I don't see why not as long as we can make a decision about syntax and merge order.
targets:
$default:
builders:
some_package:
option_sets:
- debug
options:
foo: bar
release_options:
foo: baz
--define
optionsWhat if you want to only apply an option set in a specific mode though? Do we support debug_option_sets etc? lol
Allow builder to define a simple alias which represents multiple options. This would be an enhancement over release/dev option defaults.
Use case: To truly debug in prod mode we would need to set options on multiple builders. The Dart source cleanup would need to stop filtering out Dart files, and the dart2js archive extractor would need to stop filtering out the source map. Our instructions today recommend running without
--release
and enabling dart2js becaus it's a smaller amount to--define
, but it also means you're not getting release mode options for any other builder. We could allow both of these builders to agree on what the option aliasdebug
orkeep_source_maps
should mean and provide the right configuration for that intention.Configuration would look something like:
Usage looks like:
pub run build_runner build --release --define debug
Behind the scenes we'd merge in the options in the following order:
--define
options