~technomancy/fennel#239: 
`warn` option not honoured by `compile-string`

The (currently undocumented) warn compiler option, used to redirect stderr messages to a custom function is not used when calling compile-string (and assumedly other compile-* functions).

Fennels internal warn function checks root.options which is nil, so it always falls back to stderr.

Status
RESOLVED FIXED
Submitter
~rktjmp
Assigned to
No-one
Submitted
8 months ago
Updated
8 months ago
Labels
bug

~rktjmp 8 months ago

Reproduction, observe "--WARNING" output written to stderr in the terminal.

(let [{: compile-string} (require :fennel)]
  (compile-string "(local x\"bad\")"
                  {:warn #(print "warnings are just suggestions")}))

~olical 8 months ago

Ah, I think this is what's causing this bug in my Neovim plugin https://github.com/Olical/nfnl/issues/44

The stray stderr output causes Neovim's rendering to go a bit haywire. Will try to work around it for now :)

~technomancy REPORTED FIXED 8 months ago

Should be fixed in cf75dca.

Register here or Log in to comment, or comment via email.