jasongilman / proto-repl

A Clojure Development Environment package for the Atom editor
https://atom.io/packages/proto-repl
MIT License
565 stars 50 forks source link

Inject proto-repl and tools.nrepl deps for clojure CLI based projects #299

Open roman01la opened 6 years ago

roman01la commented 6 years ago

This is a follow up PR for #289. Currently a project owner has to specify manually proto-repl and tools.nrepl deps in his deps.edn in order for Proto REPL to be able to start nREPL server. This PR ads -Sdeps CLI flag which injects both dependencies that automatically merged with deps.edn contents when the REPL starts. Cider does this as well.

seancorfield commented 6 years ago

I think it would be very valuable to have a way to specify additional arguments for the CLI command in the packages settings, the way you can for Boot, Leiningen, and Gradle. This would allow you to specify aliases to pull in dependencies for your preferred tooling. In many ways, I would prefer this approach over auto-injection of -Sdeps since the alias approach allows devs to control which versions of which tools get added.

I know CIDER does the auto-injection thing and I assume this is inspired by that?

seancorfield commented 6 years ago

Just to clarify: I'm not against this PR -- it is definitely needed for the base case, since no one is going to put proto-repl / tools.namespace in their regular deps -- they would use an alias to pull that sort of stuff in.

seancorfield commented 6 years ago

I see that a similar injection for Leiningen #176 has remained open since Nov 2, 2016 (the suggested change to split args differently seems like a better way to go).

roman01la commented 6 years ago

Agreed. Separate field in plugin settings would be more flexible. Will add required changes soon.

seancorfield commented 6 years ago

Is this something I can help with? I'm keen to see better support for clj/deps.edn in ProtoREPL.

DeLaGuardo commented 5 years ago

I made a PR with adding separate field for passing throw clj arguments - https://github.com/jasongilman/proto-repl/pull/307

eneroth commented 5 years ago

This is great. I'm currently sending my proto-repl dependencies to Ions out of laziness.