This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-05
Channels
- # adventofcode (89)
- # announcements (9)
- # babashka (11)
- # beginners (8)
- # biff (5)
- # calva (4)
- # cherry (121)
- # clara (15)
- # clerk (16)
- # clj-kondo (20)
- # clj-otel (2)
- # cljdoc (20)
- # clojure (84)
- # clojure-austin (1)
- # clojure-bay-area (3)
- # clojure-berlin (1)
- # clojure-czech (2)
- # clojure-europe (59)
- # clojure-nl (1)
- # clojure-norway (12)
- # clojure-poland (1)
- # clojure-uk (15)
- # cursive (16)
- # datomic (46)
- # events (3)
- # fulcro (85)
- # graalvm (20)
- # hyperfiddle (11)
- # improve-getting-started (1)
- # lsp (7)
- # off-topic (48)
- # overtone (8)
- # podcasts-discuss (4)
- # re-frame (31)
- # releases (1)
- # ring (12)
- # sci (13)
- # shadow-cljs (8)
- # specter (3)
- # squint (26)
- # xtdb (5)
- # yamlscript (6)
I can’t build cherry. As with the squint repo, there’s an fsck error when cloning. I can get past it by skipping the check:
~/Projects
❯ git clone
Cloning into 'cherry'...
remote: Enumerating objects: 2915, done.
remote: Counting objects: 100% (306/306), done.
remote: Compressing objects: 100% (151/151), done.
error: object 3ebf8cb9f283e531f511a78f3198bd0050b452f8: zeroPaddedFilemode: contains zero-padded file modes
fatal: fsck error in packed object
fatal: fetch-pack: invalid index-pack output
~/Projects
❯ git clone -c fetch.fsckObjects=false -c transfer.fsckObjects=false [email protected]:PEZ/cherry.git
But then, when clojure clones the dependency on squint, it runs into the fsck error and my git/deps fu ends somewhere there…I can clone cherry, but not build it, because it bails when cloning the squint dependency.
@U0ETXRFEW Perhaps git config --global fsck.zeroPaddedFilemode = ignore
It looks like it is something with one of these files:
~/Projects/cherry main[✔]
❯ git cat-file -p 3ebf8cb9f283e531f511a78f3198bd0050b452f8
100644 blob af24f6d2b22ff4ce4a6e990a59c3007b5e72b91b README.markdown
100644 blob e3e62315330b8e13f4edb2db791950c45e43287d project.clj
040000 tree 49d841d491ca05a36948eb6bedd8503cd51c9c4e src
040000 tree 7a73a6de405c5df7b1221548a3c24c0972955d34 test
~/Projects/cherry main[✔]
❯ git fsck --full
Checking object directories: 100% (256/256), done.
warning in tree 3ebf8cb9f283e531f511a78f3198bd0050b452f8: zeroPaddedFilemode: contains zero-padded file modes
Checking objects: 100% (2915/2915), done.
It doesn’t help:
❯ bb dev
Cloning:
Error building classpath. Unable to clone /Users/pez/.gitlibs/_repos/https/github.com/squint-cljs/squint
error: object 3ebf8cb9f283e531f511a78f3198bd0050b452f8: zeroPaddedFilemode: contains zero-padded file modes
fatal: fsck error in packed object
fatal: fetch-pack: invalid index-pack output
Exception in thread "main" clojure.lang.ExceptionInfo: babashka.process.Process@ea71d3b1
at babashka.process$check.invokeStatic(process.cljc:111)
...
you can also try export GITLIBS_COMMAND=git --config fsck.zeroPaddedFilemode=ignore
, not sure if that will work
borkdude@m1 ~ $ rm -rf ~/.gitlibs
borkdude@m1 ~ $ bb -Sdeps '{:deps {io.github.squint-cljs/cherry {:git/sha "cd88cf45a2dad0928319d5a919e03ea7c21997d4"}}}'
Cloning:
Checking out: at cd88cf45a2dad0928319d5a919e03ea7c21997d4
Cloning:
Checking out: at 1094991e151f1d3271da5ad96e601f2e0be60a56
Babashka v1.3.187-SNAPSHOT REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.
I have no recollection of why I had that in the config so it is probably OK to run without it. 😃
btw I've started using vscode for javascript now since emacs absolutely sucks out of the box for big javascript files
Having worked around the fsck problem, I now run into a new issue trying to hack on cherry:
~/Projects/cherry main[✔]
❯ bb dev
shadow-cljs - config: /Users/pez/Projects/cherry/shadow-cljs.edn
shadow-cljs - starting via "clojure"
Error building classpath. Local lib io.github.squint-cljs/squint not found: /Users/borkdude/dev/squint
More of the error -> 🧵----- Error --------------------------------------------------------------------
Type: clojure.lang.ExceptionInfo
Message:
Data: {:proc #object[java.lang.ProcessImpl 0x250982 "Process[pid=50628, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessBuilder$NullOutputStream 0x3e6e8737 "java.lang.ProcessBuilder$NullOutputStream@3e6e8737"], :out #object[java.lang.ProcessBuilder$NullInputStream 0x5e8022c2 "java.lang.ProcessBuilder$NullInputStream@5e8022c2"], :err #object[java.lang.ProcessBuilder$NullInputStream 0x5e8022c2 "java.lang.ProcessBuilder$NullInputStream@5e8022c2"], :prev nil, :cmd ["npx" "shadow-cljs" "--aliases" ":dev" "--config-merge" ".work/config-merge.edn" "watch" "cherry"], :type :babashka.process/error}
Location: /Users/pez/Projects/cherry/bb/tasks.clj:69:3
----- Context ------------------------------------------------------------------
65: (defn watch-cherry []
66: (fs/delete-tree ".shadow-cljs/builds/clava/dev/ana/cherry")
67: (fs/create-dirs ".work")
68: (spit ".work/config-merge.edn" (shadow-extra-test-config))
69: (shell "npx shadow-cljs --aliases :dev --config-merge .work/config-merge.edn watch cherry"))
^---
70:
71: (defn test-cherry []
72: (fs/create-dirs ".work")
73: (spit ".work/config-merge.edn" (shadow-extra-test-config))
74: (shell "npm install")
----- Stack trace --------------------------------------------------------------
babashka.process/check - <built-in>
babashka.process/shell - <built-in>
clojure.core/apply - <built-in>
babashka.impl.process/shell - <built-in>
tasks/watch-cherry - /Users/pez/Projects/cherry/bb/tasks.clj:69:3
tasks/watch-cherry - /Users/pez/Projects/cherry/bb/tasks.clj:65:1
user-20b5d805-2c1a-4841-9a84-7c85b02f83c1 - <expr>:26:1
Error building classpath. Local lib io.github.squint-cljs/squint not found: /Users/borkdude/dev/squint
It’s the :dev
alias. If I point it to my local squint I get:
❯ bb dev
Error building classpath. Could not find artifact orkdude:edamame:jar:1.0.0 in central ( )
Exception in thread "main" clojure.lang.ExceptionInfo: babashka.process.Process@80cb2894
Error building classpath. Could not find artifact orkdude:edamame:jar:1.0.0 in central
This seems to be a weird error
orkdude? without a b?deps.edn has a :dev
alias that won’t work on other machine but yours. I worked around it like so:
❯ git diff deps.edn
diff --git a/deps.edn b/deps.edn
index 7fa1b67..9850764 100644
--- a/deps.edn
+++ b/deps.edn
@@ -9,7 +9,7 @@
:aliases
{:dev {:extra-deps {io.github.squint-cljs/squint
- {:local/root "/Users/borkdude/dev/squint"}}}
+ {:local/root "/Users/pez/Projects/squint"}}}
:cljs {:extra-paths ["test"]
:extra-deps {thheller/shadow-cljs {:mvn/version "2.25.10"}}}
:test ;; added by neil
so bb dev
doesn't work on your machine, is that what it is? sorry to hear that, I should fix it :)
hmm, actually this might be a feature, since you often need to have squint checked out as well when working on squint, so maybe I can change the local/root to ".."
I want to experiment with different boilerplates in my local playground (which I use by opening index.html
in a browser). Specifically the AOC boilerplate. Where should I be looking?
this allows you to customize the playground to your likings, without even running a cherry build ;)
Yeah, haha, I worked hard to get the cherry build going, and then it was just opening index.html 😃
I'm trying to reproduce the issue. I do see coercive-boolean in this result:
but the evaluation doesn't seem to be botheredit's just the for
macro expanding into this code and cherry doesn't have that macro yet
@U0ETXRFEW ok, added coercive-boolean and more coercive-stuff.
you can see what happens here when you replace coercive-boolean with do
in the output:
you can see that there is an extra truthiness check when you don't include it. so coercive-boolean functions as a hint to the compiler that the truthiness check can be omittedWhat if we add a convenience button for creating a blank #C0GLTDB2T playground? I had some troubles figuring out how to do that, yesterday. Also suggested in the video is a bit of instructions around sharing.
The message about saving the session cookie could include something about that if you see a message TypeError: Failed to fetch
, it is because session wasn’t saved. (This for the boilerplate code.)
this one should give a better message: https://gist.githubusercontent.com/borkdude/cf94b492d948f7f418aa81ba54f428ff/raw/807ed650924d1a75be8b43a4a16dc31b02f4e56c/aoc_ui.cljs
somehow with the latest change I get all kinds of scrollbars when the code output is large:
I undid your change and added your change back until I saw no more scrollbars. I will try d again