-
If so, can the option be given globally so we don't have to define it for every target? These rules are awesome, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Writing outside of the output root is generally counter to Bazel's architecture, especially since rules may be run more than once if there are multiple configurations. e.g. if your build has two configurations (even just debug vs release), these two must write to separate files, otherwise you'll either end up with indetermined state in the file or Bazel will refuse to continue due to the same output path being produced by two different actions. What would be the use case for needing to write to an alternative location? |
Beta Was this translation helpful? Give feedback.
-
FWIW, this may be common desired since some people like to review generated code too, and as I mentioned, have their IDEs working correctly. Here is another example: cockroachdb/cockroach#58018 |
Beta Was this translation helpful? Give feedback.
Writing outside of the output root is generally counter to Bazel's architecture, especially since rules may be run more than once if there are multiple configurations.
e.g. if your build has two configurations (even just debug vs release), these two must write to separate files, otherwise you'll either end up with indetermined state in the file or Bazel will refuse to continue due to the same output path being produced by two different actions.
What would be the use case for needing to write to an alternative location?