This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-19
Channels
- # aws (2)
- # babashka (4)
- # babashka-sci-dev (7)
- # beginners (92)
- # biff (7)
- # calva (64)
- # cider (2)
- # cljsrn (14)
- # clojure (8)
- # clojure-australia (5)
- # clojure-europe (14)
- # clojure-norway (8)
- # clojure-spec (36)
- # clojurescript (19)
- # component (15)
- # cursive (1)
- # data-science (6)
- # girouette (5)
- # hyperfiddle (3)
- # juxt (5)
- # leiningen (10)
- # lsp (7)
- # malli (12)
- # nbb (90)
- # polylith (1)
- # portal (11)
- # rdf (7)
- # reagent (6)
- # reitit (40)
- # remote-jobs (1)
- # shadow-cljs (21)
- # specter (5)
- # squint (83)
- # tools-deps (17)
- # vim (7)
Encountering one of those nasty CRC errors when creating an uberjar with build-clj. Is there anyway to quickly identify which JAR is malformed? Details in thread:
Execution error (ZipException) at java.util.zip.ZipInputStream/readEnd (ZipInputStream.java:409).
invalid entry CRC (expected 0x843c9fb1 but got 0xee027fb2)
{:clojure.main/message
"Execution error (ZipException) at java.util.zip.ZipInputStream/readEnd (ZipInputStream.java:409).\ninvalid entry CRC (expected 0x843c9fb1 but got 0xee027fb2)\n",
:clojure.main/triage
{:clojure.error/class java.util.zip.ZipException,
:clojure.error/line 409,
:clojure.error/cause
"invalid entry CRC (expected 0x843c9fb1 but got 0xee027fb2)",
:clojure.error/symbol java.util.zip.ZipInputStream/readEnd,
:clojure.error/source "ZipInputStream.java",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.util.zip.ZipException,
:message
"invalid entry CRC (expected 0x843c9fb1 but got 0xee027fb2)",
:at
[java.util.zip.ZipInputStream readEnd "ZipInputStream.java" 409]}],
:trace
[[java.util.zip.ZipInputStream readEnd "ZipInputStream.java" 409]
[java.util.zip.ZipInputStream read "ZipInputStream.java" 198]
[java.util.jar.JarInputStream read "JarInputStream.java" 194]
[java.util.zip.ZipInputStream closeEntry "ZipInputStream.java" 142]
[java.util.zip.ZipInputStream
getNextEntry
"ZipInputStream.java"
120]
[java.util.jar.JarInputStream
getNextEntry
"JarInputStream.java"
129]
[java.util.jar.JarInputStream
getNextJarEntry
"JarInputStream.java"
166]
[clojure.tools.build.tasks.uber$explode invokeStatic "uber.clj" 150]
[clojure.tools.build.tasks.uber$explode invoke "uber.clj" 141]
[clojure.tools.build.tasks.uber$uber$fn__3529$fn__3533
invoke
"uber.clj"
257]
[clojure.lang.PersistentVector reduce "PersistentVector.java" 343]
[clojure.core$reduce invokeStatic "core.clj" 6885]
[clojure.core$reduce invoke "core.clj" 6868]
[clojure.tools.build.tasks.uber$uber$fn__3529 invoke "uber.clj" 256]
[clojure.core.protocols$iter_reduce invokeStatic "protocols.clj" 49]
[clojure.core.protocols$fn__8230 invokeStatic "protocols.clj" 75]
[clojure.core.protocols$fn__8230 invoke "protocols.clj" 75]
[clojure.core.protocols$fn__8178$G__8173__8191
invoke
"protocols.clj"
13]
[clojure.core$reduce invokeStatic "core.clj" 6886]
[clojure.core$reduce invoke "core.clj" 6868]
[clojure.tools.build.tasks.uber$uber invokeStatic "uber.clj" 254]
[clojure.tools.build.tasks.uber$uber invoke "uber.clj" 241]
[clojure.lang.Var invoke "Var.java" 384]
[clojure.tools.build.api$uber invokeStatic "api.clj" 480]
[clojure.tools.build.api$uber invoke "api.clj" 408]
[org.corfield.build$uber invokeStatic "build.clj" 250]
[org.corfield.build$uber invoke "build.clj" 208]
[clojure.lang.AFn applyToHelper "AFn.java" 154]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 662]
[clojure.run.exec$exec invokeStatic "exec.clj" 48]
[clojure.run.exec$exec doInvoke "exec.clj" 39]
[clojure.lang.RestFn invoke "RestFn.java" 423]
[clojure.run.exec$_main$fn__205 invoke "exec.clj" 180]
[clojure.run.exec$_main invokeStatic "exec.clj" 176]
[clojure.run.exec$_main doInvoke "exec.clj" 139]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause "invalid entry CRC (expected 0x843c9fb1 but got 0xee027fb2)"}}
I copied the project’s deps.edn file into a pretty bare repository and binary searched it, but it would be nice if the error had context? Maybe there’s a verbose setting I’m missing
I don't think there is a way to quickly do so right now
but you could clone tools.build, hack whatever debug you want in and point to it instead using org.clojure/tools.build {:local/root "../mybuild"}
etc
I was able to identify the jar using a bare repo approach (with the problematic deps.edn file) and luckily there’s a more recent version of the package I’m exploring
Is there a way to get a list of all installed tools from the top level clj? or search from there for existing tools?
Ty alex!.
:default-deps provides a set of default coordinate versions to use if no coordinate is specified. The default deps can be used across a set of shared projects to act as a dependency management system:
What does that mean in practice? How do you not specify a coordinate, and how would this apply across a set of shared projects?
It is possible to specify a nil coordinate that will be filled by a default dep in an alias, but generally I consider this an unfinished part of tools.deps. The intent was in the vein of Maven/lein managed deps, but I've been thinking off and on about a different direction to go with this which might overlap with other things (like bill of materials poms)
ooo the rare BOM POM