Comments (9)
Hrm, I'm not sure how that could ever happen. Is the affected project public so I can take a look?
from austin.
unfortunately no, but my workflow was to run the following:
(def repl-env
(reset! cemerick.austin.repls/browser-repl-env
(cemerick.austin/repl-env)))
(cemerick.austin.repls/cljs-repl repl-env)
Then disconnect with :cljs/repl
, then reconnect again with
(cemerick.austin.repls/cljs-repl repl-env)
from austin.
I think you mean :cljs/quit
?
If you do that, then REP Loop will stop, which causes the environment to be teared down. In Austin, this translates into the session being dissoc'ed from the global map. This explains the NPE, though of course it's a horrible (lack of) error message!
There's not a lot that Austin can (or should, I think) do differently here (error messages aside). :cljs/quit
really has only one meaning w.r.t. ClojureScript REPLs; and, actually, not quitting Austin REPLs is technically a memory leak (since it's the only signal it has to drop sessions, though you'd need many thousands of discarded Austin REPL sessions to actually cause any problems).
Re: workflow, why are you quitting and then attempting to "reconnect"? Is it so you can move back and forth between Clojure and ClojureScript? If so, I'd suggest having dedicated REPL sessions; one for Clojure, and perhaps many for each ClojureScript runtime. Your nREPL client should have a "clone session" operation that will allow you to create the latter from the former at any time without creating multiple connections to the nREPL backend…
from austin.
It's the latter - I was trying to get back to the main repl and reboot, since I was getting SocketClosedException (or something phonetically similar, working from memory) on certain page reloads when the browser repl tried to reconnect. I'll try cloning my nrepl (now cider, I guess?) session and report back if I can repeat any recreations of that bug.
Thanks, Chas! Austin is fantastic. I pushed my first Clojurescript code out to master yesterday; Austin makes the repl experience really delightful. This is a feeling I've been chasing for some time.
from austin.
Sounds unfriendly. If you can replicate the exception, I'd love to look at it. If you ever do want to get a fresh REPL, you have to quit, create and reset!
the REPL environment, and then start it up again via cljs-repl
.
Glad you've found it useful so far, despite the sharp edges. I'll get a better error message in there for the post-quit reconnection failure shortly.
from austin.
Great, good to know. So the repl-environment is hosed once someone disconnects... makes sense, and a good error message should clear that up. I'll add some docs to my internal project.
from austin.
@sritchie Did you end up verifying that your emacs config was somehow provoking your Austin troubles?
from austin.
No, even a slim config ended up flaming out. Bumping Xmx delayed the issue, but it still arrived.—
Sent from Mailbox for iPhone
On Wed, Feb 12, 2014 at 5:24 AM, Chas Emerick [email protected]
wrote:
@geraldodev no, that looks very different; interesting error condition there. Could you open a new issue?
@sritchie Did you end up verifying that your emacs config was somehow provoking your Austin troubles?
Reply to this email directly or view it on GitHub:
#22 (comment)
from austin.
Closing this; the original issue is now embodied in #51.
from austin.
Related Issues (20)
- Eliminate use of CrossPageChannel HOT 3
- Fail gracefully on attempts to use REPL env with disposed session
- Austin should not declare its own ClojureScript dependency HOT 5
- Cljs compiler env doesn't correspond to a refreshed browser env, with (disastrous!) consequences HOT 6
- NullPointerException with Clojurescript 0.0-2173 HOT 5
- NPE against org.clojure/clojurescript "0.0-2173" HOT 1
- Incompatibility with cljs 2173 HOT 1
- austin/exec-env fails w/ cljs 0.0-2173 HOT 3
- Hot reloading of HTML files not working in example project HOT 4
- Inexplicable problems with sample project HOT 3
- Can't require namespaces HOT 1
- Initial namespace not setup properly HOT 1
- Add support for adding JS dependencies. HOT 1
- tools.logging aot issue HOT 2
- Austin not compatible with cljs-2356 HOT 4
- clojurescript 0.0-2665 cannot compile austin 0.1.5 HOT 7
- Add production profile to browser-connected-repl-sample
- After loading (cemerick.austin.repls/exec), forms hang at repl prompt HOT 5
- After loading (cemerick.austin.repls/exec), austin fails with "No value supplied for key:" HOT 4
- Can't start repl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from austin.