-
Notifications
You must be signed in to change notification settings - Fork 142
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
DataCloneError - requirements on nightly + build_std=std #1989
Comments
dannywillems
added a commit
to MinaProtocol/mina
that referenced
this issue
Jan 28, 2025
nightly has been initially removed as it seemed to make vendoring all the dependencies more complicated (which seems to not be the case though). However, removing nightly introduces issues like "DataCloneError", see o1-labs/o1js#1989, which makes the reliance on nightly inevitable. It seems that --offline works out of the box. Another note is that cargo vendor has been introduced to provide a consistent build environment for all platforms and all users, including the CI. The lockfile Cargo.lock is meant to provide a locked environment with all the dependencies, including the transitive ones. However, it is only used by binaries. In our build process, we do build a static library (libwires_15_stubs.a), not a binary. And Rust doesn't use the lockfile in this case. Another solution than `cargo vendor` would have been to strictly enforce the version in the top-level Cargo.toml, but it implies to add all the transitive dependencies (as otherwise, when a new transitive dependency is released, cargo will fetch it, making the environment inconsistent). This solution is not viable as the purpose of Cargo.toml is to enforce versions on direct dependencies only, and leave the cargo solver doing its job for the transitive dependencies. For these reasons, the solution of vendoring the dependencies to build the static library has been selected.
dannywillems
added a commit
to MinaProtocol/mina
that referenced
this issue
Jan 28, 2025
nightly has been initially removed as it seemed to make vendoring all the dependencies more complicated (which seems to not be the case though). However, removing nightly introduces issues like "DataCloneError", see o1-labs/o1js#1989, which makes the reliance on nightly inevitable. It seems that --offline works out of the box. Another note is that cargo vendor has been introduced to provide a consistent build environment for all platforms and all users, including the CI. The lockfile Cargo.lock is meant to provide a locked environment with all the dependencies, including the transitive ones. However, it is only used by binaries. In our build process, we do build a static library (libwires_15_stubs.a), not a binary. And Rust doesn't use the lockfile in this case. Another solution than `cargo vendor` would have been to strictly enforce the version in the top-level Cargo.toml, but it implies to add all the transitive dependencies (as otherwise, when a new transitive dependency is released, cargo will fetch it, making the environment inconsistent). This solution is not viable as the purpose of Cargo.toml is to enforce versions on direct dependencies only, and leave the cargo solver doing its job for the transitive dependencies. For these reasons, the solution of vendoring the dependencies to build the static library has been selected.
dannywillems
added a commit
to MinaProtocol/mina
that referenced
this issue
Jan 28, 2025
nightly has been initially removed as it seemed to make vendoring all the dependencies more complicated (which seems to not be the case though). However, removing nightly introduces issues like "DataCloneError", see o1-labs/o1js#1989, which makes the reliance on nightly inevitable. It seems that --offline works out of the box. Another note is that cargo vendor has been introduced to provide a consistent build environment for all platforms and all users, including the CI. The lockfile Cargo.lock is meant to provide a locked environment with all the dependencies, including the transitive ones. However, it is only used by binaries. In our build process, we do build a static library (libwires_15_stubs.a), not a binary. And Rust doesn't use the lockfile in this case. Another solution than `cargo vendor` would have been to strictly enforce the version in the top-level Cargo.toml, but it implies to add all the transitive dependencies (as otherwise, when a new transitive dependency is released, cargo will fetch it, making the environment inconsistent). This solution is not viable as the purpose of Cargo.toml is to enforce versions on direct dependencies only, and leave the cargo solver doing its job for the transitive dependencies. For these reasons, the solution of vendoring the dependencies to build the static library has been selected.
dannywillems
added a commit
to MinaProtocol/mina
that referenced
this issue
Jan 28, 2025
nightly has been initially removed as it seemed to make vendoring all the dependencies more complicated (which seems to not be the case though). However, removing nightly introduces issues like "DataCloneError", see o1-labs/o1js#1989, which makes the reliance on nightly inevitable. It seems that --offline works out of the box. Another note is that cargo vendor has been introduced to provide a consistent build environment for all platforms and all users, including the CI. The lockfile Cargo.lock is meant to provide a locked environment with all the dependencies, including the transitive ones. However, it is only used by binaries. In our build process, we do build a static library (libwires_15_stubs.a), not a binary. And Rust doesn't use the lockfile in this case. Another solution than `cargo vendor` would have been to strictly enforce the version in the top-level Cargo.toml, but it implies to add all the transitive dependencies (as otherwise, when a new transitive dependency is released, cargo will fetch it, making the environment inconsistent). This solution is not viable as the purpose of Cargo.toml is to enforce versions on direct dependencies only, and leave the cargo solver doing its job for the transitive dependencies. For these reasons, the solution of vendoring the dependencies to build the static library has been selected.
dannywillems
added a commit
to MinaProtocol/mina
that referenced
this issue
Jan 28, 2025
nightly has been initially removed as it seemed to make vendoring all the dependencies more complicated because some std lib must be included. However, removing nightly introduces issues like "DataCloneError", see o1-labs/o1js#1989, which makes the reliance on nightly inevitable. Removing --offline because stdlib missing for now (like `compiler_builtins`). Another note is that cargo vendor has been introduced to provide a consistent build environment for all platforms and all users, including the CI. The lockfile Cargo.lock is meant to provide a locked environment with all the dependencies, including the transitive ones. However, it is only used by binaries. In our build process, we do build a static library (libwires_15_stubs.a), not a binary. And Rust doesn't use the lockfile in this case. Another solution than `cargo vendor` would have been to strictly enforce the version in the top-level Cargo.toml, but it implies to add all the transitive dependencies (as otherwise, when a new transitive dependency is released, cargo will fetch it, making the environment inconsistent). This solution is not viable as the purpose of Cargo.toml is to enforce versions on direct dependencies only, and leave the cargo solver doing its job for the transitive dependencies. For these reasons, the solution of vendoring the dependencies to build the static library has been selected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I leave this issue open in case someone else encounter the same, or try to get rid of nightly.
While working on MinaProtocol/mina#16464, I got rid of nightly to build o1js, to use a single Rust version, and use
cargo vendor
. A direct consequence is to get rid of the unstable flags-Z build_std=std,abort
.However, this gives the following error:
See https://github.com/o1-labs/o1js/actions/runs/12995408239/job/36242047796?pr=1986 for instance.
The text was updated successfully, but these errors were encountered: