immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2018-08-02T16:48:00.000386Z

How does one use the clojure tools cli with immutant?

2018-08-02T16:48:36.000195Z

I always get this error: IllegalArgumentException XNIO001001: No XNIO provider found org.xnio.Xnio.doGetInstance (Xnio.java:255)

2018-08-02T16:48:53.000434Z

this error does not occur when using leiningen

2018-08-02T16:50:09.000237Z

The error occurs when doing (web/run app) as described in the quick start / installation instructions.

2018-08-02T16:58:39.000263Z

@pauld that sounds like a jar is missing from your classpath. Can you give more details about what you are trying to do?

2018-08-02T17:00:57.000046Z

Hi, I'm just trying to use the clojure command line tools: https://clojure.org/guides/deps_and_cli

2018-08-02T17:01:22.000536Z

I'm following a basic example here: http://immutant.org/documentation/current/apidoc/guide-installation.html

2018-08-02T17:02:55.000435Z

I don't know if there is a bug in the 'clojure' command-line tool, but dependencies and classpaths are supposed to work is they do with leiningen.

2018-08-02T17:05:54.000338Z

deps.edn: {:deps {org.clojure/clojure {:mvn/version "1.9.0"} org.immutant/web {:mvn/version "2.1.10"}}}

2018-08-02T17:07:06.000395Z

2018-08-02T17:09:29.000453Z

Weird, it works for me.

2018-08-02T17:15:50.000480Z

Strange... I get IllegalArgumentException XNIO001001: No XNIO provider found org.xnio.Xnio.doGetInstance (Xnio.java:255) when I execute your line #6

2018-08-02T17:17:51.000265Z

I just removed xnio from my ~/.m2/repository, and now I get errors. Does clj not resolve dependencies against maven repos? This is my first use of it, and it didn't seem to do any resolution

2018-08-02T17:18:46.000007Z

It seems like it is supposed to resolve deps

2018-08-02T17:19:41.000057Z

ah, try rm -rf .cpcache, then run clj again

2018-08-02T17:22:54.000167Z

Still same error.

2018-08-02T17:23:23.000149Z

clj -Spath should show the constructed classpath

2018-08-02T17:23:52.000169Z

Does clj -Stree show org.jboss.xnio/xnio-nio in the output?

2018-08-02T17:24:40.000537Z

2018-08-02T17:26:39.000495Z

2018-08-02T17:28:23.000299Z

ah, the xnio-nio dep is <scope>runtime</scope> in the undertow-core pom. What version of clj do you have? Maybe older versions don't respect runtime?

2018-08-02T17:28:48.000474Z

hmm, I don't see a way for clj to tell you its version

2018-08-02T17:29:33.000495Z

yeah was wondering this too. I could just reinstall - it's fairly old

2018-08-02T17:30:05.000183Z

executable is dated march 26th

2018-08-02T17:31:41.000186Z

clj -Sverbose will give you the version. I have 1.9.0.391

2018-08-02T17:32:30.000469Z

shoot I just reinstalled and it works!

2018-08-02T17:32:48.000309Z

would have been nice to see the version I had

2018-08-02T17:33:04.000493Z

thanks for the tips!

2018-08-02T17:33:33.000457Z

My pleasure!