Skip to content
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

feat: version compat checking in build #1791

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

feat: version compat checking in build #1791

wants to merge 10 commits into from

Conversation

nhtyy
Copy link
Collaborator

@nhtyy nhtyy commented Nov 14, 2024

Version checking the sp1-zkvm crate with the current toolchain to ensure compatibly.

Assumes that major/minor of sp1-zkvm and sp1-build matching implies compat, which would be inline if sp1-zkvm inherits workspace version in the future

edit: closes #1625

Copy link

github-actions bot commented Nov 14, 2024

SP1 Performance Test Results

Branch: n/version-check
Commit: f4e06bf
Author: nhtyy

program cycles execute (mHz) core (kHZ) compress (KHz) time success
fibonacci 11291 0.18 2.70 0.46 24s
ssz-withdrawals 2757356 17.16 128.42 35.21 1m18s
tendermint 12593597 6.69 267.25 98.86 2m9s

Copy link
Contributor

@yuwen01 yuwen01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://crates.io/crates/cargo-lock

Is there a reason we're parsing the cargo.lock by hand instead of using this crate?

crates/build/Cargo.toml Outdated Show resolved Hide resolved
crates/build/src/build.rs Outdated Show resolved Hide resolved
crates/build/src/build.rs Outdated Show resolved Hide resolved
crates/build/src/build.rs Outdated Show resolved Hide resolved
crates/build/src/build.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@yuwen01 yuwen01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just a small grammar thing

return Ok(());
}

// This might be a workspace, so we need optionally search parent dirs for lock files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: need to optionally search parent dirs for lock files.

@nhtyy nhtyy force-pushed the n/version-check branch 5 times, most recently from 04428f3 to 0094df9 Compare November 26, 2024 18:42
Copy link
Contributor

@yuwen01 yuwen01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some more spelling nits

/// - If the locked version of `sp1-sdk` is incompatible with the current toolchain version.
/// -
///
/// # Panics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: cant -> can't

return Ok(());
}

// This might be a workspace, need to optionally search parent dirs for lock files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit punc

lock_file.packages.iter().find(|p| p.name.as_str() == "sp1-sdk").map(|p| &p.version);

// Print these just to be useful.
// Most people will install the actual rust toolchain along with thier cargo-prove,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

lock_file.packages.iter().find(|p| p.name.as_str() == "sp1-sdk").map(|p| &p.version);

// Print these just to be useful.
// Most people will install the actual rust toolchain along with thier cargo-prove,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos:

Suggested change
// Most people will install the actual rust toolchain along with thier cargo-prove,
// Most people will install the actual rust toolchain along with their cargo-prove,

@nhtyy nhtyy added the next-release A PR or an issue that should resolved before the next major release label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-release A PR or an issue that should resolved before the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nicer error message when toolchain version and sp1-zkvm versions are incompatible
2 participants