tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.24k stars 84 forks source link

Fix unbound identifier when querying in REPL #1843

Closed yannham closed 4 months ago

yannham commented 4 months ago

Closes #1842

Following a refactoring that landed in 1.4, the current environment of a REPL session wasn't taken into account when querying an expression. This means that any value introduced by a toplevel let during the session would evaluate fine but would raise an unbound identifier error if one tries to query it with :query some_id.

This commit fixes this by correctly propagating the environment in the subfunctions involved in querying.