mlabs-haskell / mlabs-haskell/lambda-buffers
error: reached the recursion limit while instantiating `json_field`
Open
Nobody has claimed this yet.
bug
codegen
rust
- Dominant language
- Haskell
- Stars
- 32
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Error
error: reached the recursion limit while instantiating `<{closure@scripts::lbr_prelude::json::lamval::json_field<'_, RoCMinting>::{closu
re#0}::{closure#0}} as FnOnce<(Box<dyn Fn(...) -> ...>,)>>::call_once - shim(vtable)`
--> /home/bladyjoker/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lbr-prelude-0.1.3/src/json/lamval.rs:61:24
|
61 | Box::new(move |x1| Box::new(move |x2| super::json_field(x0, x1, x2)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: `call_once` defined here
--> /nix/store/ryfyfy694d097gif9s0dg8kj1aca08c1-rust-default-1.78.0/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
|
250 | extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the full type name has been written to '/home/bladyjoker/mlabs/unbox-infinity/infinity-extras/infinity-proto-conversions/tar
Full type name:
<{closure@scripts::lbr_prelude::json::lamval::json_field<'_, RoCMinting>::{closure#0}::{closure#0}} as FnOnce<(Box<dyn Fn(&scripts::serde_json::Value) -> std::result::Result<RoCMinting, scripts::lbr_prelude::error::Error>>,)>>::call_once - shim(vtable)
Problem schema
References
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 with lbr-prelude/src/json/lamval.rs at line 61 and the problem schema at infinity-api/lbf/Infinity/Application/Validation/Prelude.lbf line 42. Reproduce the Rust compilation failure for the schema and inspect how json_field is instantiated; done means the schema compiles without reaching Rust's recursion limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100