build icon indicating copy to clipboard operation
build copied to clipboard

Configuration for a builder should not enable that builder

Open natebosch opened this issue 5 years ago • 5 comments

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."

natebosch avatar Apr 17 '19 21:04 natebosch

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.

natebosch avatar Apr 17 '19 21:04 natebosch

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.

jakemac53 avatar Apr 17 '19 21:04 jakemac53

And step 0 is make that dependency less heavy. Blocked by #2192

natebosch avatar Apr 18 '19 20:04 natebosch

Step 0 looks unblocked now 🤣 . Do we want to push on this? Close it?

jakemac53 avatar Sep 01 '23 18:09 jakemac53

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.

natebosch avatar Sep 06 '23 00:09 natebosch