mirror of
https://github.com/tweag/nickel.git
synced 2024-11-20 20:52:14 +03:00
0b251e83b4
* Detect infinite recursions in `nickel doc` This commit fixes an issue where legit recursive configurations cause infinite recursion when trying to extract their documentation. Indeed, `nickel doc` calls to `eval_record_spine`, which is unable to detect loops that span multiple evaluation step (an evaluation step is evaluating one field to a weak head normal form). This commit changes `eval_record_spine` and related methods to lock (in practice just flip a bit in the thunk's state) the active thunks, that is the thunks of parents of the field that we are currently evaluating. If we ever come across a thunk that is already locked, the field is left unevaluated, avoiding infinite recursion. * Fix clippy warning * Fix typo in code comment |
||
---|---|---|
.. | ||
benches | ||
src | ||
stdlib | ||
tests | ||
build.rs | ||
Cargo.toml |