Skip to content

v2.15.0 - LSP/MCP + Go/Lua correctness fixes

Choose a tag to compare

@gmpassos gmpassos released this 19 Jul 07:27
· 123 commits to master since this release
42a3a43

Correctness fixes across the LSP, MCP, Go and Lua subsystems.

LSP & MCP correctness fixes

  • LSP textDocument/references now honors context.includeDeclaration. The flag was plumbed through every layer but discarded; when false, the declaration occurrence is now excluded.
  • LSP field/variable documentSymbol range covers the whole declaration (extends to the terminating ; instead of stopping at the name).
  • MCP tools coerce client arguments instead of hard-casting them. timeoutMs/maxDepth/args/className go through mcpCoerceInt/_strOrNull/_listOrEmpty, so a JSON double (1000.0) or wrong-typed value no longer throws a raw TypeError.
  • MCP HTTP/SSE transport answers CORS preflight (OPTIONS → 204 with Allow-Origin/Methods/Headers) instead of a 404.

Go & Lua generator correctness fixes

  • Go &^ (AND NOT / bit clear) now computes a & (~b) instead of a plain a & b (desugared at parse time, same precedence as &).
  • Lua string-variable concatenation emits .. for statically String-typed operands (s1 + s2), not an invalid +.
  • Lua list indexing is shifted to Lua's 1-based convention (list[0] → list[1], list[i] → list[(i) + 1]); map key access unchanged.
  • Lua string-interpolation subexpressions are parenthesized ("${a < b}" → "x" .. (a < b)) to fix mis-association under .. precedence.

Full diff: v2.14.0...v2.15.0