samestep / boot-refresh Goto Github PK
View Code? Open in Web Editor NEWA Boot task used to reload Clojure code on the fly while developing.
License: MIT License
A Boot task used to reload Clojure code on the fly while developing.
License: MIT License
Basic Idea:
Trying to run (boot (refresh)) failed without much information.
Expected:
(boot (refresh))
...error report
Actual:
"java.lang.IllegalStateException: Can't set!: *e from non-binding thread"
Details:
I have my doubts that this is a boot-refresh issue. I can easily see it being a problem in clojure.tools.namespace, boot, or even CIDER or nrepl. Or maybe just that I need to buckle down and learn a refactoring library. But I figured I should start somewhere, asking someone who might have ideas about where to go with it. And...maybe.
I'm using the straight 0.1.0 release in a pretty vanilla project. I've added some dependencies on some logging libraries, clojure 1.9.0-alpha17, and org.clojure/spec.alpha 0.1.123. It's basically a homework assignment.
After a refactoring session, trying to run (boot (refresh)) from CIDER (I'm not sure whether that matters or not) failed with "java.lang.IllegalStateException: Can't set!: *e from non-binding thread"
Doing a google search for that led me to https://stackoverflow.com/questions/43077104/boot-refresh-cant-set-e-from-non-binding-thread.
Digging through the nrepl message buffer didn't reveal anything interesting, except a map of the namespaces that it was trying to refresh.
Going back through those one at a time in dependency order revealed that the actual problem was that I'd moved a function but was still trying reference it directly from the original ns.
The actual problem for me was trivial, since I'm dealing with about half a dozen namespaces. If this had been a bigger project, though...I guess I could have tracked it down by killing my JVM and debugging the errors as I tried to start it back up.
Yuck.
Any thoughts about who we should point this out to?
Thanks,
James
I execute "boot repl watch refresh" but then I don't have access to the repl anymore. Instead the following text gets displayed:
Starting file watcher (CTRL-C to quit)...
:reloading (ignition-project.core)
Elapsed time: 0.039 sec
The display is now only used to show when a file changes. The repl is gone. How do I get it back?
Is there a way I can use this from the command line?
I am trying to figure out how to get a clojure REPL that gets clojure code reloaded each time a source file changes.
I am executing this command on the command line:
boot watch refresh repl -n ignition-project.core -p 6000 -s
That creates a repl server that gets its code reloaded each time. This works! Yay.
I can make a client repl connection to the repl server. But when the source code changes the client repl does not get the code update. I have to close the client repl connection and make a new client repl connection to see the code changes. Is there anyway to make this work so that my client repl gets the code changes without having to close the client repl and start a new one?
Any help with this is much appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.