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

chore: format all files (incl .nr) #5

Merged
merged 8 commits into from
Jul 2, 2024
Merged

chore: format all files (incl .nr) #5

merged 8 commits into from
Jul 2, 2024

Conversation

sripwoud
Copy link
Member

@sripwoud sripwoud commented Jun 28, 2024

Closes #2

This PR:

  • sets up dprint to format all files
  • format all files
  • modifies the tests workflow
    • renames it to main
    • includes a style check
    • removes the node install and deps install in the tests job

.dprint.jsonc Show resolved Hide resolved
.dprint.jsonc Show resolved Hide resolved
@sripwoud sripwoud marked this pull request as ready for review June 28, 2024 09:47
@sripwoud sripwoud self-assigned this Jun 28, 2024
@sripwoud sripwoud added devops 🔧 Operations management and dev tools dependencies 📦 Improvements or additions to documentation labels Jun 28, 2024
@sripwoud sripwoud marked this pull request as draft June 28, 2024 09:55
@sripwoud sripwoud force-pushed the chore/fmt-lint branch 2 times, most recently from 371c810 to b18a435 Compare June 28, 2024 09:59
@sripwoud sripwoud marked this pull request as ready for review June 28, 2024 09:59
@sripwoud sripwoud changed the title chore: format all files (incl `.nr) chore: format all files (incl .nr) Jun 28, 2024
@signorecello
Copy link
Collaborator

Thanks! This looks slick! When I have some time, I'll remove nargo altogether since we can use bb.js directly to fetch the solidity verifier, so pretty much everything can go in hardhat tasks or node scripts

@sripwoud
Copy link
Member Author

Oh I didn't know about bb.js.
Do you mean in this case it is not useful to have this merkle_trees Noir package anymore?
It is basically the whole content of this repo.

@sripwoud
Copy link
Member Author

@signorecello should we merge this nonetheless?

@signorecello
Copy link
Collaborator

It's definitely still useful, as BB.JS is just a TS interface to Barretenberg (which is C++ compiled to WASM). It doesn't provide any Noir circuits, it doesn't understand Noir at all hehe.

As for the nargofmt command, I checked with the team and apparently it was done by a grantee some time ago, before we had impl and traits, but there's no availability from the team to open this pandora's box now. Could be tackled by another grantee I suppose!

In any case using rustfmt seems like a great workaround. Let's merge it 😈

.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@cedoor
Copy link
Member

cedoor commented Jul 2, 2024

@sripwoud @signorecello
OT: I wonder if we should use Node in this repo. Is it worth it? Or is it better a Rust env?

@sripwoud
Copy link
Member Author

sripwoud commented Jul 2, 2024

@sripwoud @signorecello OT: I wonder if we should use Node in this repo. Is it worth it? Or is it better a Rust env?

based on the docs, deps with noir are rather managed with git urls "a la rust".
See
https://noir-lang.org/docs/noir/modules_packages_crates/dependencies/#specifying-a-dependency

So using node sounds useless to me here. Should I make this change in this PR or separately?

@sripwoud sripwoud requested a review from cedoor July 2, 2024 10:45
@cedoor
Copy link
Member

cedoor commented Jul 2, 2024

So using node sounds useless to me here.

I agree, removing Node means some tools will not be supported anymore tho (e.g. czg, changelogithub), but that's fine..

Should I make this change in this PR or separately?

Maybe a new PR would be better!

@sripwoud
Copy link
Member Author

sripwoud commented Jul 2, 2024

I agree, removing Node means some tools will not be supported anymore tho (e.g. czg, changelogithub), but that's fine..

oh right
I rather meant have packages/merkle_trees node-free. But it is already 😅

If the node dev deps are only at the root level it is fine imo actually.
Otherwise we ll need to find an alternative to make sure all this is setup (linting commits etc...)

@sripwoud sripwoud merged commit e9df1bf into main Jul 2, 2024
3 checks passed
@sripwoud sripwoud deleted the chore/fmt-lint branch July 2, 2024 11:31
@cedoor
Copy link
Member

cedoor commented Jul 2, 2024

@sripwoud

If the node dev deps are only at the root level it is fine imo actually.

The question is, are devs who use Noir more familiar with Rust or Node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Improvements or additions to documentation devops 🔧 Operations management and dev tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: include nargo files in the lint and format checks
3 participants