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: Add version string to build artifacts #3156

Closed
wants to merge 5 commits into from

Conversation

kevaundray
Copy link
Contributor

Description

Related to #3130

Problem*

Resolves

Summary*

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench
Copy link
Member

To get there, we need to tag each json file with an extra field "noir_version" and possibly "acvm_version". When we compile, we can check if the artifact is already there and then check the noir_version. If the noir_version has changed, then we recompile.

This won't work as we'll fail inside serde before we check the versions. We should just remove the unwraps when deserializing circuits and then if it returns an error, we disregard the build artifact.

@kevaundray
Copy link
Contributor Author

This won't work as we'll fail inside serde before we check the versions. We sh

Good catch -- This PR would only deal with changes in Noir that do not modify serialization

@kevaundray
Copy link
Contributor Author

To get there, we need to tag each json file with an extra field "noir_version" and possibly "acvm_version". When we compile, we can check if the artifact is already there and then check the noir_version. If the noir_version has changed, then we recompile.

This won't work as we'll fail inside serde before we check the versions. We should just remove the unwraps when deserializing circuits and then if it returns an error, we disregard the build artifact.

modified it to return an error -- if there is an error, then there is no CachedProgram and the program should recompile -- I'll do some testing by installing nargo with the version before your serialization changes and then compile with this version with the old artifacts

Comment on lines 18 to +22
const BACKEND_IDENTIFIER: &str = "acvm-backend-barretenberg";

const NOIR_ARTIFACT_VERSION_STRING: &str =
concat!(env!("CARGO_PKG_VERSION"), "-", env!("GIT_COMMIT"));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two being here seems a bit odd -- I think versioning could probably go into the driver/nargo and then have it be shared between nargo_cli and wasm

@TomAFrench
Copy link
Member

Superceded by #3248

@TomAFrench TomAFrench closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants