Skip to content

Update puget to 1.3.2 to support Babashka#25

Closed
filipesilva wants to merge 1 commit into
weavejester:masterfrom
filipesilva:patch-1
Closed

Update puget to 1.3.2 to support Babashka#25
filipesilva wants to merge 1 commit into
weavejester:masterfrom
filipesilva:patch-1

Conversation

@filipesilva

Copy link
Copy Markdown

Fix #21 (comment)

This does not fix #21 proper though, it just allows it to run in Babashka.

Fix weavejester#21 (comment)

This does not fix weavejester#21 proper though, it just allows it to run in Babashka.
@filipesilva filipesilva mentioned this pull request Feb 16, 2025
@weavejester

Copy link
Copy Markdown
Owner

Can you explain why it doesn't fix #21?

@filipesilva

Copy link
Copy Markdown
Author

@weavejester #21 is actually about how #p used in babashka will print a bb impl ns:

filipesilva@m4 ~/repos> bb -Sdeps "{:deps {hashp/hashp {:mvn/version \"0.2.2\"} mvxcvi/puget {:mvn/version \"1.3.4\"}}}" -e "(require 'hashp.core) #p [1 2 3]"
#p[babashka.main/exec:1051] [1 2 3]
[1 2 3]

and how @borkdude suggested he could look into improving this, if there was interest on your part.

This PR is about how using hashp with babashka now fails due to Clojure 1.12.0 changes. Notice the same exec fails now that I've now removed the forced puget version:

filipesilva@m4 ~/repos> bb -Sdeps "{:deps {hashp/hashp {:mvn/version \"0.2.2\"}}}" -e "(require 'hashp.core) #p [1 2 3]"
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Could not resolve symbol: clojure.instant/thread-local-utc-timestamp-format
Data:     {:type :sci/error, :line 8, :column 1, :file "fipp/ednize/instant.clj", :phase "analysis"}
Location: fipp/ednize/instant.clj:11:26
Phase:    analysis

----- Context ------------------------------------------------------------------
 7:
 8: (extend-protocol IEdn
 9:   Timestamp
10:   (-edn [x]
11:     (let [s (format-hack #'clojure.instant/thread-local-utc-timestamp-format x)]
                             ^--- Could not resolve symbol: clojure.instant/thread-local-utc-timestamp-format
12:       (tagged-literal 'inst s)))
13:
14:   Date
15:   (-edn [x]
16:     (let [s (format-hack #'clojure.instant/thread-local-utc-date-format x)]

----- Stack trace --------------------------------------------------------------
fipp.ednize.instant                   - fipp/ednize/instant.clj:11:26
fipp.ednize/format-hack               - fipp/ednize.clj:27:1
fipp.ednize.instant/let               - fipp/ednize/instant.clj:11:13
fipp.ednize.instant                   - fipp/ednize/instant.clj:11:5
clojure.core/let                      - <built-in>
... (run with --debug to see elided elements)
fipp.ednize                           - fipp/ednize.clj:83:1
fipp.visit                            - fipp/visit.cljc:3:3
puget.printer                         - puget/printer.clj:94:3
hashp.core                            - hashp/core.clj:2:3
user                                  - <expr>:1:1

@filipesilva

filipesilva commented Feb 16, 2025

Copy link
Copy Markdown
Author

This is also related to #23. But as far as I can tell that issue cannot be reproduced with 1.12:

filipesilva@m4 ~/repos [SIGINT]> clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.12.0"} hashp/hashp {:mvn/version "0.2.2"}}}' -Srepro
Clojure 1.12.0
user=> (require 'hashp.core)
nil
user=> #p [1 2 3]
#p[user/eval18203:] [1 2 3]
[1 2 3]

@filipesilva

Copy link
Copy Markdown
Author

Heya, I saw that 1c04e35 effects dependency update, so closing this PR. Cheers, and thanks for the great libs!

@filipesilva filipesilva closed this Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Babashka support

2 participants