`-debug` builds are dead on arrival due to `EmbeddedFile`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 32
- Avg merge
- 8d 17h
- Merged PRs (30d)
- 11
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the asset-loading path shown in crates/harp/src/lib.rs:77 and read the RustEmbed documentation linked in the issue, focusing on debug-embed behavior. Inspect the crate's dependency configuration and verify that a debug build can load init.R from the binary without requiring the file on the filesystem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100