I’m in the process of open sourcing a new library that can run the state-machine-test infrastructure as a pre-built binary.
Switching to that library will decouple your project from the IC repo completely, which will not only resolve the warnings but also speed up compile time a lot.
I’ll report back once the library is available via crates.io.
The library is now available on crates.io. For inspiration on how to use it, you can take a look at the integration tests in the Internet Identity repository.
Be aware, that it takes a while for a new IC commit to have the pre-built binary available. So if it does not work for the latest commit on master, maybe try a few older commits.
Lastly, the client library is incomplete. I.e. it has not all the features of the test-state-machine yet, but the client library repository is open to contributions.
I hope this resolves your issues. Let me know if you run into problems.
Here’s a friendly suggestion. It would be really helpful if we could list the missing features of the library compared to ic-state-machine-tests in the readme and mark them as done as more get implemented.
Otherwise, looks good.
I’ll come back with issues/feedback once I’ve tried it out on a large repo that uses ic-state-machine-tests right now. Give me a couple of days
Calling the http_request query on a canister is already supported. There are no plans to include an actual HTTP gateway to that infrastructure. If you require that, it would need to be added externally.
I’m not sure about ECDSA support. I’ll ask internally.
You caught me being a bit lazy on the wrapper, sorry about that. There are two options here:
Expand the wrapper (i.e. create a PR) to provide an easy to use function to pass in the CanisterSettings similar to this function.
Manually issue a call to the ManagementCanister: I.e. you can send an UpdateCall to the ManagementCanister according to the interface spec here. I.e. do this:
I’m not sure about ECDSA support. I’ll ask internally.
Both HTTP outcalls and ECDSA signing would be possible to support, however there is no urgent need internally, so the priority is rather low unfortunately.
Are you talking about the STATE_MACHINE_BINARY? This is the file downloaded from https://download.dfinity.systems/ic/$commit/binaries/$platform/ic-test-state-machine.gz as later explained in the error message of this function
(which is the same as mentioned in the Readme here).
Given that the whole point of the binary is to decouple the client lib from the IC repository (and the bazel build process), I’d rather not reintroduce the dependency. Also, cargo is not really suited to distribute prebuilt binaries.
If you could try building the binary yourself directly from the IC repo, maybe you can get a version that runs on your machine?
The binaries downloaded from https://download.dfinity.systems are dynamically linked, and they have hardcoded library paths that may not exist on NixOS. Usually this can be fixed either by using patchelf on the downloaded binary itself, or by setting LD_LIBRARY_PATH. See Packaging/Binaries - NixOS Wiki for more explanation.