Fork me on GitHub
#babashka
<
2022-02-13
>
mike_ananev15:02:17

How to install previous version of babashka? (via brew)

brew install borkdude/brew/babashka

mike_ananev15:02:41

I need make some experiments

borkdude15:02:06

@mike1452 I would consult the homebrew docs for this, but if homebrew does not support it, you can just grab a macos binary from github releases.

lispyclouds15:02:44

i guess in general we need to publish borkdude/brew/[email protected] versions for older versions to support this, dont theres any brew support for it by default

borkdude15:02:54

also the install script supports --version 0.6.8

borkdude15:02:34

@rahul080327 I've been doing that for neil but not for babashka itself. could start doing it, but nobody asked for it before :)

lispyclouds15:02:37

yeah ive been trying it out via https://asdf-vm.com/ on the work machine, along with other tool versions on it

lispyclouds15:02:58

asdf seems to be a sane way of managing lots of versions of things

mike_ananev15:02:01

@borkdude what have been changed since version 0.7.2? My template https://github.com/redstarssystems/apptemplate works fine on 0.7.2, but starting from 0.7.3+ it has problems. Here is the errors:

----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Could not resolve symbol: build.tasks/install
Location: <expr>:26:22
Phase:    analysis

----- Context ------------------------------------------------------------------
22: (def install (binding [
23:   babashka.tasks/*task* '{:name install, :enter (build.init/enter current-task), :leave (build.init/leave current-task), :task build.tasks/install}]
24:   (build.init/enter current-task)
25:
26: (let [install (apply build.tasks/install *command-line-args*)]
                         ^--- Could not resolve symbol: build.tasks/install
27:   (build.init/leave current-task)
28:   install))) install

borkdude15:02:32

Let's discuss in a thread

borkdude15:02:18

All changes are in a changelog so if you want to know what changed, read the changelogs, that's what they are for

mike_ananev15:02:24

I just downloaded 0.7.2 and everything works fine

mike_ananev15:02:44

But 0.7.3+ look like this

mike_ananev15:02:41

can’t catch where is the error in build task?

mike_ananev15:02:50

To install template I used the following command from docs

mike_ananev15:02:58

clojure -Sdeps '{:deps {org.rssys/apptemplate {:git/tag "0.1.0" :git/sha "9e5d0e2" :git/url ""}}}' -Tnew create :template org.rssys/apptemplate :name com.example/app01

borkdude15:02:28

Maybe the trailing slash:

tasks/

borkdude15:02:42

not sure, I'll try locally

borkdude15:02:46

borkdude@MBP2019 /tmp/app01 $ bb tasks
The following tasks are available:

clean        Clean target folder
build        Build standalone executable uberjar file
run          Run application (-main function)
install      Install this app
deploy       Deploy this app
test         Run project tests
repl         Run Clojure repl
outdated     Check for outdated dependencies
outdated:fix Check for outdated dependencies and fix
format       Format source code
lint         Lint source code
javac        Compile java sources
standalone   Create a standalone application with bundled JDK (using jlink, JDK 9+)
requirements Install project requirements

borkdude15:02:30

Works fine over here?

borkdude15:02:21

I tried with 0.7.2, 0.7.3, 0.7.4 and 0.7.5-SNAPSHOT:

bash <(curl ) --version 0.7.2 --dir .

./bb tasks
Everything's working

mike_ananev15:02:56

May be I have problems locally

mike_ananev15:02:02

I just reinstalled babashka and error is still here

mike_ananev15:02:35

The mystic. 😃

mike_ananev15:02:16

nothing changed except bb version

borkdude15:02:26

Can you try with a clean project like you described how to create it?

borkdude15:02:39

I cannot reproduce this locally, unless you give me the exact same code

borkdude16:02:39

can you remove the trailing slash in the paths?

mike_ananev16:02:32

this is exact the same code

mike_ananev16:02:57

didn’t catch where I should remove trailing slashes?

borkdude16:02:06

can't reproduce with 0.7.3:

borkdude@MBP2019 ~/Downloads/app03 $ ./bb --version
babashka v0.7.3
borkdude@MBP2019 ~/Downloads/app03 $ ./bb tasks
The following tasks are available:

clean        Clean target folder
build        Build standalone executable uberjar file
run          Run application (-main function)
install      Install this app
deploy       Deploy this app
test         Run project tests
repl         Run Clojure repl
outdated     Check for outdated dependencies
outdated:fix Check for outdated dependencies and fix

borkdude16:02:20

in bb.edn :local/root

borkdude16:02:14

:deps           {local/deps {:local/root "tasks/"}}

mike_ananev16:02:13

Solved! The problem was with trailing slashes!!! Thank you

borkdude16:02:05

Cool. It might just be a deps.edn tools difference then

mike_ananev16:02:09

But, why the error is not reproduced in your env? I use macbook

borkdude16:02:21

since this part is not handled by bb but by the tools jar it downloads via deps.clj

borkdude16:02:31

I use macbook too

borkdude16:02:40

not sure. I'm still on i9, not m1

mike_ananev16:02:02

I have i9 too. Ok. Thank you.