Tensegritics / Tensegritics/ClojureDart
[Windows] NPE when running `clj -M:cljd init` in `hello/` example project
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
Hey!
I'm on windows and my terminal is bash from msys2-mingw64. I installed clojure as a powershell module. I can run clj by calling powershell -encodedcommand YwBsAGoA see here.
$ powershell -encodedcommand YwBsAGoA
Clojure 1.11.1
user=> (inc 8)
9
I was following the readme and copied and pasted the commands that setup hello/deps.edn and hello/src/acme/main.cljd. In hello, when I run clj -M:cljd init I get an NullPointerException.
$ powershell -encodedcommand YwBsAGoAIAAtAE0AOgBjAGwAagBkACAAaQBuAGkAdAA=
Initializing hello as a flutter project!
Execution error (NullPointerException) at cljd.build/exec$iter$fn (build.clj:133).
Cannot invoke "Object.getClass()" because "target" is null
Full report at:
C:\Users\me\Apps\msys64\tmp\clojure-18015447307752204145.edn
{:clojure.main/message
"Execution error (NullPointerException) at cljd.build/exec$iter$fn (build.clj:133).\r\nCannot invoke \"Object.getClass()\" because \"target\" is null\r\n",
:clojure.main/triage
{:clojure.error/class java.lang.NullPointerException,
:clojure.error/line 133,
:clojure.error/cause
"Cannot invoke \"Object.getClass()\" because \"target\" is null",
:clojure.error/symbol cljd.build/exec$iter$fn,
:clojure.error/source "build.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.lang.NullPointerException,
:message
"Cannot invoke \"Object.getClass()\" because \"target\" is null",
:at
[clojure.lang.Reflector
invokeInstanceMethod
"Reflector.java"
97]}],
:trace
[[clojure.lang.Reflector invokeInstanceMethod "Reflector.java" 97]
[cljd.build$exec$iter__6987__6993$fn__6994 invoke "build.clj" 133]
[clojure.lang.LazySeq sval "LazySeq.java" 42]
[clojure.lang.LazySeq seq "LazySeq.java" 51]
[clojure.lang.LazySeq first "LazySeq.java" 73]
[clojure.lang.RT first "RT.java" 692]
[clojure.core$first__5449 invokeStatic "core.clj" 55]
[clojure.core$first__5449 invoke "core.clj" 55]
[cljd.build$exec invokeStatic "build.clj" 131]
[cljd.build$exec doInvoke "build.clj" 110]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 675]
[clojure.core$apply doInvoke "core.clj" 662]
[clojure.lang.RestFn invoke "RestFn.java" 533]
[cljd.build$init_project invokeStatic "build.clj" 342]
[cljd.build$init_project invoke "build.clj" 322]
[cljd.build$_main invokeStatic "build.clj" 491]
[cljd.build$_main doInvoke "build.clj" 483]
[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
"Cannot invoke \"Object.getClass()\" because \"target\" is null"}}
I'm calling clj -M:cljd init with powershell -encodedcommand YwBsAGoAIAAtAE0AOgBjAGwAagBkACAAaQBuAGkAdAA= see here.
Does your problem persist after clj -M:cljd clean && flutter clean?
clj -M:cljd clean
$ powershell -encodedcommand YwBsAGoAIAAtAE0AOgBjAGwAagBkACAAYwBsAGUAYQBuAA==
ClojureDart build state succesfully cleaned!
If problems persist, try flutter clean
^did not help.
I don't have flutter installed.
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing clj -M:cljd init in the hello/ example on the reported Windows/MSYS2 setup, then inspect build.clj around line 133 and the init_project entry point. Compare the execution path with clj -M:cljd clean; done means initialization completes without the NullPointerException and creates the Flutter project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, dart, flutter, powershell
- Domain
- build-system, cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100