build
build copied to clipboard
config: Validate value of `runs_before`
I set a value for runs_before
which I thought would work – but didn't.
If an invalid value is provided, please print a warning or fail the build!
Thinking about this there are scenarios where it might not be valid to error here - should it be a requirement that any runs_before
builders exist in the build graph? That doesn't allow you to write a builder which must run before some other builder, but only if that builder is present.
Some thoughts:
- We could potentially do the validation as a warning but only when it's the root package
build.yaml
- that way the author sees it but no one else. - We could detect the case where the package is present but not the builder. The cases where the builder doesn't exist should always be because the package doesn't exist right?
We could potentially do the validation as a warning but only when it's the root package build.yaml - that way the author sees it but no one else.
This might be ok - but still would have false positives :/
We could detect the case where the package is present but not the builder. The cases where the builder doesn't exist should always be because the package doesn't exist right?
Specifically the case that kevin ran into was doing runs_before: [_my_private_builder_name]
. In that case it was missing the leading |
so the package was _my_private_builder_name
which wouldn't exist and so we wouldn't catch this.