clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
borkdude 2019-11-21T09:17:56.027700Z

GraalVM 19.3.0 was released yesterday which is a LTS release. I've retried building clj-kondo for Windows with this and this time it seems it works better than last time. This is a zip with the .exe: https://ci.appveyor.com/api/buildjobs/oqwh72id7x3q8es2/artifacts/clj-kondo-2019.11.08-SNAPSHOT-windows-amd64.zip Windows users are welcome to try it out, by e.g. calling clj-kondo.exe --lint src for linting a source directory. If that works well, it could also mean that having a multi-platform native build of clj could be feasible using GraalVM.

Filipe Silva 2019-11-21T13:42:07.028200Z

these are my results:

kamik@RED-X1C6 MINGW64 /d/work/create-cljs-app (master)
$ ./clj-kondo.exe --lint src template/src
linting took 47ms, errors: 0, warnings: 0

kamik@RED-X1C6 MINGW64 /d/work/create-cljs-app (master)
$ java -jar clj-kondo-2019.11.07-standalone.jar --lint src template/src
linting took 330ms, errors: 0, warnings: 0

Filipe Silva 2019-11-21T13:42:47.028600Z

I find it surprising how much larger the exe is though

Filipe Silva 2019-11-21T13:42:48.028900Z

$ ls -lha clj-kondo*
-rwxr-xr-x 1 kamik 197609  18M Nov 21 13:41 clj-kondo.exe
-rw-r--r-- 1 kamik 197609 8.8M Nov 21 13:40 clj-kondo-2019.11.07-standalone.jar

Filipe Silva 2019-11-21T13:43:05.029400Z

the linux/osx executables are smaller than the jar

borkdude 2019-11-21T13:43:24.029800Z

I don't know the details of this, but I would't worry about 10 mb

borkdude 2019-11-21T13:43:39.030200Z

if it works, it's already quite something

Filipe Silva 2019-11-21T13:43:59.030500Z

let me add a linting error to validate

borkdude 2019-11-21T13:44:10.030900Z

I was just going to suggest that 🙂

Filipe Silva 2019-11-21T13:44:29.031200Z

kamik@RED-X1C6 MINGW64 /d/work/create-cljs-app (master)
$ java -jar clj-kondo-2019.11.07-standalone.jar --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 303ms, errors: 0, warnings: 1

kamik@RED-X1C6 MINGW64 /d/work/create-cljs-app (master)
$ ./clj-kondo.exe --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 33ms, errors: 0, warnings: 1

borkdude 2019-11-21T13:45:21.031500Z

awesome. looks like we're back in business for windows native then?

1
borkdude 2019-11-21T13:45:46.031800Z

can you also test from cmd.exe maybe?

borkdude 2019-11-21T13:45:52.032Z

and powershell as well

Filipe Silva 2019-11-21T13:47:51.032400Z

powershell

PS D:\work\create-cljs-app> .\clj-kondo.exe --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 33ms, errors: 0, warnings: 1
PS D:\work\create-cljs-app> java -jar clj-kondo-2019.11.07-standalone.jar --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
cmd
D:\work\create-cljs-app>.\clj-kondo.exe --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 41ms, errors: 0, warnings: 1

D:\work\create-cljs-app>java -jar clj-kondo-2019.11.07-standalone.jar --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 288ms, errors: 0, warnings: 1

Filipe Silva 2019-11-21T13:48:02.032700Z

worth mentioning that the reported time is not the total time

Filipe Silva 2019-11-21T13:48:25.033Z

kamik@RED-X1C6 MINGW64 /d/work/create-cljs-app (master)
$ time ./clj-kondo.exe --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 49ms, errors: 0, warnings: 1

real    0m0.087s
user    0m0.000s
sys     0m0.015s

kamik@RED-X1C6 MINGW64 /d/work/create-cljs-app (master)
$ time java -jar clj-kondo-2019.11.07-standalone.jar --lint src template/src
template\src\e2e\core.cljs:6:69: warning: #'taiko/something is referred but never used
linting took 339ms, errors: 0, warnings: 1

real    0m2.199s
user    0m0.000s
sys     0m0.015s

borkdude 2019-11-21T13:49:00.033900Z

yeah, it works more or less like time

Filipe Silva 2019-11-21T13:49:18.034400Z

if we were going by reported time, it would seem like a 6x speed increase. real time however, is more like 25x speed increase.

borkdude 2019-11-21T13:50:07.035300Z

anyway, the startup of the native is much faster than the .jar I presume?

borkdude 2019-11-21T13:50:56.035700Z

time to get https://github.com/borkdude/scoop-bucket back from under the dust for the next release I guess 🙂

borkdude 2019-11-21T13:51:21.036600Z

and when we're absolutely sure this works, we can also move to the executable for the npm installer

Filipe Silva 2019-11-21T13:51:26.036700Z

yes, much, much faster

borkdude 2019-11-21T13:51:49.037500Z

shall we continue in #clj-kondo as to not pollute this precious channel more with specifics?

👍 1