Skip to content

WIP: Implement REPL with non-blocking mainloop

Evan Welsh requested to merge ewlsh/nova-repl into master

This MR implements a non-blocking REPL using Node's internal readline to provide ANSI key parsing and terminal manipulation. It uses Gio UnixStreams on supported platforms and falls back to our previous gets implementation on unsupported platforms (export GJS_REPL_NO_MAINLOOP=true is provided to test the fallback)

Prior Art

Demo

Screenshot_from_2022-01-16_16-23-47

Changelist

  • Implement a basic Repl using Gio Unix streams and Node's readline utilities
  • Include a fallback on blocking reads for Windows and other unsupported platforms
  • Replace Console.interact() with new Repl().run()
  • (temporarily) add a -i flag to start the Repl specifically.

Closes #76

Edited by Evan Welsh

Merge request reports