tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
practicalli-john 2020-07-22T16:50:03.462900Z

I'm using https://github.com/seancorfield/clj-new to add a new file/namespace called handlers to an existing project, practicalli/banking. I assume this is the right command given an alias called :new in my user level deps.edn file. It seems to work okay.

clojure -R:new -m clj-new.generate ns=practicalli.handlers
cc @seancorfield

seancorfield 2020-07-22T16:54:09.464100Z

That's a reasonable approach. I'd probably add a :gen alias so I didn't have to type -m clj-new.generate each time.

seancorfield 2020-07-22T16:54:57.465Z

(caution: the generators are very primitive and not particularly well thought out -- I don't actually find them valuable and I would prefer they not be promoted as a way to do anything!)

seancorfield 2020-07-22T16:55:35.465600Z

At some point, they'll probably be completely rewritten (in a new ns, naturally).

practicalli-john 2020-07-22T17:21:27.469600Z

Ok, thanks. I only just used it today for the first time successfully. I tried previously but was getting an error as I didnt include any kind of clj-new alias, so content in just getting it working for myself 🙂

practicalli-john 2020-07-22T17:22:10.470100Z

I am more interested in writing some templates to use with clj-new, so will focus on that instead, which I assume is quite stable.

seancorfield 2020-07-22T17:31:00.470900Z

@jr0cket Yup, if you run into any problems, feel free to DM me about it.

seancorfield 2020-07-22T17:31:41.471700Z

The built-in app/lib templates are probably a good place to get started. Also let me know if you have suggestions for improving the README around writing templates.

👍 1
2020-07-22T21:21:54.475800Z

What's the best way to run a socket or nrepl server locally? The scenario is that we have a windows user with a deps.edn project that is having trouble getting a repl started in IntelliJ. I was thinking he could just run a socket REPL and jack in. I see aliases for nrepl https://nrepl.org/nrepl/usage/server.html as well as socket repl directions https://clojure.org/reference/repl_and_main#_launching_a_socket_server. Any recommendations besides having an accident and getting a Mac instead?

2020-07-23T15:26:00.498800Z

Nice. Thanks! I think 90% of the answers are in Sean Corfield's deps.edn file.

salam 2020-07-23T15:27:31Z

yup, i personally found a lot of gems in there. 🙂

2020-07-22T21:43:01.476Z

Should this be the right invocation? clj -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"

2020-07-22T21:48:58.476300Z

Got it! From https://oli.me.uk/exploring-repl-tooling-with-prepl/:

clj -J-Dclojure.server.jvm="{:port 5555 :accept clojure.core.server/repl}"