when a macro is executing, is there any way for it...
# general
s
when a macro is executing, is there any way for it to know the location of the caller in the repo? e.g., if i make a macro
foo
and call it in
src/boo/BUILD
, i'd like the macro to know that it's executing "in"
src/boo
. the use case is that i have a macro for shared libs and i want to configure defaults for python_tests.batch_compatibility_tag to put all tests in that lib into a single group. if this isn't possible then i'll just add a
name
parameter to the macro and use that
b
e
somewhat related: IIRC, relative paths in a macro are resolved relative to the build file where the macro is used
s
thank you!