Fork me on GitHub
#babashka
<
2021-02-13
>
yubrshen06:02:19

@borkdude For the example in the section on Carve, at https://book.babashka.org/#_uberscript The executable carve for carve-0.0.2-linux-amd64/carve It is too aggressive, carving out function delete, and predicate which cause complaints of

○ → time bb glob-uberscript.clj '*.clj'
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Could not resolve symbol: delete
Location: /tmp/glob-uberscript.clj:108:10
Phase:    analysis

----- Context ------------------------------------------------------------------
104:         [root & link-options]
105:         (when (apply directory? root link-options)
106:           (doseq [path (.listFiles (file root))]
107:             (apply delete-dir path link-options)))
108:         (delete root))
              ^--- Could not resolve symbol: delete
109:
110:       (defn move
111:         "Move or rename a file to a target file. Requires Java version 7 or greater. Optional
112:          [copy-options]()
113:          may be provided."
Using the solution for JVM works. My environment is Ubuntu 20.04 in WSL1. Please let me know if you need any more information. Thanks!

borkdude08:02:06

@U2QGRCMSM What are you carving? Do you have a repro?

yubrshen17:02:56

I'm carving with the example in Babashka book, glob.clj

borkdude08:02:57

I'll take a look

borkdude08:02:14

I can reproduce the issue now, thanks

borkdude08:02:30

@U2QGRCMSM This is fixed with version 1.6.307 of clj-commons/fs. I'll update the book

🙏 1
borkdude08:02:16

@rahul080327 brought to my attention that failjure, a monadic error lib, works with bb: https://github.com/adambard/failjure