--override_repository relative to workspace root

71 views
Skip to first unread message

Kirill Zabelin

unread,
Apr 14, 2022, 11:42:07 AM4/14/22
to bazel-...@googlegroups.com
Hello!

We are trying to use --override_repository option to use some local rules instead of getting them from upstream (for example rules_cc, etc) and we don't want to change WORKSPACE file to set them up (via local_repository), just want to be able to configure it via flags in .bazelrc.
But --override_repository requires an absolute path (which may differ on different machines).
These repositories are under the main WORKSPACE tree.

Is it possible to use some variable/template in bazelrc file to get path to WORKSPACE root? Or some other ways to do it?

It seems that %workspace% works only for imports and some other specific flags :(

Thanks,
Kirill

Keith Smiley

unread,
Apr 14, 2022, 1:34:18 PM4/14/22
to Kirill Zabelin, bazel-...@googlegroups.com
I think you'd have to change the WORKSPACE. What's the issue with doing that?
--
Keith Smiley


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CALFCR5Pr5SHdnQ66Ygj_FX58UU7EM3VSRRPcMKSuKxP%3De%2BN3-A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages