-
Notifications
You must be signed in to change notification settings - Fork 242
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(cli): Try Prover.json if Prover.toml is not present #7170
base: master
Are you sure you want to change the base?
Conversation
1852697
to
f75e052
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the change for the info
command as well. We need it for profiling Brillig execution.
f75e052
to
2d79656
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conflicts with nargo check
which will ignore json files.
If we're accepting this as a first class input format we then also need to support it in the profiler also, etc. etc. |
I see that the If that's all it does, then I don't think it necessarily conflicts, it just doesn't create a JSON template at the moment. |
I think it conflicts if we're expecting users to have a |
Maybe I'm misunderstanding something, but the |
Yeah but if you then try and execute your program afterwards then |
Ah, by "soft overwrite" you meant shadowing, gotcha. Thanks for pointing out the profiler, I updated that to handle both formats. |
Updated |
To highlight some of the differences with working with the different formats, I transformed this JSON witness to TOML with https://transform.tools/json-to-toml ; here's a part of it as it's opened in my editor: Here's what a heavily hierarchical part looks like in JSON: The same in TOML as it's formatted by the tool: Luckily the tool indents the content to follow the nesting, but it's inconsistent: When I save the TOML in VSCode it gets rid of all indentation. Tried a setting in the plugin but it didn't make a difference, but I don't expect a uniform setting for everyone. Another thing I found work better in the JSON editing is the collapse of arrays. The TOML editor can collapse structs like the But there is no wrapper for the In JSON this is easy, so helps to explore the document and delete regions that aren't interesting for the test: To TOML's credit a collapsed record still shows its full path which is more useful than seeing those |
…f/cli-accept-json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20
.
Benchmark suite | Current: ce8ab2d | Previous: fc75298 | Ratio |
---|---|---|---|
noir-lang_noir_sort_ |
1 s |
0 s |
+∞ |
noir-lang_mimc_ |
1 s |
0 s |
+∞ |
AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob |
61 s |
50 s |
1.22 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Description
Problem*
Extracted from AztecProtocol/aztec-packages#11294
Summary*
The
debug
andexecute
CLI commands accept--program-dir
and a--prover-name
argument to specify where to look for the inputs for the circuit. The prover name isProver
by default, but we can't specify e.g.Prover.json
to make it take a JSON file, it always tries to useFormat::Toml
to parse it, which determines the.toml
extension.The PR changes commands that read
Prover.toml
to try bothFormat::Toml
andFormat::Json
(in that order), so that ifProver.toml
is not present butProver.json
is, then we use the latter.Additional Context
Ostensibly we could have a
--format
argument, but I found this useful when capturing the input witnesses from the TypeScript integration tests like here, and wanted to use it as-is to replicate the error like this, without having to go through more hoops.Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.