Git Product home page Git Product logo

Comments (9)

cemerick avatar cemerick commented on July 2, 2024

Hrm, I'm not sure how that could ever happen. Is the affected project public so I can take a look?

from austin.

sritchie avatar sritchie commented on July 2, 2024

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.

cemerick avatar cemerick commented on July 2, 2024

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.

sritchie avatar sritchie commented on July 2, 2024

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.

cemerick avatar cemerick commented on July 2, 2024

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.

sritchie avatar sritchie commented on July 2, 2024

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.

cemerick avatar cemerick commented on July 2, 2024

@sritchie Did you end up verifying that your emacs config was somehow provoking your Austin troubles?

from austin.

sritchie avatar sritchie commented on July 2, 2024

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.

cemerick avatar cemerick commented on July 2, 2024

Closing this; the original issue is now embodied in #51.

from austin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.