clr

Colin P. Hill 2025-02-17T12:12:07.729569Z

@dmiller It appears that this fix regressed somewhere between alpha5 and alpha6

dmiller 2025-03-31T02:08:13.856119Z

@dorandraco The source hasn't changed in the two places where the change was made. Not sure why you are seeing a change.

Colin P. Hill 2025-03-31T17:44:39.206149Z

I don't know either 🤷 But I ran a trivially failing test (`(is false)` or something like that) on alphas 4, 5, and 6, and only on 6 I got an exit code of 0.

dmiller 2025-03-31T18:36:37.504419Z

Okay, that gives me a little more context. Are you on Windows or Linux?

Colin P. Hill 2025-03-31T20:29:48.356199Z

Windows 11

dmiller 2025-04-01T04:13:10.608789Z

If it ever worked, I am surprised. Here's what I discovered. If I call clojure.main and force an exit code, I see the exit code.

S C:\work\temp\testretcode> clojure.main
Clojure core loaded in 365 milliseconds.
Clojure 1.12.1-alpha1
user=> (Environment/Exit 99)
PS C:\work\temp\testretcode> $LASTEXITCODE
99
If I call cljr to run the REPL and force an exit code, we just see 0 as the exit code.
PS C:\work\temp\testretcode> cljr
Clojure core loaded in 368 milliseconds.
Clojure 1.12.1-alpha1
user=> (Environment/Exit 99)
PS C:\work\temp\testretcode> $LASTEXITCODE
0
The problem is that I'm not a good Powershell coder. The script wasn't returning the exit code from the embedded call to clojure.main. I've coded a fix for that. However, I'm invoking the Powershell script via System.Diagnostics.Process and for whatever reason, I can only exit code of 1 or 0, nothing more specific. So, I can get a version out that at least has 0/1 (success/fail) semantics. If you need the specific error return code, well, I'm still working on that. ( I have no idea why it won't pass the specific code through. I can't find any information on the problem.)

Colin P. Hill 2025-04-01T13:11:08.889019Z

> The problem is that I'm not a good Powershell coder. Something the entire Clojure community struggles with laughcry My use case was simply running tests, so zero vs nonzero is the only distinction I need. Mine is also just a hobby project, so no pressure from me for a fix. I figured reporting the issue might benefit others, though, who may rely on this for, e.g., CI.

dmiller 2025-02-17T13:08:15.338649Z

Sigh. On it.

Colin P. Hill 2025-02-17T13:08:37.458999Z

😅 sorry