Giter VIP home page Giter VIP logo

Comments (18)

bbatsov avatar bbatsov commented on May 30, 2024

from nrepl.

cursive-ide avatar cursive-ide commented on May 30, 2024

Realistically, probably not - I have a ton of stuff on and I'm about to travel, so I'm unlikely to get to this any time soon.

from nrepl.

puredanger avatar puredanger commented on May 30, 2024

Another option is to have nrepl actually call clojure.main/with-bindings so it starts picking up these kinds of changes automatically.

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

@puredanger Do you mean we should replace https://github.com/nrepl/nREPL/blob/e77945a70f68989f69e955eef9e6cbe75cedacf4/src/clojure/nrepl/middleware/interruptible_eval.clj#L85 ?

Seems it was done due to some problem with the behaviour of clojure.main. I'm not very familiar with this part of the codebase, so some guidance/help would be appreciated.

from nrepl.

mallt avatar mallt commented on May 30, 2024

When I try to reproduce the java.lang.IllegalStateException using nrepl version 0.2.13, the set! seems to work:
image

Is this issue tied to a specific version of nrepl?

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

@mallt I doubt so. Did you try running something using expound?

from nrepl.

mallt avatar mallt commented on May 30, 2024

I tried with expound and it seems to work as well:

image

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

Interesting. It seems to me that this should be broken, so I'm really puzzled that it works. Maybe we just inherited the binding from clojure.main?

from nrepl.

mallt avatar mallt commented on May 30, 2024

Could someone else perhaps check this as well? Maybe it works on my machine by some coincidence.
I start lein repl in a test project with [org.clojure/clojure "1.9.0"] and [expound "0.7.1"] as dependencies. Thanks!

from nrepl.

mallt avatar mallt commented on May 30, 2024

@cursive-ide Could you check if you're still experiencing this issue? Thanks!

from nrepl.

cursive-ide avatar cursive-ide commented on May 30, 2024

@mallt Sorry this took so long. I just tried this with 0.2.13, what I see is that the set! works in the REPL, but produces the IllegalStateException when set in user.clj.

from nrepl.

puredanger avatar puredanger commented on May 30, 2024

user.clj is loaded very early in the Clojure runtime, before just about anything else, which seems increasingly weird to me.

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

@puredanger When exactly is it loaded? Is this specified somewhere or the current behaviour is "accidental"?

from nrepl.

puredanger avatar puredanger commented on May 30, 2024

It’s loaded in the static initializer of RT which is pretty early.

from nrepl.

cgrand avatar cgrand commented on May 30, 2024

@puredanger @bbatsov @cursive-ide but when user.clj is loaded the dynamic scope is small: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L473-L476
It's run by the static init of RT so it's run before almost anything Clojure-related. I believe the issue is not related to nREPL.

from nrepl.

bbatsov avatar bbatsov commented on May 30, 2024

Btw, @cgrand I guess #101 solves this one as well, right?

from nrepl.

cgrand avatar cgrand commented on May 30, 2024

No. It's not solved by #101 because my understanding is that it's not a repl problem -- no matter which repl. (I just tried with clj.)

Yes you can close it.

The problem is that you can't set! *explain-out* in user.clj because it's loaded very early.
If

from nrepl.

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.