Fork me on GitHub
#babashka
<
2019-12-29
>
borkdude08:12:58

Yes, I’ve already said earlier this week that I want to port clojure.test, but that will take some time

lread17:12:03

@borkdude, maybe you should change your tagline to “we are borkdude, we create awesome tools” because I can’t imagine there is only one of you!

😂 16
borkdude19:12:40

Made the output more like normal clojure.test:

FAIL in project.test/foo-test
expected: (= 2 (project/foo))
actual: (not (= 2 1))

borkdude19:12:49

Now I can finally test this giant babashka script... https://github.com/borkdude/deps.clj

nate21:12:02

@borkdude Wow, it's amazing how much babashka can do!

borkdude21:12:02

@deleted-user Where do you see a mistake in the README?

borkdude21:12:18

I called it deps.exe to distuingish it from the deps.clj script

borkdude21:12:38

yes, there is a deps.exe executable AND a deps.clj babashka script

borkdude21:12:54

you can use the latter if you already have babashka

borkdude21:12:37

deps.clj is just a text file that you can run with either clojure or babashka whereas deps.exe is a binary file

borkdude21:12:45

they do the same

borkdude21:12:03

yes, both require java to invoke tools.deps

borkdude21:12:48

Yeah, just let me know what you need and it'll be added if it makes sense

borkdude21:12:00

This project is developed mostly on a by need basis

borkdude21:12:43

Lazy evaluation 😉

borkdude21:12:37

yeah, it depends. don't really know the answer

borkdude21:12:26

cool, can you make an issue for it? (adding more to it as you discover more, is fine)

borkdude22:12:10

Added io/resource to master now

borkdude22:12:54

bonus feature of the testing lib:

WARNING: no assertions were made in test borkdude.deps-test/describe-test

borkdude23:12:08

can you test the macro with clojure first?

borkdude23:12:32

@deleted-user This works:

(require '[ :as io])
(defmacro ^:private predicate [s path]
  `(if ~path
     (~(symbol (str "." s)) ~path)
     false))
(defn absolute?
  "Return true if `path` is absolute."
  [path]
  (predicate isAbsolute (io/file path)))
(prn (absolute? "README.md"))

borkdude23:12:39

I'll look at the error tomorrow

borkdude23:12:02

if you can file an issue as a reminder, that would be cool

borkdude23:12:50

released 54 with io/resource now

borkdude23:12:11

Kind of meta: deps.clj / deps.exe now uses itself in the tests to build the classpath with a testing library on it and then invokes clojure or babashka to run them

borkdude23:12:30

is this for working with zip files?

borkdude23:12:46

this was added for clj-http-lite, because it needs to handle gzip compression I think

borkdude23:12:52

hmm, yes, too early probably

borkdude23:12:11

I've never seen import be used like that before 🙂

borkdude23:12:25

ok, that's an easy fix

borkdude23:12:35

(IllegalArgument)

borkdude23:12:00

feel free to post more issues just in case I forgot. reify I'm not sure if I can make that work, haven't thought about it

borkdude23:12:29

sounds good