When adding a new python tool, what do I need to d...
# development
h
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
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
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
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
Oh wait, I do already have that UnionRule
I just copied from another tool and cargo-culted
w
is the backend loaded by default?
h
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