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(nargo): Version info in nargo and wasm #802

Merged
merged 5 commits into from
Feb 15, 2023
Merged

Conversation

kobyhallx
Copy link
Contributor

Related issue(s)

#720 Version Hash in Nargo and wasm

Resolves #720

Description

Both Nargo and Wasm binary of noir compiler should allow to identify them based on compile time information.

Summary of changes

Adds compilation time git version hash, indication if it was build from dirty git tree.
Same applies to changes in WASM which exposes function to get this information.

Dependency additions / changes

N/A

Test additions / changes

N/A

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

Additional context

N/A

@TomAFrench
Copy link
Member

@kobyhallx When building fdfb71f locally I get many changes appearing in Cargo.lock compared to what's committed. Do you get this as well? We should ensure that CI fails appropriately in this case.

Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

Looks good, my main issue is with the lockfile atm.

crates/nargo/build.rs Outdated Show resolved Hide resolved
crates/nargo/src/cli/mod.rs Show resolved Hide resolved
Copy link
Contributor

@phated phated left a comment

Choose a reason for hiding this comment

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

Have we looked at https://crates.io/crates/build-info ? It says it separates the git deps out so they aren't being pulled in by build. It also has WAY more downloads than the build-data crate

@kobyhallx
Copy link
Contributor Author

Have we looked at https://crates.io/crates/build-info ? It says it separates the git deps out so they aren't being pulled in by build. It also has WAY more downloads than the build-data crate

build-info seems to bring runtime dependency though. Also build-data makes it more transparent how to escape in alternative build scenarios like with no git available in pure nix builds.

@phated phated self-requested a review February 15, 2023 17:19
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

LGTM

@kobyhallx kobyhallx added this pull request to the merge queue Feb 15, 2023
Merged via the queue into master with commit fd64be5 Feb 15, 2023
@kobyhallx kobyhallx deleted the kh/wasm-build-info branch February 15, 2023 18:56
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.

Nargo Version Hash
3 participants