Skip to content

Commit

Permalink
chore: fix nargo build
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jun 24, 2024
1 parent 656a7bd commit cba19c7
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 7 deletions.
57 changes: 54 additions & 3 deletions noir/noir-repo/Cargo.lock

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

1 change: 1 addition & 0 deletions noir/noir-repo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ hex = "0.4.2"
const_format = "0.2.30"
num-bigint = "0.4"
num-traits = "0.2"
color-eyre = "0.6.2"
similar-asserts = "1.5.0"
tempfile = "3.6.0"
jsonrpc = { version = "0.16.0", features = ["minreq_http"] }
Expand Down
6 changes: 3 additions & 3 deletions noir/noir-repo/compiler/noirc_errors/src/reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ fn stack_trace<'files>(
let path = files.name(call_item.file).expect("should get file path");
let source = files.source(call_item.file).expect("should get file source");

let (line, column) = location(source.as_ref(), call_item.span.start());
let (line, column) = line_and_column_from_span(source.as_ref(), &call_item.span);
result += &format!("{}. {}:{}:{}\n", i + 1, path, line, column);
}

result
}

fn location(source: &str, span_start: u32) -> (u32, u32) {
pub fn line_and_column_from_span(source: &str, span: &Span) -> (u32, u32) {
let mut line = 1;
let mut column = 0;

Expand All @@ -221,7 +221,7 @@ fn location(source: &str, span_start: u32) -> (u32, u32) {
column = 0;
}

if span_start <= i as u32 {
if span.start() <= i as u32 {
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/tooling/acvm_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = "src/main.rs"
[dependencies]
thiserror.workspace = true
toml.workspace = true
color-eyre = "0.6.2"
color-eyre.workspace = true
clap.workspace = true
acvm.workspace = true
nargo.workspace = true
Expand Down

0 comments on commit cba19c7

Please sign in to comment.