Fork me on GitHub
#babashka
<
2021-12-29
>
kirill.salykin11:12:45

hi, when i run bb script i see this error

1: (ns import-data-2022
            ^--- Could not find namespace: import-data-2022.
why? 🙂

kirill.salykin11:12:49

what I am doing wrong?

borkdude11:12:37

it depends... without a complete repro I can't say much.

borkdude11:12:23

@U1V7K1YTZ This script works for me :)

(ns import-data-2022)

kirill.salykin11:12:39

another question

kirill.salykin11:12:35

the last form is -main declaration but when I run bb /import_data_2022.bb dev ~/Downloads/20211227-data-2022 the output just

#'import-data-2022/-main

borkdude11:12:03

Run it with bb -m import-data-2022

borkdude11:12:24

and make sure the current working directory is on the classpath

borkdude11:12:42

bb.edn:

{:paths ["."]}

borkdude11:12:44

this is exactly how it works in clojure (but bb.edn instead of deps.edn)

kirill.salykin11:12:31

aaah, classpath..

borkdude11:12:43

you can also invoke the script directly, but then you just run the expressions directly, not in a -main function

borkdude11:12:31

you can use this to invoke the -main function when invoking the script: https://book.babashka.org/#main_file

borkdude17:12:21

babashka 0.7.2! • Add `spy` macro from `taoensso.timbre` https://github.com/babashka/babashka/issues/1087 • Better error for higher order fn arity mismatch • Check `shasum` / `sha256sum` in `PATH` on install script (https://github.com/thiagokokada) • Build arm64 docker image in CI https://github.com/babashka/babashka/issues/1099 (https://github.com/cap10morgan) • Upgrade to `edamame` v0.0.19 • Load tasks and deps from other bb.edn file using `--config` and `--deps-root` options https://github.com/babashka/babashka/issues/1110 • Uberscript improvements https://github.com/babashka/babashka/issues/584https://github.com/babashka/babashka/issues/1037 • Include native elements in printed stacktrace https://github.com/babashka/babashka/issues/1105 • Missing error message when exception happens in REPL print https://github.com/babashka/babashka/issues/1116 • Undeprecate `$` in babashka.process • Add lots of library tests to CI (https://github.com/cldwalker) • Release SNAPSHOT builds to https://github.com/babashka/babashka-dev-builds/releases (use only for testing)

👏 7
1
Kari Marttila20:12:20

I just love Babashka! I can develop all scripting using JVM REPL and when I'm done I just run the clj file using Babashka to validate it runs the same way there.

❤️ 1
borkdude21:12:04

Babashka also has nREPL support btw :)

Kari Marttila20:12:30

Python is going to be decommissioned from now on. 😀

4
😄 1