REPL Interactivity
Hi, I am having the same issue like described here: #4 (closed)
I am using the latest Love2d stable version (11.5.0) and Fennel 1.5.3
When I change e.g. love.draw fn in my mode and I eval the same buffer (e.g. mode-intro.fnl) via (fennel-reload) (or C-c C-k) then no changes are propagated.
For now I came up with a workaround and I have upgraded set-mode in wrap.fnl to following:
(fn set-mode [new-mode-name ...]
;; Clear the cache for the incoming module
(tset package.loaded new-mode-name nil)
;; Now require will re-read and re-execute the file
(set (mode mode-name) (values (require new-mode-name) new-mode-name))
(when mode.activate
(match (pcall mode.activate ...)
(false msg) (print mode-name "activate error" msg))))
So when I switch mode then all changes are reloaded but that is far from ideal.
Edited by Jakub Zika