ancient-vegetable-10556
09/14/2022, 6:01 PMancient-vegetable-10556
09/14/2022, 6:02 PMRuleRunner.ancient-vegetable-10556
09/14/2022, 6:03 PMancient-vegetable-10556
09/14/2022, 6:04 PM./pants test src/python/pants/core/util_rules/environments_test.py will fail because the plugin field is registered in RuleRunnerwitty-crayon-22786
09/14/2022, 6:07 PMwitty-crayon-22786
09/14/2022, 6:07 PMancient-vegetable-10556
09/14/2022, 6:08 PMwitty-crayon-22786
09/14/2022, 6:10 PMancient-vegetable-10556
09/14/2022, 6:11 PMhundreds-father-404
09/14/2022, 6:14 PMpython_bootstrap.py is indeed always registered by engine_initializer.py and thus RuleRunnerancient-vegetable-10556
09/14/2022, 6:15 PMancient-vegetable-10556
09/14/2022, 6:16 PMwitty-crayon-22786
09/14/2022, 7:00 PMwitty-crayon-22786
09/14/2022, 7:00 PMancient-vegetable-10556
09/14/2022, 7:01 PMancient-vegetable-10556
09/14/2022, 7:05 PMhundreds-father-404
09/14/2022, 7:15 PMpython_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 stuffancient-vegetable-10556
09/14/2022, 7:34 PMancient-vegetable-10556
09/14/2022, 8:21 PMwitty-crayon-22786
09/14/2022, 8:27 PMwitty-crayon-22786
09/14/2022, 8:27 PMancient-vegetable-10556
09/14/2022, 8:27 PM