Error when using `concordium-smart-contract-testing` version `3`

Hello, We are developing a project in concordium : concordium-rwa
The related code is present publicly in the development branch of the repo : GitHub - chainorders/concordium-rwa at development

The issue is with the line

Which basically just tries to add

# [dev-dependencies]
# concordium-smart-contract-testing = { version = "3.2.0" }

on un-commenting the dependency the contract build fails with the error

Error: Could not build smart contract.

Caused by:
    0: Could not build module schema.
    1: Could not generate module schema from Wasm module.
    2: Unknown value type byte 0x7d
error Command failed with exit code 1.

and build succeeds with un-commenting
What could be wrong?

You are using the old resolver which unifies features in dev-dependencies and dependencies, which is why you are getting this problem (your contract is compiled with derive-serde, quickcheck and other features).

You should set

resolver = "2"

into your workspace Cargo.toml.

I would recommend not using workspaces alltogether since dependency resolution is a bit more tricky. In particular the way you set things up you already get build warnings that your options are ineffective

warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/abizjak/tmp/concordium-rwa/contracts/Cargo.toml
workspace: /home/abizjak/tmp/concordium-rwa/Cargo.toml
warning: /home/abizjak/tmp/concordium-rwa/contracts/Cargo.toml: `default-features` is ignored for concordium-cis2, since `default-features` was not specified for `workspace.dependencies.concordium-cis2`, this could become a hard error in the future
warning: /home/abizjak/tmp/concordium-rwa/contracts/Cargo.toml: `default-features` is ignored for concordium-std, since `default-features` was not specified for `workspace.dependencies.concordium-std`, this could become a hard error in the future

These should be fixed. The easiest is to just not have a workspace since you have one library only.