java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at...
at cursive.deps.DepsSettings.getDepsCljVersion(DepsSettings.kt:77
...
when trying to import an existing project.
I'm behind a cantankerous corporate firewall, so I am more expecting an Http/403 permission denied kind of error
is there some cursive config that has gone awry due to my impaired internet access?
or, what can I do to progress this error?
when I go to settings -> Build,Execution,Deployment -> Build Tools -> Clojure Deps
I get a blank page with the writing
Select configuration element in the tree to edit its settings
Which I assume means it tried to refresh available deps versions but was foiled by the firewall...
it was a dodgy entry in %AppData%\Roaming\JetBrains\IntelliJIdea2023.3\options\clojure-deps.settings.xml
that I had to restor to a version provided by a colleague
I was missing server credential entries in ~/.m2/settings.xml
with the result that every repository request resulted in an http/403
(and maven central repo is blocked by corporate firewall)
as a consequence of this,
when I hit refresh button on the Clojure Deps settings page
the request for deps versions was refused
and I ended with with an empty version number array in clojure-deps.settings.xml
which then triggers the
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
which I think is unrecoverable
without having to manually fix the settings.xml
in deps.edn I made sure there were :mvn/repos entries that pointed to servers accessible INSIDE the corporate firewall
in ~/.m2/settings.xml made sure there were
/settings/servers/server
entries containing
• <id> the key in to the :mvn/repos map
• <username> that is acceptable to corporate proxy
• <password> munged password that is acceptable to corporate proxy
in ~\AppData\Roaming\JetBrains\IntelliJIdea2032.2\options\clojure-deps.settings.xml
directly altered file to read
(I am prevented from copy-and-pasting so have manually retyped that - there may be typos)
Trying to run some shadow-cljs tests on a re-frame project automatically on compile.. built in test runner fails Execution error (FileNotFoundException) at cursive.tests.runner/eval233 (run-tests17121268457864433616.clj:81).
Could not locate app/core_test__init.class, app/core_test.clj or app/core_test.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
namespace is app.core-test .. node tests is cljs.. shadow-cljs node tests seem to run fine
Am I correct that you’re trying to run your shadow tests with the Cursive test runner? Unfortunately that only works for Clojure tests right now, not CLJS…
Yup, that’s was I was trying to do 🙂 all good, I can get the tests to run (via the node test running) in shadow cljs, it just lacks the red/green output Im searching for 🙂