Package: purescript-lua-console
File: src/Effect/Console.lua
Function: warn
Class: semantics Severity: low
Upstream maps warn :: String -> Effect Unit to console.warn, which writes to stderr in Node. The Lua FFI uses print (stdout), so warnings are indistinguishable from log output and cannot be filtered via stderr. (By contrast info/debug/log -> stdout is correct, since console.info/console.debug/console.log all target stdout, so only warn and error are misrouted.)
Current (Lua):
warn = (function(s) return function() print(s) end end),
Expected: console.warn writes to stderr; the Lua equivalent is io.stderr:write(s .. "\n").
Proposed fix:
warn = (function(s) return function() io.stderr:write(tostring(s) .. "\n") end end),
Found by the FFI audit; reproduced under Lua 5.1.
Package: purescript-lua-console
File:
src/Effect/Console.luaFunction:
warnClass: semantics Severity: low
Upstream maps
warn :: String -> Effect Unittoconsole.warn, which writes to stderr in Node. The Lua FFI usesprint(stdout), so warnings are indistinguishable fromlogoutput and cannot be filtered via stderr. (By contrastinfo/debug/log-> stdout is correct, since console.info/console.debug/console.log all target stdout, so only warn and error are misrouted.)Current (Lua):
Expected: console.warn writes to stderr; the Lua equivalent is io.stderr:write(s .. "\n").
Proposed fix:
Found by the FFI audit; reproduced under Lua 5.1.