-
Notifications
You must be signed in to change notification settings - Fork 355
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
Avoid linking contract into contract #30
Comments
Hi Simon,
On 11/08/2020 16:48, Simon Warta wrote:
This makes sense, because as soon as you |use cw1_whitelist::|, you
export it's C exports. I don't think it is possible to link a contract
as a dependency of a contract.
Yes, this must be because we're importing and using parts of
cw1_whitelist into cw1_subkeys. I'll see if there's a way to do it
(basically, by importing smaller parts of it). If not, I'm afraid we'll
have to copy / duplicate cw1_whitelist functionality into cw1_subkeys.
Or maybe, refactor to separate the C exports from the implementation.
|
One way to get this working quickly would be to use a feature flag in cw1_whitelist like "disable_contract", to use the crate as a library. Then you conditionally compile |
Sounds good. Do you want to do it, or would you prefer I take a stab at it?
…On 11/08/2020 20:34, Simon Warta wrote:
One way to get this working quickly would be to use a feature flag in
cw1_whitelist like "disable_contract", to use the crate as a library.
Then you conditionally compile
|cosmwasm_std::create_entry_points!(contract);| only when
disable_contract is not set.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACY52VSMOFLBWCRTSYENUMLSAGFJZANCNFSM4P3DYNFQ>.
|
Go ahead! I just ran into this when trying to create production builds in the CI (#29). In order to do that, calls like
must work first |
Sure. Sorry I didn't try that before.
…On 11/08/2020 20:41, Simon Warta wrote:
Go ahead!
I just ran into this when trying to create production builds in the CI
(#29 <#29>). In order to
do that, calls like
|docker run --rm -v "$(pwd)":/code \ --mount
type=volume,source="cosmwasm_plus_cache",target=/code/target \ --mount
type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.9.0 ./contracts/cw1-subkeys |
must work first
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACY52VSYAXCXMUDOAF37WUTSAGGD3ANCNFSM4P3DYNFQ>.
|
No worries and no rush :) |
I thought the CI should catch this. Interestingly it runs I will update the CI to do the longer one, then dig into the fix. |
Interesting. Maybe there's a flag to suppress the issue in the release build too. With some consequences, probably... |
I would rather trigger it in debug build... |
On current master I tried:
which fails at link time with
This makes sense, because as soon as you
use cw1_whitelist::
, you export it's C exports. I don't think it is possible to link a contract as a dependency of a contract.The text was updated successfully, but these errors were encountered: