Skip to content
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

Boot build tool compatibility #920

Closed
pandeiro opened this issue Dec 20, 2014 · 12 comments
Closed

Boot build tool compatibility #920

pandeiro opened this issue Dec 20, 2014 · 12 comments

Comments

@pandeiro
Copy link
Contributor

The cider-jack-in command, hallowed be its name (and shortcut), will unfortunately not boot up a REPL and attach a client to it in projects that use Boot instead of Leiningen. This is unsurprising, given the predominance of lein, but boot support would be nice and, looking into it, the issues at play are simple and mostly confined to nrepl-client.el. Basically, they are:

  1. nrepl-project-directory-for needs to recognize build.boot in addition to project.clj files.
  2. nrepl-server-filter would need to adjust its regex to accept both lein's "nREPL server started on..." and boot's "nREPL server listening..." outputs

This would enable barebones support, with users using customization to specify "boot" as cider-lein-command and "repl -s wait" as cider-lein-parameters.

However... in the future, perhaps detection by cider for the appropriate defaults for those values on a per-project basis would be convenient to end users.

Question: would a pull request to implement the two immediate simple changes above be welcome? Or, is there any orientation in general on this question?

Thanks

@donmullen
Copy link

+1 I think we can do better than this : https://github.com/boot-clj/boot/wiki/Cider-REPL

@bbatsov
Copy link
Member

bbatsov commented Dec 21, 2014

@pandeiro Sure, I'll take a PR implementing this. Adding boot support has been on my roadmap since the Conj.

However... in the future, perhaps detection by cider for the appropriate defaults for those values on a per-project basis would be convenient to end users.

Doing a project type check will be trivial (locate-dominating-file ...). Guess we can add two extra vars - cider-boot-command and cider-boot-parameters for boot projects.

@bbatsov
Copy link
Member

bbatsov commented Dec 21, 2014

+1 I think we can do better than this : https://github.com/boot-clj/boot/wiki/Cider-REPL

@donmullen Lein has special support for nREPL middleware, which makes the setup simpler there. Not sure what we can do about boot. Guess I'll have to play with it (or someone should dig further into this).

@pandeiro
Copy link
Contributor Author

Cheers @bbatsov, I'll get to this soon but I'd like to be able to pass the tests (#922) first.

@cichli
Copy link
Member

cichli commented Dec 23, 2014

Similarly to how cider-nrepl provides a lein plugin to automate adding the dependency and middleware, we could maybe provide a boot task (or even just a fn for users to call in build.boot) that does the same thing?

bbatsov referenced this issue in boot-clj/boot Dec 25, 2014
- These things actually parse the banner to get the port and stuff...
@bbatsov
Copy link
Member

bbatsov commented Jan 9, 2015

@cichli Yeah, that'd be great.

@pandeiro Any progress with this?

@pandeiro
Copy link
Contributor Author

@bbatsov I've got a branch with boot support working and the existing tests passing.

I haven't added any tests b/c I couldn't find cider-jack-in specific tests to expand. (TBH I could use some help with that, if you find it necessary.)

My work is here. Let me know if I should submit the PR as-is or if it needs more work, please?

@pandeiro
Copy link
Contributor Author

@cichli Not sure how that would work, exactly... Would cider, if boot were detected, inject something into build.boot? That seems heavy on the magic to me.

Isn't the recommended method, a $HOME/.profile.boot with the cider-nrepl dependency, akin to $HOME/.lein/profiles.clj, good enough? No?

Or is there another way I'm not seeing?

@pandeiro
Copy link
Contributor Author

@bbatsov Looking at your line comments now; there is one further issue -- anecdotally it seems some projects have a project.clj and build.boot to facilitate use with either tool. Don't know how prevalent that is/will become, but how would you propose dealing with that? Ie, should cider maybe somehow allow the user to specify the jack-in command to use, as C-u cider-jack-in currently allows the user to select a project? Thoughts?

@bbatsov
Copy link
Member

bbatsov commented Jan 13, 2015

If both files are present we should prompt the user for input.

On Tuesday, January 13, 2015, Murphy McMahon [email protected]
wrote:

@bbatsov https://github.com/bbatsov Looking at your line comments now;
there is one further issue -- anecdotally it seems some projects have a
project.clj and build.boot to facilitate use with either tool. Don't know
how prevalent that is/will become, but how would you propose dealing with
that? Ie, should cider maybe somehow allow the user to specify the jack-in
command to use, as C-u cider-jack-in currently allows the user to select a
project? Thoughts?


Reply to this email directly or view it on GitHub
#920 (comment).

Best Regards,
Bozhidar Batsov

http://www.batsov.com

@pandeiro
Copy link
Contributor Author

OK that would be a completing read for 'lein' or 'boot'?

@bbatsov
Copy link
Member

bbatsov commented Jan 13, 2015

Yep.

On Wednesday, January 14, 2015, Murphy McMahon [email protected]
wrote:

OK that would be a completing read for 'lein' or 'boot'?


Reply to this email directly or view it on GitHub
#920 (comment).

Best Regards,
Bozhidar Batsov

http://www.batsov.com

bbatsov added a commit that referenced this issue Jan 14, 2015
implement boot support for cider-jack-in, closes #920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants