https://pantsbuild.org/ logo
#development
Title
# development
h

happy-kitchen-89482

05/03/2022, 11:40 PM
When adding a new python tool, what do I need to do to get
./build-support/bin/generate_all_lockfiles.sh
to recognize it? I'm using it in a registered rule, I've added it to the AllTools list, it's set up just like every other tool, but I get
Unrecognized resolve name from the option
--generate-lockfiles-resolve`
h

hundreds-father-404

05/03/2022, 11:41 PM
you added?
Copy code
UnionRule(GenerateToolLockfileSentinel, BlackLockfileSentinel),
        UnionRule(ExportPythonToolSentinel, BlackExportSentinel),
(second is only relevant if it should be exported)
how about updating
init/BUILD
?
h

happy-kitchen-89482

05/03/2022, 11:44 PM
Oh I may have missed the UnionRule
But surely that is just for export?
Oh, there is one for lockfiles as well
I don't understand the sentinel thing TBH
h

hundreds-father-404

05/03/2022, 11:45 PM
give a lookie at generate_lockfiles.py. It is some wild union magic
a bit hard to follow, but I'm proud of myself I got it to work hehe
h

happy-kitchen-89482

05/03/2022, 11:46 PM
Oh wait, I do already have that UnionRule
I just copied from another tool and cargo-culted
w

witty-crayon-22786

05/03/2022, 11:51 PM
is the backend loaded by default?
h

happy-kitchen-89482

05/04/2022, 12:15 AM
Yeah, it's in the python backend
ok figured it out
had to register the subsystem rules explicitly, collect_rules() in the using file doesn't pick them up
my bad