janet-lang / spork

Various Janet utility modules - the official "Contrib" library.
MIT License
122 stars 35 forks source link

netrepl disconnects Conjure client on errors #42

Closed goto-engineering closed 3 years ago

goto-engineering commented 3 years ago

Whenever I'm connected via nvim/Conjure to a Janet netrepl process, and I somehow cause an error (e.g. by evaluating invalid code), my Conjure gets disconnected.

E.g. when I evaluate the following file multiple times: https://github.com/subsetpark/janet-dtgb/blob/master/test/dtgb.janet (deftest in Testament throws an error if you define the same test multiple times, as in re-evaluating the same file 2x).

Here's what I see in the netrepl process (w/ valgrind):

valgrind janet -l spork/netrepl -e '(server)'
==1641048== Memcheck, a memory error detector
==1641048== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1641048== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==1641048== Command: janet -l spork/netrepl -e (server)
==1641048==
Starting networked repl server on 127.0.0.1, port 9365...
client Conjure connected
closing client Conjure
goto-engineering commented 3 years ago

Fixed in Janet e7ea39f4