Hello, I'm still stuck with my codegen plugin and ...
# general
r
Hello, I'm still stuck with my codegen plugin and my head hurts. I pushed an example what I do there: https://github.com/Gaasmann/monorepants There, there is some files that are under
py/projects/cards/ext-config/something
that will be used for generating files. The yaml files use the
tutu
plugin that is under
pants-plugins/
and I also added a .proto and a resource file not going through codegen for comparing. If I use
./pants export-codegen ::
everything is generated. If I use
./pants package ::
, the lambda only gets the .py generated from the .proto file and the resource file.
Copy code
% monorepants/dist/py.projects.cards% unzip -t lambda.zip
[...]
    testing: PEX-INFO                 OK
    testing: __main__.py              OK
    testing: ext-config/              OK
    testing: ext-config/something/    OK
    testing: ext-config/something/a-resource-file   OK
    testing: ext_config/              OK
    testing: ext_config/something/    OK
    testing: ext_config/something/something_pb2.py   OK
    testing: turbocorp/               OK
    testing: turbocorp/cards/         OK
    testing: turbocorp/cards/__init__.py   OK
    testing: turbocorp/cards/core/    OK
    testing: turbocorp/cards/core/__init__.py   OK
    testing: turbocorp/cards/core/deck.py   OK
    testing: turbocorp/cards/entrypoint.py   OK
    testing: turbocorp/cards/game.py   OK
    testing: LAMBDEX-INFO             OK
    testing: lambdex_handler.py       OK
No errors detected in compressed data of lambda.zip.
Does someone have an idea why my generated yaml files don't make it to the zip file?
1
f
r
oh, it works 🙂 🕺 So, should I put the type directly to
ResourceSourceField
or is this something I should derive from?
f
the pex packaging rule requests the engine provide both
PythonSourceField
and
ResourceSourceField
so anything that is convertible to either one of them can end up in a pex file
So, should I put the type directly to
ResourceSourceField
or is this something I should derive from?
just
ResourceSourceField
for now is probably fine.
r
Ok, I'll go that way then. Thanks a lot for your help. I was blocked for a long time on it 🙂