-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using voting
in lib-crate makes this lib export cw_core
functions on linux
#483
Comments
voting
in lib-crate makes this lib importing cw_core
on linuxvoting
in lib-crate makes this lib importing cw_core
export functions on linux
voting
in lib-crate makes this lib importing cw_core
export functions on linuxvoting
in lib-crate makes this lib export cw_core
functions on linux
thanks for reporting!
can we get around this by adding the library feature to the dao-contracts/packages/voting/Cargo.toml Line 15 in 693a5d6
|
Contracts being used by other packages/contracts as library dependencies has caused other problems (and likely will be a hard to debug landmine for future devs even once these are ironed out). The ones I know about:
Honestly, I think we should see how bad it is to just split out the shared library code out of the contracts and into packages. What do you think? I think its fine to keep them as dev-deps, and used by things that aren't depended on by other packages. |
@ezekiiel you are right it is enough, you can check |
@de-husk but I agree with you, IMO it's better to not use contracts as a dependency, should be easy to remove that dependency, it's only one function. What you think is the best solution? |
definitely think @de-husk is right here. :) the structure of having a package with the external api and the contract is slick. this would be a nice refactor to get in with the renaming work, but also adding library flags is fast 🤷♂️ |
This would be a good thing to get in before the v2 release. |
@Buckram123 is this still an issue since we switch to rust workspaces? |
Don't think so, updated this repo, still same issue, if I didn't miss anything. |
Closing. Feel free to re-open if it re-appears. |
Short description
So, what happened: we have a lib that wants to import
voting
, and then contract depend on that lib, what happens:cw-core gets imported (with everything)
Error
Minimal example
https://github.com/Buckram123/duplicate_example
This is minimal template from here: https://github.com/InterWasm/cw-template
One difference is here: https://github.com/Buckram123/duplicate_example/blob/57859b4e0997b7eba359b3da393ae55f2b563d30/duplicate-bug/src/msg.rs#L1
And instantiate method
Reproduce
To reproduce on my machine, simply run optimizer or just wasm
Version
rustc 1.63.0 (4b91a6ea7 2022-08-08), (optimizer uses 1.60.0)
5.19.8-arch1-1
The text was updated successfully, but these errors were encountered: