I think I might be mis-understanding how RuleRunne...
# plugins
w
I think I might be mis-understanding how RuleRunner's work. If I create this fake BUILD file, and then run my pyoxidizer rule, should that automatically run the sources and distribution? Or do I need to explicitly add those rules as well to the fixture?
Copy code
python_sources(
                name="libtest"
            )
            python_distribution(
                name="test-dist",
                dependencies=[":libtest"],
                wheel=True,
                sdist=False,
                provides=python_artifact(
                    name="test-dist",
                    version="0.1.0",
                ),
            )
            pyoxidizer_binary(
                name="test-bin",
                entry_point="hellotest.main",
                dependencies=[":test-dist"],
            )
First, you must set up a 
RuleRunner
 instance and activate the rules and target types you'll use in your tests. Set the argument 
target_types
 with a list of the 
Target
 types used in in your tests, and set 
rules
 with a list of all the rules used transitively.
This means that you must register the rules you directly wrote, and also any rules that they depend on. Pants will automatically register some core rules for you, but leaves off most of them for better isolation of tests. If you're missing some rules, the rule graph will fail to be built.
From this, I would think that I have to add the targets and the rules, but for some reason, I don't appear to have a wheel created and passed to my binary target
e
You need to add the transitive subgraph of rules required. So there's that on its face, where omissions should lead to hard failure. Past hard failure, there is failure to include relevant union members.
I'd guess you're missing the latter. Union members that build packages for python (wheels).
w
Ahhhh, okay okay, thanks @enough-analyst-54434 - I got passed the rules to bypass the hard failure, but I might be missing a union rule.