I tried with `protobuf_sources` and in that case, ...
# general
r
I tried with
protobuf_sources
and in that case, the result is added to the lambda. So I suspect my custom codegen module but I don't know where to look at. If I run
./pants export-codegen ::
, the files are generated at the right place, so I'm not sure why nothing is added to the lambda
h
We'd have to look at the relevant bits of the plugin code to figure it out, @fast-nail-55400 and @hundreds-father-404 are the top experts on this.
Presumably your rule is returning a
GeneratedSources
?
r
Correct
That said, I followed the doc about writing a codegen but I'm not sure to have understood everything. Especially the Request type of classes
I don't get why the generated code would correctly go under dist/codegen/my/path/generated/file.yaml but won't be included in the lambda.Is there something more to do than returning
GeneratedSources
with the Snapshot?
h
What path are you generating to? And is it correctly relative to a source root? (see
./pants roots
for the source roots in your repo)
r
I tried that, I don't think it works. + if I replace my target with a
resources
or
protobuf_sources
one, the files are included. That said, on this idea, if I have a path like
py/projects/myproject/src/myproject/conf/
with my yaml files, with the generated result on
py/projects/myproject/src/myproject/conf/generated
and a source root on
py/projects/myproject/src
, should the path on the Snapshot on
GeneratedSources
be
myproject/conf/generated/myyaml.yaml
?