planck-repl / planck

Stand-alone ClojureScript REPL
https://planck-repl.org
Eclipse Public License 1.0
1.03k stars 68 forks source link

Execution error (NullPointerException) at java.util.Objects/requireNonNull (Objects.java:208). #1094

Closed snits closed 2 years ago

snits commented 2 years ago

Getting an error when running script/build with the HEAD of master, and 2.26.0. This is on a Fedora 34 system.

It wouldn't let me attach the .edn file so here are the contents:

{:clojure.main/message "Execution error (NullPointerException) at java.util.Objects/requireNonNull (Objects.java:208).\nnull\n", :clojure.main/triage {:clojure.error/class java.lang.NullPointerException, :clojure.error/line 208, :clojure.error/symbol java.util.Objects/requireNonNull, :clojure.error/source "Objects.java", :clojure.error/phase :execution}, :clojure.main/trace {:via [{:type clojure.lang.Compiler$CompilerException, :message "Syntax error macroexpanding at (/home/jsnitsel/dev/planck/planck-cljs/script/build.clj:20:1).", :data {:clojure.error/phase :execution, :clojure.error/line 20, :clojure.error/column 1, :clojure.error/source "/home/jsnitsel/dev/planck/planck-cljs/script/build.clj"}, :at [clojure.lang.Compiler load "Compiler.java" 7665]} {:type clojure.lang.ExceptionInfo, :message "failed compiling file:src/planck/bundle/gcl.cljs", :data {:file

object[java.io.File 0x30cb489a "src/planck/bundle/gcl.cljs"],

 :clojure.error/phase :compilation},
:at
[cljs.compiler$compile_file$fn__4031 invoke "compiler.cljc" 1765]}

{:type clojure.lang.ExceptionInfo, :data {:clojure.error/source nil, :clojure.error/line nil, :clojure.error/column nil, :clojure.error/phase :compilation}, :at [cljs.analyzer$analyze invokeStatic "analyzer.cljc" 4269]} {:type clojure.lang.ExceptionInfo, :message " in file src/planck/bundle/gcl.cljs", :data {:tag :cljs/analysis-error}, :at [cljs.analyzer$error invokeStatic "analyzer.cljc" 719]} {:type java.lang.NullPointerException, :at [java.util.Objects requireNonNull "Objects.java" 208]}], :trace [[java.util.Objects requireNonNull "Objects.java" 208] [java.lang.ClassLoader getResource "ClassLoader.java" 1396] [clojure.java.io$resource invokeStatic "io.clj" 451] [clojure.java.io$resource invokeStatic "io.clj" 450] [clojure.java.io$resource invoke "io.clj" 446] [cljs.externs$analyze_goog_file invokeStatic "externs.clj" 302] [cljs.externs$analyze_goog_file invoke "externs.clj" 298] [cljs.analyzer$analyze_deps invokeStatic "analyzer.cljc" 2640] [cljs.analyzer$analyze_deps invoke "analyzer.cljc" 2612] [cljs.analyzer$ns_side_effects invokeStatic "analyzer.cljc" 4131] [cljs.analyzer$ns_side_effects invoke "analyzer.cljc" 4126] [cljs.analyzer$analyzeSTAR$fn2886 invoke "analyzer.cljc" 4253] [clojure.lang.PersistentVector reduce "PersistentVector.java" 343] [clojure.core$reduce invokeStatic "core.clj" 6885] [clojure.core$reduce invoke "core.clj" 6868] [cljs.analyzer$analyzeSTAR invokeStatic "analyzer.cljc" 4253] [cljs.analyzer$analyzeSTAR invoke "analyzer.cljc" 4244] [cljs.analyzer$analyze invokeStatic "analyzer.cljc" 4272] [cljs.analyzer$analyze invoke "analyzer.cljc" 4255] [cljs.compiler$emit_source invokeStatic "compiler.cljc" 1581] [cljs.compiler$emit_source invoke "compiler.cljc" 1554] [cljs.compiler$compile_fileSTAR$fn__4000 invoke "compiler.cljc" 1668] [cljs.compiler$with_core_cljs invokeStatic "compiler.cljc" 1474] [cljs.compiler$with_core_cljs invoke "compiler.cljc" 1463] [cljs.compiler$compile_fileSTAR invokeStatic "compiler.cljc" 1652] [cljs.compiler$compile_fileSTAR invoke "compiler.cljc" 1645] [cljs.compiler$compile_file$fn4031 invoke "compiler.cljc" 1750] [cljs.compiler$compile_file invokeStatic "compiler.cljc" 1725] [cljs.compiler$compile_file invoke "compiler.cljc" 1701] [cljs.closure$compile_file invokeStatic "closure.clj" 660] [cljs.closure$compile_file invoke "closure.clj" 638] [cljs.closure$fn5527 invokeStatic "closure.clj" 734] [cljs.closure$fn5527 invoke "closure.clj" 728] [cljs.closure$fn5440$G54335447 invoke "closure.clj" 556] [cljs.closure$compile_task$fn5623 invoke "closure.clj" 1054] [cljs.closure$compile_task invokeStatic "closure.clj" 1052] [cljs.closure$compile_task invoke "closure.clj" 1044] [cljs.closure$parallel_compile_sources$fn5629 invoke "closure.clj" 1082] [clojure.lang.AFn applyToHelper "AFn.java" 152] [clojure.lang.AFn applyTo "AFn.java" 144] [clojure.core$apply invokeStatic "core.clj" 667] [clojure.core$with_bindingsSTAR invokeStatic "core.clj" 1990] [clojure.core$with_bindingsSTAR doInvoke "core.clj" 1990] [clojure.lang.RestFn invoke "RestFn.java" 425] [clojure.lang.AFn applyToHelper "AFn.java" 156] [clojure.lang.RestFn applyTo "RestFn.java" 132] [clojure.core$apply invokeStatic "core.clj" 671] [clojure.core$bound_fnSTAR$fn5818 doInvoke "core.clj" 2020] [clojure.lang.RestFn invoke "RestFn.java" 397] [clojure.lang.AFn run "AFn.java" 22] [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1136] [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 635] [java.lang.Thread run "Thread.java" 833]], :phase :execution}}

mfikes commented 2 years ago

This doesn't appear to repro on macOS.

snits commented 2 years ago

Blowing away .m2 made this error go away, but I now see this:

Creating an optimized build, using build cache to speed up build.
Specifying --fast skips optimizations and takes less than two minutes.
Fetching Google Closure Compiler...
Fetching Google Closure Library...
### Building planck-cljs
WARNING: JavaScript file found on classpath for library `goog.net.cookies`, but does not contain a corresponding `goog.provide` declaration: jar:file:/home/jsnitsel/.m2/repository/org/clojure/google-closure-library/0.0-20211011-0726fdeb/google-closure-library-0.0-20211011-0726fdeb.jar!/goog/net/cookies.js
### Building planck-c
### Bundling ClojureScript artifacts for 1st stage
### Optimizing bundled JavaScript with Closure Optimizations: SIMPLE
................................................................................................................................................................................................................................................................................................................sed: can't find label for jump to `ak'
Build Failed.

script/build --fast works without issue.

snits commented 2 years ago

Ah, that might be because I was on a branch with 2.26.0 trying to see if I was seeing the original reported error there. going back to main branch to see how it goes now.

snits commented 2 years ago

That worked. So looks like it was just something wrong in the .m2 directory. Sorry for the noise.