Concordium / concordium-smart-contract-tools

Tools for building, deploying, and interacting with smart contracts
Apache License 2.0
2 stars 8 forks source link

[cargo-concordium] Reproducible builds fail for contracts that .gitignore Cargo.lock #145

Closed lassemoldrup closed 8 months ago

lassemoldrup commented 10 months ago

When creating a reproducible build with the --verifiable flag, files that are .gitignored are not added to the docker image. This causes the build to fail in projects where Cargo.lock is ignored, which is recommended for library crates (https://github.com/rust-lang/cargo/issues/315). An example of this is any smart contract in the concordium-rust-smart-contracts repo.

We should decide whether this is acceptable or if we should make an exception for Cargo.lock.

abizjak commented 9 months ago

There are two things to say here

And additionally, the reason we don't commit the lock files for those example contracts is that they are examples, they are not meant as artifacts themselves.

So the only thing that should be done is to add those .ignore files so that reproducible builds also work out of the box for our examples.