This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-05
Channels
- # announcements (1)
- # asami (1)
- # babashka (7)
- # beginners (11)
- # biff (2)
- # calva (7)
- # cider (1)
- # clara (5)
- # clj-kondo (221)
- # clojure (83)
- # clojure-boston (3)
- # clojure-conj (1)
- # clojure-europe (9)
- # clojure-uk (1)
- # clojurescript (11)
- # cursive (74)
- # emacs (30)
- # figwheel-main (2)
- # fulcro (13)
- # hyperfiddle (6)
- # lsp (6)
- # malli (2)
- # nyc (4)
- # off-topic (78)
- # practicalli (9)
- # reitit (4)
- # sci (20)
- # shadow-cljs (49)
- # sql (9)
- # xtdb (5)
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?
(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...
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 $?
1
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?
if you don't have those installed, you'll need to manually run whatever else you have
I'd still not recommend doing that. seems like you are trying very hard to confuse the shadow-cljs command 😛
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.
I don't think there needs to be any further detections as long as powershell finds the executable.
Hi. I am having a weird issue, I have something in shadow-cljs.edn, but shadow-cljs installs something else, I think 😟
{:dependecies [[datascript "1.4.1"]
[reagent "1.2.0"]]
:source-paths ["src"]
:builds
{: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"]}}}
:dev-http
{8080 {:root "public"}}}
The required namespace "reagent.core" is not available, it was required by "mock_compare.cljs".
❯ 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)
Maybe my require is wrong, but I thought it would show up in info output anyway?
I even removed .shadow-cljs/
directory
:dependecies
is spelled incorrectly 🙂 its should be :dependencies
thanks @U0HJ7CX6H, this is why I shouldn't do late night coding
haha no problem 😄