tweag / nickel

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

Remove some spurious diagnostics from background eval #1847

Closed jneem closed 4 months ago

jneem commented 4 months ago

The first pass at background eval intended to ignore missing field errors, but it didn't do a thorough job. Specifically, it ignored missing field errors that came from forcing undefined fields. But it kept missing field errors coming from anything that evaluated those undefined fields. This PR removes those errors, and also some spurious "infinite recursion" errors coming from not resetting the thunks on error.

I decided to make eval_permissive return all the errors it finds, and filter out the missing field errors in nls. This is a little less efficient than filtering them out in eval_permissive, but it felt more principled. (Also, if we ever figure out a way to guess when a record is intended for export, maybe we won't always filter them out.)