build
build copied to clipboard
Please provide more explanatory error messages
[SEVERE] BuildDefinition: Conflicting outputs Both json_serializable:json_serializable and json_serializable:json_serializable may output tool/generador/cli.json_serializable.g.part. Potential outputs must be unique across all builders. See https://github.com/dart-lang/build/blob/master/docs/faq.md#why-do-builders-need-unique-outputs
That's the most common headache origin whenever I touch build.yaml Is it much work informing the user that that error was originated when adding X build target/source/etc, which is the same as that added before by Y in order to help a little bit more on touching the build.yaml?
Targets are definitely hard to get right today, I think possibly the simplest solution would be to disallow a source from being in more than one target, which covers the vast majority of these problems.
That would essentially make this error you get turn into some other error both targets x and y include source z, please remove it from one of them
.
Enforcing that adds its own complexity though, we would probably also go ahead and prevent cycles at the same time, which would mean enforcing correct deps between targets etc as well.
See also #2016