Hi all.
I'm trying to create tests that use config_settings in analysistest. But I experience a very annoying behavior, that may relate to the way we structure our repo (parent repo, and a nested repo - most of our code is in the nested repo, but almost all flows start from the root repo).
In the nested repo (@r2 in the example repo), I have a build-setting called css_processor_type. It has a target called @r2//starlark:css_processor_type. The default is set to postcss.
I created a few tests for the two possible values of the config-settings, plus one for the default value and another (failure) test for unknown value. Running these tests from the root repo works as expected. Running them from the nested repo (under r2/ folder) fails for the unknown and override values.
What I noticed is that when running the tests inside the nested repo (where the flag is being declared), Bazel reports the target without the @r2 prefix: <target //starlark:css_processor_type>
Example repo:
https://github.com/menny/test-config-bazel-repo (I used bazel 7.1.1 for the example).
It seems like a simple setup, so I may have did something wrong with the repos structure. Any help would be helpful.
thanks.