build
build copied to clipboard
Configuration for a builder should not enable that builder
It felt redundant at the time to force enabled: true
to turn on a builder, but it turns out that this magic cause some nasty stuff - builders like build_web_compilers:entrypoint
start getting turned on for packages other than the root just because someone configured a generate_for
or dart2js_args
or something.
Changing this would be breaking and it's hard to know how bad the fallout would be.
There isn't currently the capability to express "configure a builder, but only if it would have run anyway."
In theory we could call this a breaking change on build_config
and packages that are doing the "right" think and have a dependency on that package whenever they use build.yaml
would be safe - but in practice very few packages are likely doing that.
I think step 1 here as we discussed offline is to start complaining if people have a build.yaml
but no direct build_config
dependency.
And step 0 is make that dependency less heavy. Blocked by #2192
Step 0 looks unblocked now 🤣 . Do we want to push on this? Close it?
I think this one is valid as a long-term backlog "next-breaking-release" issue.
I don't think it is worth a breaking change to solve only this issue. If some other use case for a breaking change in the build.yaml
format comes up though, I do think it would be worth changing these semantics at the same time.