Fork me on GitHub
#tools-deps
<
2019-01-16
>
seancorfield00:01:43

You can still produce an uberjar and/or wrap it in a bash script https://github.com/seancorfield/depstar

πŸ‘ 5
souenzzo03:01:19

About depstar/tools-deps jar'ing: I need to deliver a jar that will run with java -jar my.jar. It's a client requirement. There is some way to create it using tools-deps eco-system?? PS: without use things like clj -A:lein -m lein.uberjar

richiardiandrea04:01:33

I am using https://github.com/juxt/pack.alpha but I am not exactly sure it does the same as leiningen

dominicm18:01:15

Pack works differently to leiningen, intentionally.

seancorfield18:01:27

I started to look at adding manifest support to depstar and realized I'd have to deal with AOT/`compile` unless you just set Main-Class: in the manifest to clojure.main... and I didn't have any enthusiasm for fixing that part πŸ™‚ I may take another run at that at some point (it seems like it needs to create a temp folder, add it to the classpath, bind *compile-path* to that temp folder path, and run clojure.core/compile for the named main namespace … which just seems like a lot of work, just to enable java -jar and not need -m entry.point!).

dominicm18:01:23

@seancorfield can depstar take a flag to add a folder? That's how pack makes AOT work

seancorfield18:01:30

depstar deliberately takes no options at the moment. It's "simple", rather than "easy" πŸ™‚

souenzzo00:01:11

Maybe someone will make this simple thing easy... 😜

ajoberstar01:01:49

@alexmiller Still looking for community contributions on the Windows clj script? I'm interested and have PowerShell experience. (Sorry for the dupe if you already saw my previous post and just haven't had a chance to reply.)

Alex Miller (Clojure team)01:01:30

I saw it, thx, just been busy on other stuff

πŸ‘ 5
souenzzo03:01:19

About depstar/tools-deps jar'ing: I need to deliver a jar that will run with java -jar my.jar. It's a client requirement. There is some way to create it using tools-deps eco-system?? PS: without use things like clj -A:lein -m lein.uberjar

seancorfield03:01:56

@souenzzo yes some of the tools.deps libraries add a manifest when building an uberjar. I had it in depstar at one point but preferred fewer options.

πŸ‘ 5
seancorfield03:01:19

Open an issue and I'll put that code back in. Or you can try the other tools. I'm on my phone so I can only point you at the wiki in the tools.deps repo for a list.

seancorfield06:01:59

(It would help if Issues were enabled for my project I guess… fixed!)

dominicm18:01:23

@seancorfield any advice for running clj on WSL? Gotchas to be aware of? Preparing for a training course, I seem to have edge working, but I'm expecting real life issues.

seancorfield18:01:53

The only annoying thing I've run into is that if you edit code on Windows, connected to a REPL of any sort running on WSL, any file-level ops you attempt will fail due to the mismatch of filepaths between the two environments. For example, a hot key to "load file" in your editor will generally send a full file path to the REPL, which in this case will start with C:\… when the WSL REPL is expecting /…

seancorfield18:01:25

My workaround for that is select-all, eval-selection (but I may try to "fix" it in Chlorine directly).

seancorfield18:01:26

Oh, caveat for that: I use a project repo path on Windows of something like C:\projects\myrepo and have /projects symlinks on WSL to /mnt/c/projects so the file paths are almost the same.

seancorfield18:01:01

(that way, just dropping C: and using / instead of \ will work on both sides -- modulo the editor file path issue)

seancorfield18:01:08

Also, since WSL is headless, you can't run REBL on it (so you end up having to hack that together with Leiningen on the Windows side.

seancorfield18:01:24

(I haven't made any serious attempt to try to debug/workaround that)

dominicm18:01:42

That's a useful tip, thanks!