Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

-debug builds are dead on arrival due to EmbeddedFile #619

Open
DavisVaughan opened this issue Nov 4, 2024 · 0 comments
Open

-debug builds are dead on arrival due to EmbeddedFile #619

DavisVaughan opened this issue Nov 4, 2024 · 0 comments

Comments

@DavisVaughan
Copy link
Contributor

DavisVaughan commented Nov 4, 2024

Hadley loaded a debug build and saw:

thread 'main' panicked at crates/harp/src/lib.rs:77:29:
called `Result::unwrap()` on an `Err` value: can't open asset init.R

Stack backtrace:
   0: std::backtrace::Backtrace::create
   1: anyhow::error::<impl anyhow::Error>::msg
   2: anyhow::__private::format_err
   3: harp::modules::with_asset
   4: harp::modules::init_modules
   5: harp::initialize
   6: ark::interface::RMain::start
   7: ark::start::start_kernel
   8: ark::main
   9: core::ops::function::FnOnce::call_once
  10: std::sys::backtrace::__rust_begin_short_backtrace
  11: std::rt::lang_start::{{closure}}
  12: std::rt::lang_start_internal
  13: std::rt::lang_start
  14: _main

init.R is an embedded file, during debug embedded files are read from the file system, but he doesn't have that file!

According to https://docs.rs/rust-embed/8.5.0/rust_embed/trait.RustEmbed.html#required-methods we can use the debug-embed feature to force it to load from the binary even in debug mode.

This currently means all of the -debug releases we generate are likely DOA

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant