Skip to content

Bug fixes to runtime builtins + polish

Compare
Choose a tag to compare
@thesephist thesephist released this 04 Aug 01:10
· 111 commits to master since this release

This release is mostly a minor bugfix update. Since I'll be taking a break from working on Ink for a little bit to tend to other projects. I wanted to get all the accumulated fixes out of the gate and released.

Bugfixes

  • read() now returns the correct empty value (empty string) when called with --no-read; before, it was returning ().
  • Tests now check for more cases in isolated execution modes, so there should be less regressions around permissions in filesystem or network operations.
  • Sometimes, builtin functions like read were calling the callback twice with conflicting data when errored. This has been fixed, so all builtins now only callback once.
  • The interpreter now correctly deals with io.EOF in the interactive REPL, rather than showing an error when exiting with Ctrl+D.
  • Sometimes, HTTP APIs listen() and req() would return () on empty response bodies instead of the empty string. This has been standardized around the empty string, and all exceptions to this rule have been fixed to use the empty string to represent empty bodies.
  • Fixed some bugs around mutable strings, and when strings are copied vs. mutated.

Other misc

  • The Go code has been refactored around more blocking APIs, dramatically simplifying the overall API around the parser and interpreter.
  • Updated test runner samples/suite.ink to have test descriptions for easier debugging on failing tests.