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/584,Ā https://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