| 20 | # Shared generated-file marker text for Ruby generators — see scripts/generated_note_template.txt. |
| 21 | module GeneratedNote |
| 22 | def self.runfiles |
| 23 | @runfiles ||= begin |
| 24 | require 'bazel/runfiles' |
| 25 | Bazel::Runfiles.create |
| 26 | end |
| 27 | end |
| 28 | |
| 29 | # Resolves a Bazel rlocation key to a real path. Fail loud: a generator has no non-Bazel |
| 30 | # fallback, and rlocation returns nil when not running under a runfiles tree. |