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

feat: Refactor Logging to use Brillig foreign calls #1917

Merged
merged 26 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
730c9ff
initial stdlib methods to start refactoring logign
vezenovm Jul 11, 2023
d75aedb
foreign call enum
vezenovm Jul 11, 2023
f28b915
Merge branch 'master' into mv/brillig_logs
vezenovm Jul 11, 2023
ce082b6
working println and println_format w/ brillig oracles
vezenovm Jul 12, 2023
4501b69
merge conflicts w/ master
vezenovm Jul 12, 2023
44ef833
fix up brillig_oracle test
vezenovm Jul 12, 2023
e9f6488
uncomment regression test for slice return from foreign calls in brillig
vezenovm Jul 12, 2023
e457faf
cargo clippy
vezenovm Jul 12, 2023
7cb1b10
got structs serialized correctly without aos_to_soa
vezenovm Jul 13, 2023
c7e4f0a
remove dbg
vezenovm Jul 13, 2023
1c64aff
working println_format
vezenovm Jul 13, 2023
e3d8931
merge conflicts w/ master
vezenovm Jul 13, 2023
5c24bf7
cargo clippy
vezenovm Jul 13, 2023
f4b17d4
rename enable_slices to experimental_ssa
vezenovm Jul 13, 2023
d2065ea
remove dbg and fix format_field_string
vezenovm Jul 13, 2023
3623283
master conflicts
vezenovm Jul 18, 2023
e6f5815
pr comments, and remove format work to move into separate PR
vezenovm Jul 19, 2023
13f6de6
add comment about removing old println
vezenovm Jul 19, 2023
2c0a8ba
remove old comment
vezenovm Jul 19, 2023
20f060f
have println return nothing
vezenovm Jul 19, 2023
b28e598
Update crates/noirc_frontend/src/hir/def_map/mod.rs
vezenovm Jul 19, 2023
1cc1c0e
Merge branch 'master' into mv/brillig_logs
vezenovm Jul 19, 2023
461829a
Merge branch 'master' into mv/brillig_logs
vezenovm Jul 20, 2023
46daccc
Update crates/noirc_frontend/src/hir/def_map/mod.rs
vezenovm Jul 20, 2023
dece385
add comment to append_abi_arg call
vezenovm Jul 20, 2023
269696f
include println oracle comment in stdlib
vezenovm Jul 20, 2023
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
115 changes: 53 additions & 62 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ noirc_errors = { path = "crates/noirc_errors" }
noirc_evaluator = { path = "crates/noirc_evaluator" }
noirc_frontend = { path = "crates/noirc_frontend" }
noir_wasm = { path = "crates/wasm" }

cfg-if = "1.0.0"
clap = { version = "4.1.4", features = ["derive"] }
codespan = {version = "0.11.1", features = ["serialization"]}
Expand All @@ -57,4 +56,4 @@ wasm-bindgen = { version = "=0.2.86", features = ["serde-serialize"] }
wasm-bindgen-test = "0.3.33"

[patch.crates-io]
async-lsp = { git = "https://github.com/oxalica/async-lsp", rev = "09dbcc11046f7a188a80137f8d36484d86c78c78" }
async-lsp = { git = "https://github.com/oxalica/async-lsp", rev = "09dbcc11046f7a188a80137f8d36484d86c78c78" }
2 changes: 2 additions & 0 deletions crates/nargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ noirc_driver.workspace = true
iter-extended.workspace = true
toml.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
noirc_errors.workspace = true
regex = "1.9.1"
18 changes: 18 additions & 0 deletions crates/nargo/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use acvm::pwg::OpcodeResolutionError;
use noirc_abi::errors::{AbiError, InputParserError};
use thiserror::Error;

#[derive(Debug, Error)]
Expand All @@ -10,4 +11,21 @@ pub enum NargoError {
/// ACIR circuit solving error
#[error(transparent)]
SolvingError(#[from] OpcodeResolutionError),

#[error(transparent)]
ForeignCallError(#[from] ForeignCallError),
}

#[derive(Debug, Error)]
pub enum ForeignCallError {
#[error("Foreign call inputs needed for execution are missing")]
MissingForeignCallInputs,

/// ABI encoding/decoding error
#[error(transparent)]
AbiError(#[from] AbiError),

/// Input parsing error
#[error(transparent)]
InputParserError(#[from] InputParserError),
}
Loading