Happy new year! I read in the <docs> that: &gt; ...
# general
p
Happy new year! I read in the docs that:
If a codegen target such as
protobuf_sources
will be used in multiple Go modules, then you should use the
parametrize
built-in to parametrize that
protobuf_sources
target for each Go module.
I have a build working with a single Go module, but when I try to parametrize protobuf_sources for a second module:
Copy code
protobuf_sources(
    grpc=True,
    go_mod_address=parametrize(
        "src/khronos/service:service", 
        "src/cerberus/service:service",
    ),
    sources=["khronos.proto"],
)
I get an error:
Copy code
InvalidFieldException: Only fields which will be moved to generated targets may be parametrized, so target generator src/khronos/api/v1:v1 (with type protobuf_sources) cannot parametrize the 'go_mod_address' field.
Can anyone point me in the direction of what I'm doing wrong?
If anyone is curious, I gave up and switched to a single Go module for the entire repository. But I'm still curious as to why this didn't work!
n
running into the same error as above. is
Copy code
go_mod_address=parametrize(
        "src/khronos/service:service", 
        "src/cerberus/service:service",
    ),
not the correct usage of the parametrize builtin?