This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-11
Channels
- # aws (2)
- # babashka (11)
- # beginners (107)
- # calva (6)
- # cljsrn (18)
- # clojure (180)
- # clojure-australia (6)
- # clojure-europe (54)
- # clojure-losangeles (9)
- # clojure-nl (4)
- # clojure-uk (13)
- # clojureladies (1)
- # clojurescript (57)
- # clojureverse-ops (1)
- # consultantsdirectory (1)
- # cursive (48)
- # datomic (11)
- # defnpodcast (3)
- # degree9 (1)
- # deps-new (5)
- # depstar (21)
- # docker (2)
- # fulcro (15)
- # helix (32)
- # kaocha (1)
- # lsp (21)
- # malli (15)
- # meander (15)
- # news-and-articles (2)
- # nextjournal (1)
- # off-topic (42)
- # pathom (3)
- # podcasts-discuss (1)
- # polylith (73)
- # protojure (1)
- # re-frame (43)
- # reagent (1)
- # releases (1)
- # restql (1)
- # schema (1)
- # sci (1)
- # shadow-cljs (23)
- # spacemacs (7)
- # sql (5)
- # tools-deps (42)
- # vim (15)
- # xtdb (3)
Created a ~/.config/clojure/deps.edn
file and copied the content from the README.md inside. Running clojure -X:jar :jar MyLib.jar
apparently finds the :jar
alias because it does not complaining about WARNING: Specified aliases are undeclared: [:jar]
anymore 😄
It does however print No function found on command line or in :exec-fn
and exit with the error code 1
... I don't understand why :thinking_face:
@jacob429 Just used the commands I posted in #tools-deps -- no need to install depstar
or set up an alias.
This is probably not going to be my last rodeo... might as well get things working
OK, well, you are missing :exec-fn
from the alias.
The readme for depstar has:
;; build a jar (library):
:jar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.278"}}
:exec-fn hf.depstar/jar
:exec-args {}}
Also, per Getting Started, make sure your CLI is up-to-date: > Note: you must have at least version 1.10.1.727 of the Clojure CLI installed! Version 1.10.3.933 is the latest stable version as of depstar 2.1.278. See Clojure Tools Releases for details about the functionality in recent CLI releases.
clojure --version
Clojure CLI version 1.10.3.822
cat ~/.config/clojure/deps.edn
{
:aliases {
;; build an uberjar (application) with AOT compilation by default:
:uberjar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.278"}}
:exec-fn hf.depstar/uberjar
:exec-args {:aot true}}
;; build a jar (library):
:jar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.278"}}
:exec-fn hf.depstar/jar
:exec-args {}}
}
}
As far as I understand I am not missing exec-fn
from the alias... :thinking_face:
Hmm, that looks right, and it's typically what I have in projects...
See for example HoneySQL: https://github.com/seancorfield/honeysql/blob/develop/deps.edn#L19-L21
They're synonyms.
:deps
is actually the old name (and t.d.a's code says it is supposed to be removed but I doubt it will be now that it's been documented for use with tools).
(same as :tag
and :git/tag
I think... pretty sure the t.d.a code has a similar comment about that)
Does your project have deps.edn
with a different :jar
alias perhaps?
I remember seeing a warning from the CLI tool output telling me that I should use replace-deps
over deps
when I was playing around with things
Nope no :jar
alias... it only contains what "beholder" has.
I also checked the ~/.clojure/deps.edn
file which was empty (and now deleted)
still the same error
Ahh well I am going to call it for today... I guess for me these new fancy tools still doesn't want to cooperate with me. Maybe some other time. Thanks @seancorfield