Open akandratovich opened 12 years ago
No problem here using Leiningen 2 (preview 6) with clojure 1.4.0 and Sublime REPL 1.0.41 on Ubuntu 12.04.
// windows 7
Exactly the same issue on windows XP. Seems to start up well but no reaction on text enter, The jvm process that is spawned also doesn't change its memory usage or anything of the sort so I suppose it's not getting the commands
Btw, using: leiningen-2.0.0-preview7 sublimerepl 1.0.41
same issue here
EDIT here's what I found after a bit of investigation.
from subprocess import Popen, PIPE
cmd = "C:\\users\\icholy\\.lein\\bin\\lein.bat repl"
p = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE)
# all good
p.stdout.read(1)
# hangs
# child process steals stdin somehow?
The same thing here on Windows 7. Has anyone figured this out? It starts and displays the greeting :
nREPL server started on port 19909
REPL-y 0.1.0-beta8
Clojure 1.4.0
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
(user/sourcery function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from clojuredocs.org: [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
user=> (+ 1 2 3)
After input it just hangs. Backspace won't work. Only after pressing Ctrl-D (Which stops the repl), the text becomes editable. Why is this not filled as a bug?
@6D65 I think this problem is beyond the scope of this project. It's an issue with the way Popen interacts with leiningen.
@icholy I would argue that the project claims to work with clojure on windows and more specifically with leiningen, so it's technically a bug. But i do understand that is a one man project, so i'll try to figure it out myself how to fix it. Thanks for the hint of where the bug might be. Need to relearn some pdb techniques.
@6D65 I posted the easiest way to reproduce the issue a few posts up (in case you didn't see).
Here's what Leiningen's author has to say about the change on that side which broke things here.
OK, OK. You will get nREPL implementation. Happy? ;)
Development will take place in this branch: https://github.com/wuub/SublimeREPL/tree/nrepl
woot!
Sure, I'm happy. It would be great to have another decent Clojure development environment and with nREPL there's a lot of IDE-type functionality that you don't need to build into Sublime Text or its plugins.
I would love to see this working - Is there any progress on nREPL support? Is there something I could help with?
Is there any progress on nREPL support?
Little & slow, as usual. SublimeREPL is developed in bursts and recently IPython integration had higher priority (scratching my own itch and all that)
Is there something I could help with?
Actually, yes. Use cases, test scenarios, prioritizing features. Something similar to what hootener did for R (http://www.sublimetext.com/forum/viewtopic.php?f=3&t=5802)
Some context: coding and reverse engineering is relatively easy (and fast) compared to two most time consuming tasks:
1) getting to know the ecosystem and how people are using the more advanced tools (think: Pry, IPython, R or nREPL/Clojure/lein) easily burns through more than half of my time spent on SublimeREPL. Tutorials/articles/documentation is a place to start, but considering that most of the time my initial contact with a language's repl looks like this https://github.com/wuub/SublimeREPL/blob/439a56b09af9a58f22433f1dd11f2f3259add594/nrepl.py tutorial 101 is not going to helping much.
2) cross platform compatibility (especially wrt. windows, but subtle differences between OSX & Linux are "fun" as well)
There is little that can be done about 2. But having an expert input definitely helps with 1. Someone wiling be a mix of stakeholders/product owner for nREPL integration could definitely improve things .
Ok, here's the very short answer, maybe we can skype for half an hour or so in the next few days to discuss how exactly I can help... Just drop me an email if you want to do that. First, I am currently learning clojure, so I am probably not the expert you are looking for. But I'll try to help anyway. What I'd like to do at the moment is start a REPL from the console with
lein repl :headless
and then connect SublimeREPL to the port where the nREPL server is running. I am not sure if it's necessary to start leiningen directly from SublimeText (what "SublimeREPL: Clojure" does), because I want to run leiningen in a directory that is specific to my current project, and AFAICT this can not be configured per-project at the moment...
Hi,
Is there anything happening with this issue at the moment? I am also experiencing it.
Razvan
Is there anything happening with this issue at the moment? I am also experiencing it.
@emestee is trying to fix it in this fork https://github.com/emestee/SublimeREPL/
it's a lot of work and as far as I know there is no ETA, but I'm pretty sure that once it's done, it will rock our socks off.
The bulk of work already has been done. Now I need to find time to iron out cosmetics (correct REPL prompt, UI to select host/port, read new leiningen files, embedded repl commands) and some advanced features (correct session support etc). As a very basic tool nrepl integration works right now. I will probably add some patches over the weekend as well.
I have a similar problem on Ubuntu 13.04, Sublime Text 2.0.1 Build 2217, SublimeREPL 1.3.4. Clojure open REPL with no problem, however enter does not work, I can keep typing, no results are back:
nREPL server started on port 52848
REPL-y 0.2.0
Clojure 1.5.1
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
user=> (+ 3 4)
fdsal;
Please try my (very alpha) branch https://github.com/emestee/SublimeREPL/tree/with-nrepl
I'm in the same boat; trying to switch from Emacs to SL2. In my case, I'm not even using Lein, I have a Gradle build that starts nREPL. In my case (OS X, Clojure 1.5) the REPL window just says empty ... no prompt, nothing.
I'm having decent luck with the branch; occasionally it goes "wonky" (fills the nREPL window with errors when I attempt to load a file) and I have to start a new nREPL session.
Open an issue please
@emestee Working good here, Windows 7, Clojure 1.5.1, Leiningen 2.3.4, Sublime Text 2.0.2, build 2221
any progress or update?
@nevenavv - did you just install and go? I have similar (exact same?) config and not working here...
windows 7 Clojure 1.5.1, Sublime Text 2 - Version 2.0.2, Build 2221
C:\Users\xyz>lein -v Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
leiningen is in the path
@nevenavv Can you share your settings with us? I have the same system, same software, but cannot get sublimeREPL work...
Issue still seems to exists. Is there a workaround that allows us to use lein 2.x with SublimeREPL?
I am having the same issue. Any known workarounds for this?
I just installed sublime text 3 on Windows 10 along with the plugin and I'm getting the same results as everyone above. Has there been any progress on the issue?
I found a workaround here: Workaround
REPL is now happy with Sublime Text 3 on my Windows 10 machine. :)
Leiningen 2 uses nREPL and REPL-y. Sublime REPL doesn't work with it.
No errors - just no reaction on input.