If you compile two contracts A and B where the B one imports the A, then A one will be built both as a contract and as a library.
As a consequence, the .wasm artifact for the A being built as a contract will be overwritten by the .wasm of A being built as a library. This means that there is no way to obtain A as a contract. This can be seen in the following workspace: https://github.com/osmosis-labs/osmosis/tree/main/x/ibc-hooks.
I think I know how to fix this, so I'll try to submit a PR when I have time, but leaving the issue here in case someone gets to it before me.
If you compile two contracts A and B where the B one imports the A, then A one will be built both as a contract and as a library.
As a consequence, the .wasm artifact for the A being built as a contract will be overwritten by the .wasm of A being built as a library. This means that there is no way to obtain A as a contract. This can be seen in the following workspace: https://github.com/osmosis-labs/osmosis/tree/main/x/ibc-hooks.
I think I know how to fix this, so I'll try to submit a PR when I have time, but leaving the issue here in case someone gets to it before me.