Fork me on GitHub
#tools-deps
<
2021-08-06
>
seancorfield04:08:31

I'm looking for feedback on clj-new 2.0. Feel free to jump into #clj-new or just reply here in a thread. Thank you!

tvaughan12:08:09

A setup for developing in a container

seancorfield17:08:05

@U0P7ZBZCK Can you elaborate on that? I don't understand why developing in a container is different locally, from the p.o.v. of clj-new?

tvaughan17:08:25

Sorry, I only read as far as "your wish-list" on first glance. I think what I'm after is simply a template for developing in a container. So yeah not really a helpful contribution after reading the rest of the post

seancorfield17:08:14

I meant "I don't know what a template for developing in a container would look like" -- I don't understand why it would be different to the default app or lib template.

seancorfield17:08:43

I'm happy to add/modify the built-in templates to make "developing in a container" easier -- but I don't know what that entails.

tvaughan18:08:32

Ah ok. For example, I structure my projects where the top-level directory is "what runs on my laptop," e.g. what's required to create and run the container and then "what runs inside the container" is in a sub-directory, like https://gitlab.com/tvaughan/kibit-runner. For larger projects involving multiple containers, as well as limiting the host mounted volume to each project's sub-directory instead of the top-level directory (see the top-level Makefile) this layout has been really helpful

seancorfield18:08:52

See https://github.com/seancorfield/deps-new/issues/4 -- that will be possible out-of-the-box via :target-dir (which exists) and whatever modification of :overwrite I end up with.

🎉 3
gmercer08:08:32

Is there a seperate tools.build channel ? Should there be ? Just wanting some help on correctly setting the Main-Class in the jar MANIFEST.MF

seancorfield17:08:04

@gmercer Currently this channel serves tools.build as well as t.d.a -- I'll update the topic to make that clearer.

Cam Saul23:08:02

With the Clojure CLI is there an easy way to make it use a different version of the tools.deps.alpha or tools.build libs (for local development)? Or would I have to build and install a new version of the CLI? I want to point the CLI to a fork to t.d.a on my local machine... I have a patch that adds support for an optional :aliases argument to clojure.tools.cli.api/prep (i.e., lets you do clojure -X:deps prep :aliases '[:my-additional-alias-to-prep]' ). I have it working locally with a -T command I wrote to wrap the call to c.t.cli.api/prep but wanted to actually confirm it works with -X:deps so I don't waste Alex's time with untested patches

seancorfield23:08:46

@camsaul I think you would need to modify clojure, around line 274:

tools_cp="$install_dir/libexec/clojure-tools-$version.jar"
to add the path to your local t.d.a ahead of that.

seancorfield23:08:38

tools_cp="/path/to/your/t.d.a:$install_dir/libexec/clojure-tools-$version.jar"

seancorfield23:08:13

Oh, wait, no. It's easier than that. You just want -X:some-alias (instead of -X:deps) where :some-alias loads your t.d.a instead.

seancorfield23:08:04

I think you could even use :deps in a user or project deps.edn which would "win" over the root deps.edn alias, which is:

:deps {:replace-deps {org.clojure/tools.deps.alpha {:mvn/version "0.12.1003"}
                          org.slf4j/slf4j-nop {:mvn/version "1.7.25"}}
           :ns-default clojure.tools.cli.api
           :ns-aliases {help }}

seancorfield23:08:57

I used to have :deps in my user deps.edn pointing to the add-lib3 branch on GitHub (but renamed it because it shadowed the root :deps alias!).

Cam Saul23:08:36

oh yeah, adding a :deps profile alias and replacing t.d.a. with a :local/root coordinate did the trick. Thanks @seancorfield

3
seancorfield23:08:56

s/profile/alias/ 🙂

Cam Saul23:08:15

haha I'm still getting used to that

seancorfield23:08:22

Is there an http://ask.clojure.org question or JIRA ticket relating to this?

seancorfield23:08:07

(I don't see anything on ask but may not have searched for the right terms)

Cam Saul23:08:46

I don't think there's an http://ask.clojure.org question or JIRA ticket, but I asked Alex about it 3 or 4 weeks ago in this Slack channel and he said it's something he was planning on adding in the near future. Thought I could save him a bit of trouble since I have it working locally. I'll create an Ask question and JIRA issue for it in a second

3
👍 3
seancorfield23:08:56

(mostly so I can go vote for it 🙂 and also look at the patch out of curiosity)