I have a module G that generates a conjure package from an IR X that registers an error. The module has an exported package E that imports the generated conjure package.
If, in another module H, I generate a new conjure package from IR X and import E, the same error gets registered twice: one from the conjure generated package of X for module H and once in the vendor directory from the conjure generated package of X for module G. This results in a panic.
What did you want to happen?
Vendored packages should be able to use conjure packages that registers errors without conflicts with non-vendored packages. In other words, you should be able to export a package that has an import path to a conjure generated package.
What happened?
In conjure-go errors can be registered with https://github.com/palantir/conjure-go-runtime/blob/develop/conjure-go-contract/errors/error_type_registry.go
I have a module
G
that generates a conjure package from an IRX
that registers an error. The module has an exported packageE
that imports the generated conjure package.If, in another module
H
, I generate a new conjure package from IRX
and importE
, the same error gets registered twice: one from the conjure generated package ofX
for moduleH
and once in the vendor directory from the conjure generated package ofX
for moduleG
. This results in a panic.What did you want to happen?
Vendored packages should be able to use conjure packages that registers errors without conflicts with non-vendored packages. In other words, you should be able to export a package that has an import path to a conjure generated package.