Fork me on GitHub

I'm trying to build Calva in a Circle-CI Windows executor. It exits silently with exit code 0. I get this far:

> [email protected] release-cljs
> npx shadow-cljs release :calva-lib :test

shadow-cljs - config: C:\calva\shadow-cljs.edn
shadow-cljs - starting via "clojure"
No idea how to debug this. Using SSH to run the job and can reproduce that I get the prompt back with exit code 0. This is the output from shadow-cljs --cli-info:
[email protected]  /c/calva
$ npx shadow-cljs --cli-info
shadow-cljs - config: C:\calva\shadow-cljs.edn
=== Version
jar:            2.19.2
cli:            2.19.2
deps:           1.3.2
config-version: 2.19.2

=== Paths
cli:     C:\calva\node_modules\shadow-cljs\cli\dist.js
config:  C:\calva\shadow-cljs.edn
project: C:\calva
cache:   .shadow-cljs

=== Java
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Microsoft-25199 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Microsoft-25199 (build 11.0.12+7, mixed mode)

=== Source Paths
Anyone else have any ideas?


since it stops at starting with "clojure" have you tried running with directly with clojure?


so clojure -M -m shadow.cljs.devtools.cli release :calva-lib :test?


(the windows clj tools only work in powershell, so if its a normal shell prepend powershell -command clojure ...)


are the clojure tools even installed? I'm honestly not sure which error code the shadow-cljs command will have it is doesn't exist


It works with clojure -M -m shadow.cljs.devtools.cli. At least via SSH and using bash.exe. Same bash prompt where npx shadow-cljs exits early. I think it might have to do with clojure not being installed where npx/npm are looking for it. Because it doesn't work when run as part of the npm script that runs things. Trying now with installing clojure in a different directory...


The feedback turnaround time is painful. For some reason Windows executors are super slow. It takes 10 minutes to learn if something works or not...


you can just run with the clojure command directly


makes no difference to the builds in any way


On my mac shadow exits with code 1 if I don't have clojure installed.

~/Projects/calva(windows-e2e-test|✔) % npm run watch-cljs

> [email protected] watch-cljs
> npx shadow-cljs -d cider/cider-nrepl:0.28.5 watch :calva-lib :test

shadow-cljs - config: /Users/pez/Projects/calva/shadow-cljs.edn
shadow-cljs - starting via "clojure"
Executable 'clojure' not found on system path.
~/Projects/calva(windows-e2e-test|✔) % echo $? 


mac != win in those regards 😛


what do you mean bash.exe btw? do you run things in WSL?


Right now I am failing to get clojure on the system path on Circle CI. But when I get that working, I'll report back if the workaround to use clojure directly to run things works.


clojure is a powershell command in windows, so unless you are working in powershell I don't really follow what you are doing


CircleCi allows for using bash.exe as the shell. It has git and mingw and things installed, so I guess that's why bash is an option.


but what does bash have to do with anything? do you have the clojure linux tools installed in that?


I am actually using the exe-packaged deps.clj renamed to clojure.


that will not work


the shadow-cljs command expects the official tools.deps cli tools


and runs them through powershell


if you don't have those installed, you'll need to manually run whatever else you have


It works fine from the bash prompt in the CI executor using npx shadow-cljs release ....


but as a I said it makes absolutely no difference to the builds


I'd still not recommend doing that. seems like you are trying very hard to confuse the shadow-cljs command 😛


maybe whatever bash.exe is doing makes (is-windows?) return false?


Correction, it doesn't work with npx shadow-cljs, what I mean is that it works fine when using clojure -M -m shadow.cljs.devtools.cli release .... Which is what I am trying to do now. But failing because I don't understand Circle CI windows stuff.


then just use clojure directly and the problem is solved. if you use deps.edn literally everything the npx shadow-cljs release command does is run clojure -M -m shadow.cljs.devtools.cli release for you


I have never succeeded in installing the official clojure tools on windows. A lot of users have problems with this. Which is why deps.clj will soon be the recommended tool to use there.


The problem will hopefully be solved once I get clojure on the path. 😃


shadow-cljs works fine with the official windows tools.deps cli tools


Yes it does.


I think it works fine with deps.clj exe renamed to clojure too.


At least it does on my windows machines.


well, as I just linked in it will run through powershell is (is-windows?) is true


if that alternate clojure command works in powershell thats fine I guess


but there is no detection for alternate clojure installs


I don't think there needs to be any further detections as long as powershell finds the executable.

Aron Gabor23:03:01

Hi. I am having a weird issue, I have something in shadow-cljs.edn, but shadow-cljs installs something else, I think 😟

Aron Gabor23:03:38

{:dependecies [[datascript "1.4.1"]
               [reagent "1.2.0"]]
 :source-paths ["src"]
 {:app {:target :browser
        :output-feature-set :es-next
        :output-dir "public/assets/app/js"
        :asset-path "/assets/app/js"
        :modules {:main {:init-fn mock-compare/start}}
        :compiler-options {:externs ["datascript/externs.js"]}}}

 {8080 {:root "public"}}}

Aron Gabor23:03:51

The required namespace "reagent.core" is not available, it was required by "mock_compare.cljs".

Aron Gabor23:03:40

❯ shadow-cljs info | rg -i reagent
shadow-cljs - config: /Users/gabora/repos/vf/local/tools/analysis/shadow-cljs.edn
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode)

Aron Gabor23:03:04

Maybe my require is wrong, but I thought it would show up in info output anyway?

Aron Gabor23:03:27

I even removed .shadow-cljs/ directory


:dependecies is spelled incorrectly 🙂 its should be :dependencies

Aron Gabor06:03:36

thanks @U0HJ7CX6H, this is why I shouldn't do late night coding


haha no problem 😄