stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
59 stars 40 forks source link

fix rust-version compilation issue #1335

Closed sisuresh closed 5 months ago

sisuresh commented 6 months ago

What

Trying to regenerate the test wasms results in the following error.

error: failed to parse manifest at `/Users/siddharthsuresh/dev/rs-soroban-env/soroban-test-wasms/wasm-workspace/write_upgrade_bytes/Cargo.toml`

Caused by:
  error inheriting `rust_version` from workspace root manifest's `workspace.package.rust_version`

Caused by:
  `workspace.package.rust-version` was not defined

I think the issue has something to do with the limitations with workspace inheritance, but I'm not really sure. @leighmcculloch please let me know if you know of a better solution than just setting the version again explicitly in each test wasm.

dmkozh commented 6 months ago

Trying to regenerate the test wasms results in the following error.

I just wanted to remind that we should not regenerate Wasms for protocol 20 anymore (unless it's necessary to modify them) - I suppose these are necessary to generate p21 Wasms, right?

sisuresh commented 6 months ago

Trying to regenerate the test wasms results in the following error.

I just wanted to remind that we should not regenerate Wasms for protocol 20 anymore (unless it's necessary to modify them) - I suppose these are necessary to generate p21 Wasms, right?

Yeah that's why I didn't commit the regenerated wasm files. If we want to regenerate for v21, we'll run into the issue mentioned here.

leighmcculloch commented 6 months ago

I think the issue has something to do with the limitations with workspace inheritance, but I'm not really sure. @leighmcculloch please let me know if you know of a better solution than just setting the version again explicitly in each test wasm.

I don't think there's anyway to pull this from the top-level workspace, but you could add it as a property of the wasm-workspace and have the projects reference it. At least then it would only be in two places.