<@U06A03HV1> re. <https://github.com/pantsbuild/pa...
# development
a
@witty-crayon-22786 re. https://github.com/pantsbuild/pants/pull/16840#pullrequestreview-1107949840 — I have a trivial reproduction case. At first glance this looks like a bug
i.e. plugin fields registered in the global context show up in
RuleRunner
.
👀 1
—
./pants test src/python/pants/core/util_rules/environments_test.py
will fail because the plugin field is registered in
RuleRunner
w
Is it included in the "default" rules that a RuleRunner installs?
Python bootstrap likely is...
a
To be clear, the above change has nothing to do with Python bootstrap
w
Aren't the python bootstrap options the first/only ones included this way?
a
again, the above reproduction case has nothing to do with python bootstrap
h
python_bootstrap.py
is indeed always registered by
engine_initializer.py
and thus
RuleRunner
a
(give me 10-15 mins for another case)
(realised that I was installing the relevant rule in the test case)
👍 1
w
It might also ease things to hold off on actually marking any/many options in the first PR
👍 1
But whatever is easiest
a
@witty-crayon-22786 the only changes I’ve made are changing the fields that @hundreds-father-404 had already added to use the new facility
planning on adding the remaining options once the future work is addressed, but I’d like to get the current PR landed first
h
ahhhhh I think I get it now. @ancient-vegetable-10556 I don't think any of this is a bug or unexpected: 1. The PluginField rules are going to be registered with RuleRunner because
python_bootstrap.py
gets registered in
engine_initalizer.py
2. But, when we in the test manually create a
LocalEnvironment()
target, it does not have those plugin fields registered because it is using the "core class" -- it doesn't consider plugin fields The real solution is to use
rule_runner.get_target()
on the relevant Address, rather than manually creating the Target instance. Then, no need for this scrubbing stuff
a
let me see if I can make that work
@witty-crayon-22786 can you check https://github.com/pantsbuild/pants/pull/16840/commits/8ebe984ad6998fc02deba15a4b337992f1851b20 and see if you still have outstanding issues?
w
🚢
thanks!
a
thanks!