Comments (18)
from nrepl.
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.
Another option is to have nrepl actually call clojure.main/with-bindings so it starts picking up these kinds of changes automatically.
from nrepl.
from nrepl.
@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.
When I try to reproduce the java.lang.IllegalStateException
using nrepl version 0.2.13
, the set!
seems to work:
Is this issue tied to a specific version of nrepl?
from nrepl.
@mallt I doubt so. Did you try running something using expound?
from nrepl.
I tried with expound and it seems to work as well:
from nrepl.
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.
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.
@cursive-ide Could you check if you're still experiencing this issue? Thanks!
from nrepl.
@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.
user.clj is loaded very early in the Clojure runtime, before just about anything else, which seems increasingly weird to me.
from nrepl.
@puredanger When exactly is it loaded? Is this specified somewhere or the current behaviour is "accidental"?
from nrepl.
It’s loaded in the static initializer of RT which is pretty early.
from nrepl.
@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.
Btw, @cgrand I guess #101 solves this one as well, right?
from nrepl.
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)
- Avoid illegal reflective access HOT 14
- Support TLS server sockets HOT 8
- Get repl statistics (most called functions, time spent on execution..) HOT 1
- [EASY] Reflection Warning (with solution)
- Recommended practices for tools to listen to nREPL evaluations HOT 3
- Can't define dynamic var in nrepl HOT 4
- nrepl transports should `read` with `{:read-cond :allow}` options HOT 2
- project.clj on the main branch is still set to 0.9.0 HOT 2
- Document the -f option to nrepl.cmdline
- java.lang.ArithmeticException: long overflow at nrepl.bencode$read_long.invokeStatic(bencode.clj:128) HOT 9
- test suite fails on MS-Windows
- Please add examples to CLI doc
- Interrupt is broken on JVM 20+ HOT 13
- ClassCastException on re-connect to unix socket HOT 6
- [Request] New release + Docs update HOT 3
- nrepl wrongly prefers ip4 on dual stack systems HOT 4
- Fix bugged (TLS) accept loop HOT 1
- Ensure that the Clojure version is supported HOT 8
- `--interactive` doesn't work with `--socket PATH` HOT 1
- Server Sent Events support HOT 2
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 nrepl.