-
Notifications
You must be signed in to change notification settings - Fork 226
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!: Allow lowercase field type #3631
base: master
Are you sure you want to change the base?
Conversation
This is also breaking for files named field.nr since to import them you need to do something like |
* master: chore(docs): address visibility issues in docs (#3643) chore: type formatting (#3618) fix: Restrict fill_internal_slices pass to acir functions (#3634) chore(docs): docs for v0.19.4 (#3601) feat: aztec-packages (#3626) chore: Move tests to the correct root (#3633) feat: Implement integer printing (#3577) fix: corrected the formatting of error message parameters in index out of bounds error (#3630) chore: Update ACIR artifacts (#3619) chore(debugger): Run debugger REPL in thread (#3611) chore: remove deprecated method (#3625)
@TomAFrench given that we can see the changes needed and its potential ramifications, what are your thoughts on this? |
I think it's an ok change from the user's perspective. It's very unlikely that people are directly importing I'm good with merging this and just having I think we can let this PR sit for a little bit as there's no rush. |
That sounds reasonable and good to me! |
@TomAFrench should we rip this bandaid off? |
Yeah, I think so. |
* master: (440 commits) chore: remove duplicate `parse_all` function in wasm compiler (#4411) chore(ci): prevent msrv checks from blocking PRs (#4414) feat: expose separate functions to compile programs vs contracts in `noir_wasm` (#4413) chore: do not panic when dividing by zero (#4424) chore: remove unwanted prints (#4419) fix: remove print from monomorphization pass (#4417) chore(ssa): Remove mem2reg run before flattening (#4415) feat: Add HashMap to the stdlib (#4242) fix!: Ban Fields in for loop indices and bitwise ops (#4376) chore: Add #[recursive] Explainer to Documentation (#4399) feat(ci): Use wasm-opt when compiling wasm packages (#4334) fix: add handling to `noir_wasm` for projects without dependencies (#4344) chore: rename parameter 'filter' to 'level' in 'init_log_level' (#4403) chore!: bump msrv to 1.73.0 (#4406) chore: fix docker test workflows (#4308) chore: Update Vec docs (#4400) feat: update error message when trying to load workspace as dependency (#4393) chore: bump webpack dependencies (#4346) fix: correct invalid brillig codegen for `EmbeddedCurvePoint.add` (#4382) chore: remove dependency on generational-arena (#4207) ...
Let's do this after #4422 however so we can switch this repo over to using lowercase fields consistently though. |
* master: (144 commits) fix: correct ICE panic messages in brillig `convert_black_box_call` (#4761) chore(docs): Fix link in the Data Types page (#4527) chore(doc): Fix broken docs links (#4606) chore: Remove the old Value struct from the oracle docs (#4738) feat(nargo): Multiple circuits info for binary programs (#4719) chore: update condition for clearing warning comment on release PRs (#4739) chore(ci): fix cutting new versions of the docs (#4737) chore(ci): replace `yarn build:js:only` script (#4735) chore: update JS publish workflow to upload build artifacts correctly. (#4734) feat: add `remove_enable_side_effects` SSA pass (#4224) chore: update from vulnerable version of h2 (#4714) chore(ci): stop updating version list before cutting new docs version (#4726) chore: remove `FunctionInput::dummy` (#4723) chore: remove docker CI flow (#4724) fix: unknown slice lengths coming from as_slice (#4725) chore: remove unused env vars from `Cross.toml` (#4717) feat: improve nargo check cli with --override flag and feedback for existing files (#4575) feat: Allow slices to brillig entry points (#4713) chore: simplify how `acvm_backend.wasm` is embedded (#4703) fix(acvm): Mark outputs of Opcode::Call solvable (#4708) ...
* master: (39 commits) feat(experimental): Add `comptime` keyword (#4840) feat: add `min` and `max` functions to the stdlib (#4839) feat: Allow numeric generics to non inlined ACIR functions (#4834) chore!: Add `as_array` and remove `_slice` variants of hash functions (#4675) feat!: reserve keyword `super` (#4836) feat: simplify `BoundedVec::eq` (#4838) feat: Add comptime Interpreter (#4821) feat: Sync from aztec-packages (#4833) feat: implement `Eq` trait on `BoundedVec` (#4830) chore: add benchmarks for serializing a dummy program (#4813) chore: remove unnecessary casts in `BoundedVec` (#4831) fix: issue 4682 and add solver for unconstrained bigintegers (#4729) chore(docs): fix wrong Nargo.toml workspace examples (#4822) chore: delete unnecessary Prover.toml file (#4829) chore: fix alerts on rust msrv (#4817) chore(ci): fix alerts on msrv issues (#4816) chore: run clippy (#4810) chore: optimize poseidon2 implementation (#4807) fix: catch panics from EC point creation (e.g. the point is at infinity) (#4790) feat: Sync from aztec-packages (#4792) ...
We're not fully converting |
Changes to circuit sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
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.
I am thinking making "field" a reserved word would also help avoid errors from users using "field" as a variable name.
Or maybe we're fine with this breaking change? Not sure - we're still before 1.0 at least
@@ -220,6 +220,8 @@ impl super::FmtVisitor<'_> { | |||
self.push_rewrite(use_tree, span); | |||
self.last_position = span.end(); | |||
} | |||
|
|||
// TODO: rewrite instances of "Field" into "field" in these items. |
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.
Can you make an issue for this once this PR is merged?
@@ -1,38 +1,38 @@ | |||
mod bn254; // Instantiations of Poseidon for prime field of the same order as BN254 | |||
use crate::field::modulus_num_bits; | |||
use crate::field_element::modulus_num_bits; |
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.
Changing the import paths is my main worry in this PR.
Maybe we can make "field" just a reserved word / pseudo-keyword like "self" instead? That way we can still allow it in import paths. Alternatively I suppose it can stay a keyword but we'd have to change the parser to allow paths with field
in them.
Description
Related to #3535 . This is breaking for users who were using field as a variable or strruct name previously.
This is not breaking for all users because we still allow the uppercase variant. The formatter should rename this to lower case variant and overtime, I expect we can whean out the uppercase variant.
Problem*
Resolves
Summary*
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.