From daee27e01014743b4c2ab79b98474bbfdb325739 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 9 Jan 2024 12:46:30 +0000 Subject: [PATCH] chore: improve cspell setup --- CHANGELOG.md | 6 +- acvm-repo/CHANGELOG.md | 8 +- acvm-repo/acir/CHANGELOG.md | 4 +- acvm-repo/acir/acir_docs.md | 6 +- .../src/native_types/expression/operators.rs | 4 +- acvm-repo/acvm/CHANGELOG.md | 8 +- aztec_macros/src/lib.rs | 2 +- .../src/brillig/brillig_ir/entry_point.rs | 4 +- .../src/ssa/function_builder/data_bus.rs | 4 +- compiler/noirc_evaluator/src/ssa/ir/dfg.rs | 4 +- compiler/noirc_evaluator/src/ssa/opt/die.rs | 2 +- .../noirc_evaluator/src/ssa/opt/unrolling.rs | 2 +- .../src/hir/resolution/resolver.rs | 2 +- compiler/noirc_frontend/src/hir_def/types.rs | 2 +- compiler/utils/iter-extended/src/lib.rs | 2 +- cspell.json | 30 +- docs/docs/noir/standard_library/traits.md | 2 +- package.json | 2 + tooling/backend_interface/CHANGELOG.md | 2 +- tooling/backend_interface/src/lib.rs | 2 +- tooling/nargo/src/lib.rs | 12 +- tooling/noirc_abi/src/input_parser/mod.rs | 4 +- yarn.lock | 779 +++++++++++++++++- 23 files changed, 834 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3f6b02245..3fc044076a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,13 +58,13 @@ * Allow trait method references from the trait name ([#3774](https://github.com/noir-lang/noir/issues/3774)) ([cfa34d4](https://github.com/noir-lang/noir/commit/cfa34d4d913dbd35f8329430e0d58830e069d6ff)) * Deserialize odd length hex literals ([#3747](https://github.com/noir-lang/noir/issues/3747)) ([4000fb2](https://github.com/noir-lang/noir/commit/4000fb279221eb07187d657bfaa7f1c7b311abf2)) * **docs:** Trigger `update-docs` workflow when the `release-please` PR gets merged and not on every merge to master ([#3677](https://github.com/noir-lang/noir/issues/3677)) ([9a3d1d2](https://github.com/noir-lang/noir/commit/9a3d1d2cf647cd583344f8da122fed1acbca9397)) -* Initialise strings as u8 array ([#3682](https://github.com/noir-lang/noir/issues/3682)) ([8da40b7](https://github.com/noir-lang/noir/commit/8da40b75a36ebac51d5377311db3c55fa339dcac)) +* Initialize strings as u8 array ([#3682](https://github.com/noir-lang/noir/issues/3682)) ([8da40b7](https://github.com/noir-lang/noir/commit/8da40b75a36ebac51d5377311db3c55fa339dcac)) * **lsp:** Package resolution on save ([#3794](https://github.com/noir-lang/noir/issues/3794)) ([14f2fff](https://github.com/noir-lang/noir/commit/14f2fffeb3de5f653c11694ee3c5e5d62aaa34ec)) * Parse negative integer literals ([#3698](https://github.com/noir-lang/noir/issues/3698)) ([463ab06](https://github.com/noir-lang/noir/commit/463ab060075db1915127c3f6cef11bfed9d40109)) * Pub is required on return for entry points ([#3616](https://github.com/noir-lang/noir/issues/3616)) ([7f1d796](https://github.com/noir-lang/noir/commit/7f1d7968368734e02b152e2e907dc7af9e1604c8)) * Remove `noirc_driver/aztec` feature flag in docker ([#3784](https://github.com/noir-lang/noir/issues/3784)) ([a48d562](https://github.com/noir-lang/noir/commit/a48d562b59aa2009a9c9b65dd71e11cdd8d06cf0)) * Remove include-keys option ([#3692](https://github.com/noir-lang/noir/issues/3692)) ([95d7ce2](https://github.com/noir-lang/noir/commit/95d7ce21016e3603bf279efb970536ad32d89a3a)) -* Revert chnage to modify version in workspace file for acvm dependencies ([#3673](https://github.com/noir-lang/noir/issues/3673)) ([0696f75](https://github.com/noir-lang/noir/commit/0696f755364293bcc7ebc7a0def0dcafede2e543)) +* Revert change to modify version in workspace file for acvm dependencies ([#3673](https://github.com/noir-lang/noir/issues/3673)) ([0696f75](https://github.com/noir-lang/noir/commit/0696f755364293bcc7ebc7a0def0dcafede2e543)) * Sequence update-lockfile workflow so it gets modified after the ACVM version in the root has been changed ([#3676](https://github.com/noir-lang/noir/issues/3676)) ([c00cd85](https://github.com/noir-lang/noir/commit/c00cd8537836f8e4d8559b01d16dfdd1b5cad519)) * **ssa:** Handle array arguments to side effectual constrain statements ([#3740](https://github.com/noir-lang/noir/issues/3740)) ([028d65e](https://github.com/noir-lang/noir/commit/028d65ea71f9c11e69784d06e0f9768668455f83)) * Stop cloning Traits! ([#3736](https://github.com/noir-lang/noir/issues/3736)) ([fcff412](https://github.com/noir-lang/noir/commit/fcff412bb39a04a5c88506ae5a5ee2fbdefd93ef)) @@ -1458,7 +1458,7 @@ * **acvm:** Update to acvm 0.4.1 ([#779](https://github.com/noir-lang/noir/issues/779)) ([6f57e86](https://github.com/noir-lang/noir/commit/6f57e86c3d51191aa516a3b9315337b925810433)) * **ci:** Add concurrency group for rust workflow ([#806](https://github.com/noir-lang/noir/issues/806)) ([1b80f55](https://github.com/noir-lang/noir/commit/1b80f559599c2a7d7b8697f42f63db8e59d318c5)) -* **ci:** Add concurreny group for rust workflow ([1b80f55](https://github.com/noir-lang/noir/commit/1b80f559599c2a7d7b8697f42f63db8e59d318c5)) +* **ci:** Add concurrency group for rust workflow ([1b80f55](https://github.com/noir-lang/noir/commit/1b80f559599c2a7d7b8697f42f63db8e59d318c5)) * **ci:** Build binaries when a release is made ([#773](https://github.com/noir-lang/noir/issues/773)) ([a0c0c2c](https://github.com/noir-lang/noir/commit/a0c0c2c354b50c80eba425ba2f8c235015696c35)) * Impls with generics ([#798](https://github.com/noir-lang/noir/issues/798)) ([bea735d](https://github.com/noir-lang/noir/commit/bea735d98e162f42df5957781638101c1e6c75f6)) * **nargo:** add flag to verify created proofs ([#737](https://github.com/noir-lang/noir/issues/737)) ([e981c7c](https://github.com/noir-lang/noir/commit/e981c7ca0ab23073339869a7d45c04ae10fe1adf)) diff --git a/acvm-repo/CHANGELOG.md b/acvm-repo/CHANGELOG.md index 4dc900d87a8..d413bd390c4 100644 --- a/acvm-repo/CHANGELOG.md +++ b/acvm-repo/CHANGELOG.md @@ -648,7 +648,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features -* add optimisations to fallback black box functions on booleans ([#446](https://github.com/noir-lang/acvm/issues/446)) ([2cfb2a8](https://github.com/noir-lang/acvm/commit/2cfb2a8cf911a81eedbd9da13ab2c616abd67f83)) +* add optimizations to fallback black box functions on booleans ([#446](https://github.com/noir-lang/acvm/issues/446)) ([2cfb2a8](https://github.com/noir-lang/acvm/commit/2cfb2a8cf911a81eedbd9da13ab2c616abd67f83)) * **stdlib:** Add fallback implementation of `Keccak256` black box function ([#445](https://github.com/noir-lang/acvm/issues/445)) ([f7ebb03](https://github.com/noir-lang/acvm/commit/f7ebb03653c971f119700ff8126d9eb5ff01be0f)) ## [0.20.0](https://github.com/noir-lang/acvm/compare/root-v0.19.1...root-v0.20.0) (2023-07-20) @@ -718,7 +718,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Miscellaneous Chores -* **acvm:** Remove `CircuitSimplifer` ([#421](https://github.com/noir-lang/acvm/issues/421)) ([e07a56d](https://github.com/noir-lang/acvm/commit/e07a56d9c542a7f03ce156761054cd403de0bd23)) +* **acvm:** Remove `CircuitSimplifier` ([#421](https://github.com/noir-lang/acvm/issues/421)) ([e07a56d](https://github.com/noir-lang/acvm/commit/e07a56d9c542a7f03ce156761054cd403de0bd23)) ## [0.17.0](https://github.com/noir-lang/acvm/compare/root-v0.16.0...root-v0.17.0) (2023-07-07) @@ -1114,7 +1114,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **acir:** make PublicInputs use a BTreeSet rather than Vec ([#99](https://github.com/noir-lang/acvm/issues/99)) * refactor ToRadix to ToRadixLe and ToRadixBe ([#58](https://github.com/noir-lang/acvm/issues/58)) * **acir:** Add keccak256 Opcode ([#91](https://github.com/noir-lang/acvm/issues/91)) -* reorganize compiler in terms of optimisers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) +* reorganize compiler in terms of optimizers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ### Features @@ -1138,7 +1138,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Miscellaneous Chores * refactor ToRadix to ToRadixLe and ToRadixBe ([#58](https://github.com/noir-lang/acvm/issues/58)) ([2427a27](https://github.com/noir-lang/acvm/commit/2427a275048e598c6d651cce8348a4c55148f235)) -* reorganize compiler in terms of optimisers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ([9329307](https://github.com/noir-lang/acvm/commit/9329307e054de202cfc55207162ad952b70d515e)) +* reorganize compiler in terms of optimizers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ([9329307](https://github.com/noir-lang/acvm/commit/9329307e054de202cfc55207162ad952b70d515e)) ## [0.4.1] - 2023-02-08 diff --git a/acvm-repo/acir/CHANGELOG.md b/acvm-repo/acir/CHANGELOG.md index 6551fc85262..661980a87c9 100644 --- a/acvm-repo/acir/CHANGELOG.md +++ b/acvm-repo/acir/CHANGELOG.md @@ -507,7 +507,7 @@ * **acir:** make PublicInputs use a BTreeSet rather than Vec ([#99](https://github.com/noir-lang/acvm/issues/99)) * refactor ToRadix to ToRadixLe and ToRadixBe ([#58](https://github.com/noir-lang/acvm/issues/58)) * **acir:** Add keccak256 Opcode ([#91](https://github.com/noir-lang/acvm/issues/91)) -* reorganize compiler in terms of optimisers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) +* reorganize compiler in terms of optimizers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ### Features @@ -518,4 +518,4 @@ ### Miscellaneous Chores * refactor ToRadix to ToRadixLe and ToRadixBe ([#58](https://github.com/noir-lang/acvm/issues/58)) ([2427a27](https://github.com/noir-lang/acvm/commit/2427a275048e598c6d651cce8348a4c55148f235)) -* reorganize compiler in terms of optimisers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ([9329307](https://github.com/noir-lang/acvm/commit/9329307e054de202cfc55207162ad952b70d515e)) +* reorganize compiler in terms of optimizers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ([9329307](https://github.com/noir-lang/acvm/commit/9329307e054de202cfc55207162ad952b70d515e)) diff --git a/acvm-repo/acir/acir_docs.md b/acvm-repo/acir/acir_docs.md index a124bfbc37f..801aeac1140 100644 --- a/acvm-repo/acir/acir_docs.md +++ b/acvm-repo/acir/acir_docs.md @@ -187,10 +187,10 @@ However, in order to write these opcodes we need the result of the division whic In summary, solving a Brillig opcode performs the computation defined by its bytecode, on the provided inputs, and assign the result to the outputs witnesses, without adding any constraint. ### Directive -This opcode is a specialisation of Brillig opcode. Instead of having some generic assembly code like Brillig, a directive has a hardcoded name which tells the solver which computation to do: with Brillig, the computation refers to the compiled bytecode of an unconstrained Noir function, but with a directive, the computation is hardcoded inside the compiler. Directives will be replaced by Brillig opcodes in the future. +This opcode is a specialization of Brillig opcode. Instead of having some generic assembly code like Brillig, a directive has a hardcoded name which tells the solver which computation to do: with Brillig, the computation refers to the compiled bytecode of an unconstrained Noir function, but with a directive, the computation is hardcoded inside the compiler. Directives will be replaced by Brillig opcodes in the future. ### MemoryOp: memory abstraction for ACIR -ACIR is able to address any array of witnesses. Each array is assigned an id (BlockId) and needs to be initialised with the MemoryInit opcode. Then it is possible to read and write from/to an array by providing the index and the value we read/write, as arithmetic expression. Note that ACIR arrays all have a known fixed length (given in the MemoryInit opcode below) +ACIR is able to address any array of witnesses. Each array is assigned an id (BlockId) and needs to be initialized with the MemoryInit opcode. Then it is possible to read and write from/to an array by providing the index and the value we read/write, as arithmetic expression. Note that ACIR arrays all have a known fixed length (given in the MemoryInit opcode below) - block_id: identifier of the array - op: describe the memory operation to perform - operation: constant expression having value 1 for a write to memory and 0 for a read @@ -199,7 +199,7 @@ ACIR is able to address any array of witnesses. Each array is assigned an id (Bl - predicate: an arithmetic expression that disable the opcode when it is null. ### MemoryInit -Initialise an ACIR array from a vector of witnesses. +Initialize an ACIR array from a vector of witnesses. - block_id: identifier of the array - init: Vector of witnesses specifying the initial value of the arrays diff --git a/acvm-repo/acir/src/native_types/expression/operators.rs b/acvm-repo/acir/src/native_types/expression/operators.rs index 35a548a2e3f..29cdc6967bb 100644 --- a/acvm-repo/acir/src/native_types/expression/operators.rs +++ b/acvm-repo/acir/src/native_types/expression/operators.rs @@ -230,7 +230,7 @@ fn single_mul(w: Witness, b: &Expression) -> Expression { } #[test] -fn add_smoketest() { +fn add_smoke_test() { let a = Expression { mul_terms: vec![], linear_combinations: vec![(FieldElement::from(2u128), Witness(2))], @@ -260,7 +260,7 @@ fn add_smoketest() { } #[test] -fn mul_smoketest() { +fn mul_smoke_test() { let a = Expression { mul_terms: vec![], linear_combinations: vec![(FieldElement::from(2u128), Witness(2))], diff --git a/acvm-repo/acvm/CHANGELOG.md b/acvm-repo/acvm/CHANGELOG.md index 2a340f649f5..48d8317a80e 100644 --- a/acvm-repo/acvm/CHANGELOG.md +++ b/acvm-repo/acvm/CHANGELOG.md @@ -285,7 +285,7 @@ ### ⚠ BREAKING CHANGES * add backend-solvable blackboxes to brillig & unify implementations ([#422](https://github.com/noir-lang/acvm/issues/422)) -* **acvm:** Remove `CircuitSimplifer` ([#421](https://github.com/noir-lang/acvm/issues/421)) +* **acvm:** Remove `CircuitSimplifier` ([#421](https://github.com/noir-lang/acvm/issues/421)) * **acvm:** Add `circuit: &Circuit` to `eth_contract_from_vk` function signature ([#420](https://github.com/noir-lang/acvm/issues/420)) * Returns index of failing opcode and transformation mapping ([#412](https://github.com/noir-lang/acvm/issues/412)) @@ -299,7 +299,7 @@ ### Miscellaneous Chores -* **acvm:** Remove `CircuitSimplifer` ([#421](https://github.com/noir-lang/acvm/issues/421)) ([e07a56d](https://github.com/noir-lang/acvm/commit/e07a56d9c542a7f03ce156761054cd403de0bd23)) +* **acvm:** Remove `CircuitSimplifier` ([#421](https://github.com/noir-lang/acvm/issues/421)) ([e07a56d](https://github.com/noir-lang/acvm/commit/e07a56d9c542a7f03ce156761054cd403de0bd23)) ### Dependencies @@ -641,7 +641,7 @@ * update `ProofSystemCompiler` to not take ownership of keys ([#111](https://github.com/noir-lang/acvm/issues/111)) * update `ProofSystemCompiler` methods to take `&Circuit` ([#108](https://github.com/noir-lang/acvm/issues/108)) * refactor ToRadix to ToRadixLe and ToRadixBe ([#58](https://github.com/noir-lang/acvm/issues/58)) -* reorganize compiler in terms of optimisers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) +* reorganize compiler in terms of optimizers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ### Features @@ -659,4 +659,4 @@ ### Miscellaneous Chores * refactor ToRadix to ToRadixLe and ToRadixBe ([#58](https://github.com/noir-lang/acvm/issues/58)) ([2427a27](https://github.com/noir-lang/acvm/commit/2427a275048e598c6d651cce8348a4c55148f235)) -* reorganize compiler in terms of optimisers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ([9329307](https://github.com/noir-lang/acvm/commit/9329307e054de202cfc55207162ad952b70d515e)) +* reorganize compiler in terms of optimizers and transformers ([#88](https://github.com/noir-lang/acvm/issues/88)) ([9329307](https://github.com/noir-lang/acvm/commit/9329307e054de202cfc55207162ad952b70d515e)) diff --git a/aztec_macros/src/lib.rs b/aztec_macros/src/lib.rs index 1b433c33df3..95bdce56021 100644 --- a/aztec_macros/src/lib.rs +++ b/aztec_macros/src/lib.rs @@ -938,7 +938,7 @@ fn add_array_to_hasher(identifier: &Ident, arr_type: &UnresolvedType) -> Stateme UnresolvedTypeData::Named(..) => { let hasher_method_name = "add_multiple".to_owned(); let call = method_call( - // All serialise on each element + // All serialize on each element arr_index, // variable "serialize", // method name vec![], // args diff --git a/compiler/noirc_evaluator/src/brillig/brillig_ir/entry_point.rs b/compiler/noirc_evaluator/src/brillig/brillig_ir/entry_point.rs index 48615988238..36ca414f38e 100644 --- a/compiler/noirc_evaluator/src/brillig/brillig_ir/entry_point.rs +++ b/compiler/noirc_evaluator/src/brillig/brillig_ir/entry_point.rs @@ -209,7 +209,7 @@ impl BrilligContext { /// Adds the instructions needed to handle return parameters /// The runtime expects the results in the first `n` registers. /// Arrays are expected to be returned as pointers to the first element with all the nested arrays flattened. - /// However, the function called returns variables (that have extra data) and the returned arrays are unflattened. + /// However, the function called returns variables (that have extra data) and the returned arrays are deflattened. fn exit_point_instruction(&mut self, return_parameters: Vec) { // First, we allocate the registers that hold the returned variables from the function call. self.set_allocated_registers(vec![]); @@ -227,7 +227,7 @@ impl BrilligContext { BrilligParameter::Slice(..) => unreachable!("ICE: Cannot return slices"), }) .collect(); - // Now, we unflatten the returned arrays + // Now, we deflatten the returned arrays for (return_param, returned_variable) in return_parameters.iter().zip(&returned_variables) { if let BrilligParameter::Array(item_type, item_count) = return_param { if item_type.iter().any(|item| !matches!(item, BrilligParameter::Simple)) { diff --git a/compiler/noirc_evaluator/src/ssa/function_builder/data_bus.rs b/compiler/noirc_evaluator/src/ssa/function_builder/data_bus.rs index 58d9e0f6d15..cbaeb2477d6 100644 --- a/compiler/noirc_evaluator/src/ssa/function_builder/data_bus.rs +++ b/compiler/noirc_evaluator/src/ssa/function_builder/data_bus.rs @@ -77,7 +77,7 @@ impl DataBus { impl FunctionBuilder { /// Insert a value into a data bus builder fn add_to_data_bus(&mut self, value: ValueId, databus: &mut DataBusBuilder) { - assert!(databus.databus.is_none(), "initialising finalized call data"); + assert!(databus.databus.is_none(), "initializing finalized call data"); let typ = self.current_function.dfg[value].get_type().clone(); match typ { Type::Numeric(_) => { @@ -130,7 +130,7 @@ impl FunctionBuilder { /// Generate the data bus for call-data, based on the parameters of the entry block /// and a boolean vector telling which ones are call-data pub(crate) fn call_data_bus(&mut self, is_params_databus: Vec) -> DataBusBuilder { - //filter parameters of the first block that have call-data visilibity + //filter parameters of the first block that have call-data visibility let first_block = self.current_function.entry_block(); let params = self.current_function.dfg[first_block].parameters(); let mut databus_param = Vec::new(); diff --git a/compiler/noirc_evaluator/src/ssa/ir/dfg.rs b/compiler/noirc_evaluator/src/ssa/ir/dfg.rs index 931aee9d079..c8343ace2c3 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/dfg.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/dfg.rs @@ -47,7 +47,7 @@ pub(crate) struct DataFlowGraph { constants: HashMap<(FieldElement, Type), ValueId>, /// Contains each function that has been imported into the current function. - /// Each function's Value::Function is uniqued here so any given FunctionId + /// A unique `ValueId` for each function's [`Value::Function`] is stored so any given FunctionId /// will always have the same ValueId within this function. functions: HashMap, @@ -57,7 +57,7 @@ pub(crate) struct DataFlowGraph { intrinsics: HashMap, /// Contains each foreign function that has been imported into the current function. - /// This map is used to ensure that the ValueId for any given foreign functôn is always + /// This map is used to ensure that the ValueId for any given foreign function is always /// represented by only 1 ValueId within this function. foreign_functions: HashMap, diff --git a/compiler/noirc_evaluator/src/ssa/opt/die.rs b/compiler/noirc_evaluator/src/ssa/opt/die.rs index 029adb10054..f7d8adb5275 100644 --- a/compiler/noirc_evaluator/src/ssa/opt/die.rs +++ b/compiler/noirc_evaluator/src/ssa/opt/die.rs @@ -54,7 +54,7 @@ struct Context { instructions_to_remove: HashSet, /// IncrementRc instructions must be revisited after the main DIE pass since - /// they are technically side-effectful but we stil want to remove them if their + /// they technically contain side-effects but we still want to remove them if their /// `value` parameter is not used elsewhere. increment_rc_instructions: Vec<(InstructionId, BasicBlockId)>, } diff --git a/compiler/noirc_evaluator/src/ssa/opt/unrolling.rs b/compiler/noirc_evaluator/src/ssa/opt/unrolling.rs index 2fe9ea13cec..645adb6b350 100644 --- a/compiler/noirc_evaluator/src/ssa/opt/unrolling.rs +++ b/compiler/noirc_evaluator/src/ssa/opt/unrolling.rs @@ -7,7 +7,7 @@ //! b. If we have previously modified any of the blocks in the loop, //! restart from step 1 to refresh the context. //! c. If not, try to unroll the loop. If successful, remember the modified -//! blocks. If unsuccessfuly either error if the abort_on_error flag is set, +//! blocks. If unsuccessfully either error if the abort_on_error flag is set, //! or otherwise remember that the loop failed to unroll and leave it unmodified. //! //! Note that this pass also often creates superfluous jmp instructions in the diff --git a/compiler/noirc_frontend/src/hir/resolution/resolver.rs b/compiler/noirc_frontend/src/hir/resolution/resolver.rs index 91cfa5c6058..b9770f34e1e 100644 --- a/compiler/noirc_frontend/src/hir/resolution/resolver.rs +++ b/compiler/noirc_frontend/src/hir/resolution/resolver.rs @@ -95,7 +95,7 @@ pub struct Resolver<'a> { /// True if the current module is a contract. /// This is usually determined by self.path_resolver.module_id(), but it can - /// be overriden for impls. Impls are an odd case since the methods within resolve + /// be overridden for impls. Impls are an odd case since the methods within resolve /// as if they're in the parent module, but should be placed in a child module. /// Since they should be within a child module, in_contract is manually set to false /// for these so we can still resolve them in the parent module without them being in a contract. diff --git a/compiler/noirc_frontend/src/hir_def/types.rs b/compiler/noirc_frontend/src/hir_def/types.rs index 9a9c0c047d1..981d7e41b6e 100644 --- a/compiler/noirc_frontend/src/hir_def/types.rs +++ b/compiler/noirc_frontend/src/hir_def/types.rs @@ -1385,7 +1385,7 @@ impl Type { let substitute_binding = |binding: &TypeVariable| { // Check the id first to allow substituting to // type variables that have already been bound over. - // This is neede for monomorphizing trait impl methods. + // This is needed for monomorphizing trait impl methods. match type_bindings.get(&binding.0) { Some((_, binding)) if substitute_bound_typevars => binding.clone(), _ => match &*binding.borrow() { diff --git a/compiler/utils/iter-extended/src/lib.rs b/compiler/utils/iter-extended/src/lib.rs index aef89b58b30..d2ef271aebf 100644 --- a/compiler/utils/iter-extended/src/lib.rs +++ b/compiler/utils/iter-extended/src/lib.rs @@ -44,7 +44,7 @@ where } /// Given an iterator over a Result, filter out the Ok values from the Err values -/// and return both in separate Vecs. Unlike other collect-like functions over Results, +/// and return both in separate `Vec`s. Unlike other collect-like functions over Results, /// this function will always consume the entire iterator. pub fn partition_results(iterable: It, mut f: F) -> (Vec, Vec) where diff --git a/cspell.json b/cspell.json index 8e3f248acfa..778d559bb12 100644 --- a/cspell.json +++ b/cspell.json @@ -1,5 +1,8 @@ { "version": "0.2", + "dictionaries": [ + "rust" + ], "words": [ "aarch", "acir", @@ -16,19 +19,20 @@ "bincode", "bindgen", "bitand", - "bitor", - "bitxor", "blackbox", "bridgekeeper", "brillig", + "bytecount", "cachix", "callsite", "callsites", + "callstack", + "callstacks", "canonicalize", "castable", + "catmcgee", "Celo", "chumsky", - "clippy", "codegen", "codegenned", "codegens", @@ -39,8 +43,11 @@ "comptime", "cpus", "cranelift", + "critesjosh", + "csat", "curvegroup", "databus", + "deflater", "deflatten", "deflattened", "deflattening", @@ -75,6 +82,7 @@ "Hindley-Milner", "idents", "impls", + "indexmap", "injective", "Inlines", "interner", @@ -88,14 +96,17 @@ "keccak", "krate", "lvalue", + "Maddiaa", "mathbb", "merkle", "metas", + "minreq", "monomorphization", "monomorphize", "monomorphized", "monomorphizer", "monomorphizes", + "monomorphizing", "montcurve", "nand", "nargo", @@ -104,9 +115,11 @@ "nightlies", "nixpkgs", "noirc", + "noirfmt", "noirjs", "noirup", "nomicfoundation", + "noncanonical", "pedersen", "peekable", "plonkc", @@ -114,24 +127,25 @@ "pprof", "preprocess", "prettytable", - "println", "printstd", "pseudocode", "pubkey", "quantile", + "repr", + "reqwest", + "rfind", "rustc", "rustup", "schnorr", "sdiv", "secp256k1", "secp256r1", - "serde", "signedness", + "signorecello", "smol", "splitn", "srem", "stdlib", - "struct", "structs", "subexpression", "subshell", @@ -155,10 +169,12 @@ "USERPROFILE", "vecmap", "wasi", + "wasmer", "Weierstraß", "zshell" ], "ignorePaths": [ - "./**/node_modules/**" + "./**/node_modules/**", + "./**/target/**" ] } diff --git a/docs/docs/noir/standard_library/traits.md b/docs/docs/noir/standard_library/traits.md index 50b0e6816ab..f2960ca5080 100644 --- a/docs/docs/noir/standard_library/traits.md +++ b/docs/docs/noir/standard_library/traits.md @@ -281,4 +281,4 @@ impl Shl for u8 { fn shl(self, other: u8) -> u8 { self << other } } impl Shl for u16 { fn shl(self, other: u16) -> u16 { self << other } } impl Shl for u32 { fn shl(self, other: u32) -> u32 { self << other } } impl Shl for u64 { fn shl(self, other: u64) -> u64 { self << other } } -``` \ No newline at end of file +``` diff --git a/package.json b/package.json index 20a5b87cfd8..789ba9dec55 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "clean:root": "rm -rf ./result ./target ./packages", "clean": "yarn clean:workspaces && yarn clean:root", "lint": "yarn workspaces foreach --verbose run lint", + "spellcheck": "cspell '**/*.{md,rs}' -c ./cspell.json", "install:acvm_js": "yarn workspace @noir-lang/acvm_js run install:from:nix", "install:noir_wasm": "yarn workspace @noir-lang/noir_wasm run install:from:nix", "install:noirc_abi_wasm": "yarn workspace @noir-lang/noirc_abi run install:from:nix", @@ -37,6 +38,7 @@ "@typescript-eslint/eslint-plugin": "^6.7.3", "@typescript-eslint/parser": "^6.7.3", "chai": "^4.3.7", + "cspell": "^8.3.2", "eslint": "^8.50.0", "eslint-plugin-prettier": "^5.0.0", "mocha": "^10.2.0", diff --git a/tooling/backend_interface/CHANGELOG.md b/tooling/backend_interface/CHANGELOG.md index 4387d8ccb5f..9ebde989add 100644 --- a/tooling/backend_interface/CHANGELOG.md +++ b/tooling/backend_interface/CHANGELOG.md @@ -214,7 +214,7 @@ * Avoid exposing internals of Assignments type ([614c81b](https://github.com/noir-lang/acvm-backend-barretenberg/commit/614c81b0ea5e110bbf5a61a526bb0173f4fe377a)) * avoid exposing internals of Assignments type ([#119](https://github.com/noir-lang/acvm-backend-barretenberg/issues/119)) ([614c81b](https://github.com/noir-lang/acvm-backend-barretenberg/commit/614c81b0ea5e110bbf5a61a526bb0173f4fe377a)) -* fix serialisation of arithmetic expressions ([#145](https://github.com/noir-lang/acvm-backend-barretenberg/issues/145)) ([7f42535](https://github.com/noir-lang/acvm-backend-barretenberg/commit/7f4253570257d9dedcfa8c8fb96b9d097ef06419)) +* fix serialization of arithmetic expressions ([#145](https://github.com/noir-lang/acvm-backend-barretenberg/issues/145)) ([7f42535](https://github.com/noir-lang/acvm-backend-barretenberg/commit/7f4253570257d9dedcfa8c8fb96b9d097ef06419)) * Implement random_get for wasm backend ([#102](https://github.com/noir-lang/acvm-backend-barretenberg/issues/102)) ([9c0f06e](https://github.com/noir-lang/acvm-backend-barretenberg/commit/9c0f06ef56f23e2b5794e810f433e36ff2c5d6b5)) * rename gates to opcodes ([#59](https://github.com/noir-lang/acvm-backend-barretenberg/issues/59)) ([6e05307](https://github.com/noir-lang/acvm-backend-barretenberg/commit/6e053072d8b9c5d93c296f10782251ccb597f902)) * reorganize and ensure contracts can be compiled in Remix ([#112](https://github.com/noir-lang/acvm-backend-barretenberg/issues/112)) ([7ec5693](https://github.com/noir-lang/acvm-backend-barretenberg/commit/7ec5693f194a79c379ae2952bc17a31ee63a42b9)) diff --git a/tooling/backend_interface/src/lib.rs b/tooling/backend_interface/src/lib.rs index c15383086eb..eab98852555 100644 --- a/tooling/backend_interface/src/lib.rs +++ b/tooling/backend_interface/src/lib.rs @@ -141,7 +141,7 @@ mod backend { #[test] fn raises_error_on_missing_binary() { - let bad_backend = Backend::new("i_dont_exist".to_string()); + let bad_backend = Backend::new("i_don't_exist".to_string()); let binary_path = bad_backend.assert_binary_exists(); diff --git a/tooling/nargo/src/lib.rs b/tooling/nargo/src/lib.rs index db54fd3d574..62ff4325a23 100644 --- a/tooling/nargo/src/lib.rs +++ b/tooling/nargo/src/lib.rs @@ -146,10 +146,10 @@ mod tests { use tempfile::tempdir; fn create_test_dir_structure(temp_dir: &Path) -> std::io::Result<()> { - fs::create_dir(temp_dir.join("subdir1"))?; - File::create(temp_dir.join("subdir1/file1.txt"))?; - fs::create_dir(temp_dir.join("subdir2"))?; - File::create(temp_dir.join("subdir2/file2.txt"))?; + fs::create_dir(temp_dir.join("sub_dir1"))?; + File::create(temp_dir.join("sub_dir1/file1.txt"))?; + fs::create_dir(temp_dir.join("sub_dir2"))?; + File::create(temp_dir.join("sub_dir2/file2.txt"))?; File::create(temp_dir.join("file3.txt"))?; Ok(()) } @@ -166,8 +166,8 @@ mod tests { // This should be the paths to all of the files in the directory and the subdirectory let expected_paths = vec![ temp_dir.path().join("file3.txt"), - temp_dir.path().join("subdir1/file1.txt"), - temp_dir.path().join("subdir2/file2.txt"), + temp_dir.path().join("sub_dir1/file1.txt"), + temp_dir.path().join("sub_dir2/file2.txt"), ]; assert_eq!(paths.len(), expected_paths.len()); diff --git a/tooling/noirc_abi/src/input_parser/mod.rs b/tooling/noirc_abi/src/input_parser/mod.rs index 26c5a89c83a..f66e069d487 100644 --- a/tooling/noirc_abi/src/input_parser/mod.rs +++ b/tooling/noirc_abi/src/input_parser/mod.rs @@ -215,7 +215,7 @@ fn parse_str_to_field(value: &str) -> Result { }) } -fn parse_str_to_signed(value: &str, witdh: u32) -> Result { +fn parse_str_to_signed(value: &str, width: u32) -> Result { let big_num = if let Some(hex) = value.strip_prefix("0x") { BigInt::from_str_radix(hex, 16) } else { @@ -225,7 +225,7 @@ fn parse_str_to_signed(value: &str, witdh: u32) -> Result