-
Notifications
You must be signed in to change notification settings - Fork 61
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
Adapt rust optimizer for cosmwasm-plus #18
Comments
Yes, I've ran into that issue. If I recall correctly, a possible way to solve it is to add a That way you return to the previous directory (which has no effect when there's no previous dir) and the Update: this only has to be done when the contract is in a workspace. So, a way to detect that (or better, the location of the target directory) would be needed. |
This mode is for the development contracts in the cosmwasm repo. Here we have the case that we parts of the source code live in ./../.. but otherwise this is like the first case. in
I see, this line is the problem: https://github.com/CosmWasm/rust-optimizer/blob/v0.9.0/optimize.sh#L18.
Yeah, we can either pass the target dir as a parameter. The other way would be to use |
It occurs to me that a way that is simple (though a little bit limited) would be to grep for Better and more robust than looking for |
I added another script that does exactly what I want for the cosmwasm-plus case (and may be useful for other monorepos). Can you take a look at #19? |
I started on some unified script, but figured better not to break existing code and 3 cases seemed a bit much to handle in a bash script. |
We currently support two modes:
cosmwasm-examples
, where each contract is not in the workspaceHowever, it fails when we try to build
cosmwasm-plus
:There are two key differences here that cause the build error:
*.wasm
will not be unique, but we need the name of the contract we compile.Output of a failed build (see bottom):
That failed as it looked for
/code/contracts/cw1-subkeys/target
not/code/target
The text was updated successfully, but these errors were encountered: