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(nargo): Add panic hook #850

Merged
merged 2 commits into from
Feb 16, 2023
Merged

Conversation

0xYYY
Copy link
Contributor

@0xYYY 0xYYY commented Feb 15, 2023

Related issue(s)

Related to #818.

Description

Summary of changes

Register a panic hook before starting the nargo cli.

Dependency additions / changes

Added color_eyre.

Test additions / changes

N/A

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

Additional context

jfecher
jfecher previously approved these changes Feb 15, 2023
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example panic message now:

The application panicked (crashed).
Message:  not implemented: dynamic arrays are not implemented yet
Location: crates/noirc_evaluator/src/ssa/acir_gen/operations/load.rs:32

This is a bug. Consider opening an issue at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.md

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 13 frames hidden ⋮                              
  14: noirc_evaluator::ssa::acir_gen::operations::load::evaluate::hace24b3b73401096
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_evaluator/src/ssa/acir_gen/operations/load.rs:32
  15: noirc_evaluator::ssa::acir_gen::Acir::acir_gen_instruction::he255757cd738b64f
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_evaluator/src/ssa/acir_gen.rs:69
  16: noirc_evaluator::ssa::context::SsaContext::acir::hdf2b9cd2aebbba13
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_evaluator/src/ssa/context.rs:757
  17: noirc_evaluator::ssa::context::SsaContext::ir_to_acir::h8bd97a6e97db24a8
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_evaluator/src/ssa/context.rs:742
  18: noirc_evaluator::Evaluator::evaluate_main_alt::h75688b2228da5c39
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_evaluator/src/lib.rs:121
  19: noirc_evaluator::create_circuit::h5e7bda8768a761cb
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_evaluator/src/lib.rs:46
  20: noirc_driver::Driver::compile_no_check::h448389388dd82f4f
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_driver/src/lib.rs:190
  21: noirc_driver::Driver::into_compiled_program::he32bd1fc4441b231
      at /Users/jakefecher/Code/Noir/noir/crates/noirc_driver/src/lib.rs:154
  22: nargo::cli::compile_cmd::compile_circuit::h759f65ac0edf0556
      at /Users/jakefecher/Code/Noir/noir/crates/nargo/src/cli/compile_cmd.rs:77
  23: nargo::cli::prove_cmd::prove_with_path::hdc981e95f2aff86d
      at /Users/jakefecher/Code/Noir/noir/crates/nargo/src/cli/prove_cmd.rs:40
  24: nargo::cli::prove_cmd::run::hca0b87033cae3d8a
      at /Users/jakefecher/Code/Noir/noir/crates/nargo/src/cli/prove_cmd.rs:27
  25: nargo::cli::start_cli::h4af47158d9ff68a3
      at /Users/jakefecher/Code/Noir/noir/crates/nargo/src/cli/mod.rs:135
  26: nargo::main::h24d9cb3c6a4b58fa
      at /Users/jakefecher/Code/Noir/noir/crates/nargo/src/main.rs:14
  27: core::ops::function::FnOnce::call_once::ha03b9e61ee8d8f79
      at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251
                                ⋮ 13 frames hidden ⋮                              
exit 101

@kevaundray kevaundray added this pull request to the merge queue Feb 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Feb 15, 2023
@kevaundray kevaundray added this pull request to the merge queue Feb 16, 2023
Merged via the queue into noir-lang:master with commit 74cb340 Feb 16, 2023
@0xYYY 0xYYY deleted the feat/panic-hook branch February 16, 2023 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants