Skip to content
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

Xiana hotreload/livereload #287

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Xiana hotreload/livereload #287

wants to merge 9 commits into from

Conversation

gmsvalente
Copy link
Contributor

Xiana hotreload/livereload

Description

This PR adds a Hotreload/Livereload to Xiana.

Tester info

Check if server is restarted when saving changes.

Completion Checklist

  • Add description of the changes made here to the changelog file
  • Update the documentation as necessary

Copy link
Contributor

@puchka puchka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this error while testing the hot reloading feature

Exception in thread "async-dispatch-1" java.lang.NullPointerException: Cannot invoke "clojure.lang.IFn.invoke()" because "this.restart_fn" is null
        at xiana.hotreload$hotreload$fn__11268$state_machine__8002__auto____11285$fn__11287$fn__11289.invoke(hotreload.clj:42)
        at xiana.hotreload$hotreload$fn__11268$state_machine__8002__auto____11285$fn__11287.invoke(hotreload.clj:38)
        at xiana.hotreload$hotreload$fn__11268$state_machine__8002__auto____11285.invoke(hotreload.clj:38)
        at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:978)
        at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:977)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:982)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:980)
        at xiana.hotreload$hotreload$fn__11268.invoke(hotreload.clj:38)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at clojure.core.async.impl.concurrent$counted_thread_factory$reify__1774$fn__1775.invoke(concurrent.clj:29)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.base/java.lang.Thread.run(Thread.java:833)

I made a minimal reproducible example here: https://github.com/puchka/hello-xiana/tree/test/hotreload

src/xiana/hotreload.clj Outdated Show resolved Hide resolved
@jiriknesl
Copy link

Why is this still open? Can we finish it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants