Fork me on GitHub
#babashka
<
2023-02-28
>
mkvlr16:02:56

is there a reason --latest-sha isn’t the default for bbin install?

mkvlr16:02:17

seem to currently just get a confusing error message when not adding that

borkdude16:02:34

@U5H74UNSF the default may be the latest tag? this is the behavior in neil at least

mkvlr16:02:37

mk@mkair ~> bbin install io.github.nextjournal/garden-cli
{:coords
 #:git{:url "",
       :tag nil,
       :sha nil},
 :lib io.github.nextjournal/garden-cli}
Error building classpath. Library io.github.nextjournal/garden-cli has coord with missing sha
----- Error --------------------------------------------------------------------
Type:     java.io.FileNotFoundException
Message:  /Users/mk/.clojure/.cpcache/A0BC1193F01A5D600736578E599246E4.cp (No such file or directory)
Location: /opt/homebrew/bin/bbin:522:13

----- Context ------------------------------------------------------------------
518:                   {:coords {:bbin/url (str "file://" (get-in header [:coords :local/root]))}}
519:                   header)
520:         _ (pprint header' cli-opts)
521:         _ (when-not (#{::no-lib} lib)
522:             (deps/add-deps {:deps script-deps}))
                 ^--- /Users/mk/.clojure/.cpcache/A0BC1193F01A5D600736578E599246E4.cp (No such file or directory)
523:         script-root (fs/canonicalize (or (get-in header [:coords :local/root])
524:                                          (local-lib-path cli-opts script-deps))
525:                                      {:nofollow-links true})
526:         bb-file (fs/file script-root "bb.edn")
527:         bb-edn (when (fs/exists? bb-file)

----- Stack trace --------------------------------------------------------------
                       - <built-in>
       - <built-in>
                       - <built-in>
       - <built-in>
                          - <built-in>
... (run with --debug to see elided elements)
babashka.bbin.cli/bbin                          - /opt/homebrew/bin/bbin:760:1
babashka.bbin.cli                               - /opt/homebrew/bin/bbin:766:3
clojure.core/apply                              - <built-in>
babashka.bbin.cli                               - /opt/homebrew/bin/bbin:770:3
babashka.bbin.cli                               - /opt/homebrew/bin/bbin:768:1

mkvlr16:02:56

ah ok, so it would work if it had a tag?

borkdude16:02:22

I think yes

borkdude16:02:38

maybe it should pick the latest-sha if there isn't a tag yet. cc @U0CLCL6T0

borkdude16:02:58

@U5H74UNSF I think that would be worthy of an issue

👍 2
borkdude16:02:11

At least there should be a good error message, regardless

borkdude23:02:21

https://github.com/babashka/babashka: Native, fast starting Clojure interpreter for scripting 1.2.174 (2023-03-01) • Use GraalVM 22.3.1 on JDK 19.0.2. This adds virtual thread support. See https://twitter.com/borkdude/status/1572222344684531717. • Expose more jaxax.crypto classes • Add more java.time and related classes with the goal of supporting https://github.com/juxt/tick (https://github.com/juxt/tick/issues/86) • Compatibility with https://github.com/lambdaisland/kaocha test runner • https://github.com/babashka/babashka/issues/1000: add lib tests for xforms (https://github.com/bobisageek) • https://github.com/babashka/babashka/issues/1482: make loading of libs thread safe • https://github.com/babashka/babashka/issues/1487: babashka.tasks/clojure should be supported without arguments to start a REPL • https://github.com/babashka/babashka/issues/1496: Add set-agent-send-executor! and set-agent-send-off-executor!https://github.com/babashka/babashka/issues/1489: Don't overwrite non-empty, non-jar files when writing uberscript/uberjar (https://github.com/bobisageek) • https://github.com/babashka/babashka/issues/1506: :exec-args in task should override :exec-args on fn metadata • https://github.com/babashka/babashka/issues/1501: equals on deftype • Add support for .getWatches on atoms • Bump babashka.fs to 0.3.17 • Bump deps.clj to 1.11.1.1237 • Bump babashka.http-client to 0.1.5 • Bump babashka.cli to 0.6.46

🎉 18
babashka 9
🔥 2