-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-X/-T usage affected by System/exit #261
Comments
@seancorfield Thanks for your reporting! I'll have a look. |
@seancorfield I've fixed in fix-261 branch. |
That certainly seems to fix the installed tool usage, yes! Thank you! |
@seancorfield Thanks for your confirmation! |
@seancorfield Just released v2.9.1232 :) |
This broke running via '-X' $ clj -X:antq
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[##################################################] 7/7
| :file | :name | :current | :latest |
|----------+---------------------+----------+---------|
| deps.edn | org.clojure/clojure | 1.11.4 | 1.12.0 |
Available changes:
- https://github.com/clojure/clojure/blob/clojure-1.12.0/changes.md
Execution error (ExceptionInfo) at antq.tool/outdated$fn (tool.clj:56).
Exited
Full report at:
/var/folders/l2/4c_1v4jj7kj9sfhwjmplz2s80000gn/T/clojure-14409212056517983648.edn with the alias defined as:
|
I'll argue that's not broken: that's the behavior it should have with with You could definitely argue for a new option that doesn't treat outdated deps as an error. Or you can use |
(as an example, see Cognitect's own test-runner when run with |
|
The README should be updated to clarify the error case -- but this is how |
When used as a tool (-X/-T usage), the expected "exit" behavior is to just return a value or throw an exception, rather than calling
System/exit
.I suspect this is why the following does not work properly on Clojure 1.12.0:
What should happen here is that the execution "envelope" containing stdout should be returned, but instead no envelope is captured and the presence of stderr output (from SLF4J) leads
invoke-tool
to assume the tool has failed.I believe that if
antq
returned a value (evennil
) for successful tool execution, or threw an exception for unsuccessful tool execution, then it would work correctly with 1.12'sinvoke-tool
function.The text was updated successfully, but these errors were encountered: