-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add :reload
Support
#343
Comments
Running into this issue as well. Any ideas @borkdude ? |
Sure, |
Pointers would be nice. I guess here's where the magic should happen.... I read |
Yes. If the namespace is already loaded, which is discovered here: Line 282 in 6485523
then we just handle the aliases etc, but don't reload the namespace. I think right there the Note that I don't use CIDER for developing nbb, just |
Not sure if this is of any help but here is a minimal single-script reloader for nbb that seems to work reliably for me. It depends on (ns hello
(:require
["node-watch$default" :as watch]
[nbb.core :refer [load-file *file*]]))
(print "hello")
(defonce watcher
(watch *file* (fn [_event-type filename]
(js/console.log "Reloading" filename)
(load-file filename)))) |
Fixed in 1.3.195 |
Is your feature request related to a problem? Please describe.
I would like to run
nbb
from a JS program which is itself running in a "watch loop". The blocker is that dependencies of thenbb
scripts won't reload when changes are made to them.Describe the solution you'd like
I'm not opinionated about the solution, but it sounds like adding support for
:reload
may resolve this issue.Describe alternatives you've considered
nbb
seeing a file was modified and reloading the namespace accordingly (but this is a naive approach and may not be the responsibility ofnbb
itself)Additional context
see eleventy-test-cljs for a "minimal" repro of the problem. Also refer to the original slack thread.
The text was updated successfully, but these errors were encountered: