-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jack in to babashka repl without Clojure project #3179
Comments
That's just a matter of setting |
Having an option prompt would be great. I don't always want it to be Babashka, I'd want to pick which one. |
Got it. |
Instead of having extra-configuration or extra user input every time you start cider-jack-in why not to create something like cider-jack-in-bb? |
@vlnn That's a simple solution as well, but it's a slippery slope to have a jack-in command for every possible Clojure runtime. I'm not saying we won't do it, but I'm definitely cautious about this path. |
@bbatsov I agree, but making jack-in process longer and requiring user input is a bit worrying. Actually worrying me a lot! And it wouldn't be easy to pre-configure destination, as sometimes user may want to jack-in "unusual" environment. So it would be nice to have some kind of agreement here before writing the code (maybe temporary agreement!). |
There could be a |
@didibus Technically speaking there's no "standard" But yeah - in general I was thinking of some command that prompts you for the backend to run, which might not even be a Clojure dialect down the road. |
May I suggest a way to jack in to any nREPL without a project by still using
(Any new nREPL project tools can be assigned the next available numeric prefix argument) or any variance of this, e.g. remove point 5, and I have tested this to work fine in a prototype for the first four cases. Thanks |
@ikappaki I've always been a bit skeptical about prefix arguments as their discoverability is not exactly great. Obviously your suggestion will work, but I'm afraid few people will ever figure this out. I'm also wondering how will people remember which number corresponds to which tool. Sometimes I wonder if it won't be best to just make the default command always ask you for the tool to use and the directory to use, and to attach the current behaviour (figure out stuff automatically) either a different command or some defcustom. The years have taught me that explicit is usually better than implicit and you use jack-in so rarely that pressing a few more keys in the process is probably not a big deal for most people. |
Hi @bbatsov
I agree with the difficulty about discoverability since these won't be visible via tab completion. The number correspondence thought should be available in the fn's docstring (I assume here that people do know how to look into fns help).
I think for this particular feature (just bring up an nREPL without the notion of a project dir), we only have to care about which tool to invoke, the start up dir then becomes irrelevant? How about another suggestion that also asks the user about which tool to invoke
Please take these suggestions as food for thought to aid the discussion, rather than something I am vehemently pushing for, since I could be totally off.
Would you care to elaborate a bit more on this please? Thanks |
It's better for people to clearly understand how something is working instead of relying on assumptions that might to be true (e.g. they believe something works in one way internally, but it's actually different and so on). Supposedly implicit solutions have better UX, but that's true only if their behavior really matches one's expectations. At any rate - I like your second suggestion better, so I'd be happy to review a PR implementing it. We've been talking about |
To me, this translates to the docstring clearly describing the fn expected behavior, though not sure we are talking about the same area (UI vs fns) :)
Raised #3300 for it.
I've turned the |
Sometimes I like to start ephemeral REPL sessions to play around with some idea and I don't need to persist files or have a project for it.
Right now you can cider-jack-in without a project or a file, in some empty clojure buffer, and Cider asks you if you want to run cider-jack-in without a project, which will start a Clojure REPL.
I was wondering if we could have the same functionality but for a bb repl as well?
The text was updated successfully, but these errors were encountered: