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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Invalid program.json results in a compiler panic #27890

Open
d0cd opened this issue Apr 5, 2024 · 0 comments
Open

[Bug] Invalid program.json results in a compiler panic #27890

d0cd opened this issue Apr 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@d0cd
Copy link
Collaborator

d0cd commented Apr 5, 2024

馃悰 Bug Report

Test Case

{
  "program": "import_external_from_network.aleo",
  "version": "0.0.0",
  "description": "",
  "license": "MIT",
  "dependencies": [
    {
      "name": "credits.aleo",
      "location": "network"
    }
  ]
}

Error

> leo build
       Leo 鈿狅笍  Attention - This command is deprecated. Use the 'run' command.

thread `main` panicked at utils/retriever/src/program_context/mod.rs:80:31:
ProgramContext network is None
stack backtrace: 
   0: backtrace::capture::Backtrace::new
   1: leo::set_panic_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: _rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::option::expect_failed
   8: leo_retriever::retriever::Retriever::retrieve
   9: <leo_lang::cli::commands::build::Build as leo_lang::cli::commands::Command>::apply
  10: leo_lang::cli::commands::Command::execute
  11: leo_lang::cli::cli::run_with_args
  12: scoped_tls::ScopedKey<T>::set
  13: leo::main
  14: std::sys_common::backtrace::__rust_begin_short_backtrace
  15: std::rt::lang_start::{{closure}}
  16: std::rt::lang_start_internal
  17: _main

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/AleoHQ/leo/issues/new?labels=bug,panic&template=bug.md&title=[Bug]

note: leo-lang 1.11.0 running on Darwin 23.1.0

note: compiler args: leo build

note: compiler flags: CLI { debug: false, quiet: false, command: Build { command: Build { options: BuildOptions { endpoint: "http://api.explorer.aleo.org/v1", non_recursive: false, offline: false, enable_symbol_table_spans: false, enable_initial_symbol_table_snapshot: false, enable_type_checked_symbol_table_snapshot: false, enable_unrolled_symbol_table_snapshot: false, enable_ast_spans: false, enable_dce: false, enable_all_ast_snapshots: false, enable_initial_ast_snapshot: false, enable_unrolled_ast_snapshot: false, enable_ssa_ast_snapshot: false, enable_flattened_ast_snapshot: false, enable_destructured_ast_snapshot: false, enable_inlined_ast_snapshot: false, enable_dce_ast_snapshot: false } } }, path: None, home: None }
@d0cd d0cd added the bug Something isn't working label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant