Fork me on GitHub

I'm curious, when executing a function using the -X switch, the JVM never exits, I have to put an explicit (System/exit 0) or similar. That's a bit surprising. I would have thought that as soon as the function has exited, the JVM would shut down.


does it stop after about 30 or 60 seconds?


yeah its the agent threadpool i believe. you can call the really cool-named function (shutdown-agents).


yeah, the thing is that when you thread multiple functions and the non-last function calls that, it might screw things up :)


but perhaps the "wrapper" of this thread could call it as the last op


I wonder if that could be added to the docs, i.e., as a little bit of useful information? Others trying this out may also wonder why the function isn't exiting, until 60 or so seconds have passed.


it's a common thing with CLI apps/scripts

Alex Miller (Clojure team)14:07:38

that's already been added in the current prerelease

Alex Miller (Clojure team)14:07:03

so you won't need to do this


@dharrigan Update your CLI. That has been fixed.


Oh, I see Alex already said that. Sorry, just catching up 🙂


@alexmiller I was trying out the -X:deps help/doc thing, and I can get it to give me help for a whole :ns but when I try to get help for a single function, I just get

(! 1036)-> clojure -X:deps:uberjar help/doc :fn hf.depstar/pom

(! 1037)-> clojure -X:deps:uberjar help/doc :fn pom :ns hf.depstar
There are no examples in the docs so I'm not sure what is supposed to work...


The following works:

(! 1038)-> clojure -X:deps:uberjar help/doc :ns hf.depstar
Entry point for clojure -X options.

  -X entry point for AOT compilation.
... lots of help for every function ...


@seancorfield only fixed on a pre-release

Alex Miller (Clojure team)17:07:03

Either qualified :fn or :ns is supposed to work

Alex Miller (Clojure team)17:07:15

Please file a jira if you have a repro that doesn’t work


I'll stick it up on ask for others to vote for it, and you can create a Jira in whichever is the appropriate project...


(I initially thought it might just be a problem with stuff brought in via an alias but apparently not)