Fork me on GitHub

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!


A setup for developing in a container


@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?


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


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.


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.


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 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


See -- that will be possible out-of-the-box via :target-dir (which exists) and whatever modification of :overwrite I end up with.

🎉 3

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


@gmercer Currently this channel serves 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 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 (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


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

to add the path to your local t.d.a ahead of that.




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.


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-aliases {help }}


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


s/profile/alias/ 🙂

Cam Saul23:08:15

haha I'm still getting used to that


Is there an question or JIRA ticket relating to this?


(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 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

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