I've run into what seems like a slightly awkward macro hygiene problem.
What I want to do is:
- Workspace A defines a tool, and a macro for calling that tool (i.e. wrapping a genrule)
- Workspace B imports and uses that macro
But the macro is evaluated in the context of workspace B, so I don't see how it can unambiguously refer to the tool which lives in workspace A. It needs to use e.g. "@A//tools/macro.bzl", but how do I know my workspace is going to be imported as @A? Workspace B might want to import it under a different name, to resolve a namespace conflict.
Here's my specific example: https://github.com/iainmerrick/ink/commit/153b75808933883cd601494c2db64d79e8a999d9
Iain
--
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-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/99bc27ee-b886-4c99-90ea-0c0936d12f16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.