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: rework workspace structure for utils crates #4886

Merged
merged 5 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ members = [
# Aztec Macro crate for metaprogramming
"aztec_macros",
# Compiler crates
"compiler/noirc_arena",
"compiler/noirc_evaluator",
"compiler/noirc_frontend",
"compiler/noirc_errors",
"compiler/noirc_driver",
"compiler/noirc_printable_type",
"compiler/fm",
"compiler/wasm",
# Utility crates used by the Noir compiler
"compiler/utils/arena",
"compiler/utils/iter-extended",
# Crates related to tooling built ontop of the Noir compiler
# Crates related to tooling built on top of the Noir compiler
"tooling/backend_interface",
"tooling/bb_abstraction_leaks",
"tooling/lsp",
Expand All @@ -35,6 +33,8 @@ members = [
"acvm-repo/brillig_vm",
"acvm-repo/blackbox_solver",
"acvm-repo/bn254_blackbox_solver",
# Utility crates
"utils/iter-extended",
]
default-members = ["tooling/nargo_cli", "tooling/acvm_cli"]
resolver = "2"
Expand All @@ -61,9 +61,8 @@ acvm_blackbox_solver = { version = "0.44.0", path = "acvm-repo/blackbox_solver",
bn254_blackbox_solver = { version = "0.44.0", path = "acvm-repo/bn254_blackbox_solver", default-features = false }

# Noir compiler workspace dependencies
arena = { path = "compiler/utils/arena" }
fm = { path = "compiler/fm" }
iter-extended = { path = "compiler/utils/iter-extended" }
noirc_arena = { path = "compiler/noirc_arena" }
noirc_driver = { path = "compiler/noirc_driver" }
noirc_errors = { path = "compiler/noirc_errors" }
noirc_evaluator = { path = "compiler/noirc_evaluator" }
Expand All @@ -80,6 +79,9 @@ noirc_abi = { path = "tooling/noirc_abi" }
bb_abstraction_leaks = { path = "tooling/bb_abstraction_leaks" }
acvm_cli = { path = "tooling/acvm_cli" }

# Misc utils crates
iter-extended = { path = "utils/iter-extended" }

# LSP
async-lsp = { version = "0.1.0", default-features = false }
lsp-types = "0.94.1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "arena"
name = "noirc_arena"
version.workspace = true
authors.workspace = true
edition.workspace = true
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ license.workspace = true

[dependencies]
acvm.workspace = true
noirc_arena.workspace = true
noirc_errors.workspace = true
noirc_printable_type.workspace = true
fm.workspace = true
arena.workspace = true
iter-extended.workspace = true
chumsky.workspace = true
thiserror.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir/def_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::macros_api::MacroProcessor;
use crate::node_interner::{FuncId, GlobalId, NodeInterner, StructId};
use crate::parser::{parse_program, ParsedModule, ParserError};
use crate::token::{FunctionAttribute, SecondaryAttribute, TestScope};
use arena::{Arena, Index};
use fm::{FileId, FileManager};
use noirc_arena::{Arena, Index};
use noirc_errors::Location;
use std::collections::{BTreeMap, HashMap};
mod module_def;
Expand Down
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/hir/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ pub mod test {
}

fn local_module_id(&self) -> LocalModuleId {
LocalModuleId(arena::Index::unsafe_zeroed())
LocalModuleId(noirc_arena::Index::unsafe_zeroed())
}

fn module_id(&self) -> ModuleId {
Expand Down Expand Up @@ -724,7 +724,7 @@ pub mod test {
let mut def_maps = BTreeMap::new();
let file = FileId::default();

let mut modules = arena::Arena::default();
let mut modules = noirc_arena::Arena::default();
let location = Location::new(Default::default(), file);
modules.insert(ModuleData::new(None, location, false));

Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/node_interner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::borrow::Cow;
use std::collections::HashMap;
use std::ops::Deref;

use arena::{Arena, Index};
use fm::FileId;
use iter_extended::vecmap;
use noirc_arena::{Arena, Index};
use noirc_errors::{Location, Span, Spanned};
use petgraph::algo::tarjan_scc;
use petgraph::prelude::DiGraph;
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/resolve_locations.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use arena::Index;
use noirc_arena::Index;
use noirc_errors::Location;

use crate::hir_def::expr::HirExpression;
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ mod test {
hir::def_map::{CrateDefMap, LocalModuleId},
parse_program,
};
use arena::Arena;
use fm::FileManager;
use noirc_arena::Arena;

pub(crate) fn has_parser_error(errors: &[(CompilationError, FileId)]) -> bool {
errors.iter().any(|(e, _f)| matches!(e, CompilationError::ParseError(_)))
Expand Down
File renamed without changes.
File renamed without changes.
Loading