nasser / magic

Morgan And Grand Iron Clojure
http://nas.sr/magic/
365 stars 18 forks source link

New Magic integration has problem #190

Closed robertluo closed 4 years ago

robertluo commented 4 years ago

When opens "compile" dialog from "Magic" menu item, the console shows:

FileNotFoundException: Could not locate magic.api.cljc.dll or magic/api.cljc on load path.
<magic>clojure_core$load-lib__0.invokeTyped (System.Object prefix, System.Object lib, clojure.lang.ISeq options) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$load-lib__0.doInvoke (System.Object prefix, System.Object lib, System.Object options) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
clojure.lang.RestFn.applyTo (clojure.lang.ISeq arglist) (at <296f2b0f4fdf405a8d93ba141aa3052f>:0)
<magic>clojure_core$apply__1.invokeTyped (clojure.lang.IFn f, System.Object x, System.Object args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$apply__1.invoke (System.Object f, System.Object x, System.Object args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$load-libs__0.invokeTyped (clojure.lang.ISeq args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$load-libs__0.doInvoke (System.Object args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
clojure.lang.RestFn.applyTo (clojure.lang.ISeq arglist) (at <296f2b0f4fdf405a8d93ba141aa3052f>:0)
<magic>clojure_core$apply__1.invokeTyped (clojure.lang.IFn f, System.Object x, System.Object args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$apply__1.invoke (System.Object f, System.Object x, System.Object args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$require__0.invokeTyped (clojure.lang.ISeq args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
<magic>clojure_core$require__0.doInvoke (System.Object args) (at <c9e3dd1823754e969ed65ce517e323b9>:0)
clojure.lang.RestFn.invoke (System.Object arg1) (at <296f2b0f4fdf405a8d93ba141aa3052f>:0)
clojure.lang.Var.invoke (System.Object arg1) (at <296f2b0f4fdf405a8d93ba141aa3052f>:0)
Magic.Unity.Window.OnEnable () (at Assets/Magic.Unity/Editor/Window.cs:99)
UnityEditor.EditorWindow:GetWindow()
Magic.Unity.Window:Init() (at Assets/Magic.Unity/Editor/Window.cs:54)

BTW, in namespace magic.analyzer.untyped-passes line 137, there is #_else seems like a problem.

nasser commented 4 years ago

When opens "compile" dialog from "Magic" menu item, the console shows:

The packaging of the Unity integration hasn't stabilized yet. The error you're seeing is because the MAGIC source is not on the loadpath (it is looking for magic.api but cannot find it). A short term fix is to copy the src/magic, deps/deps/maven/org.clojure/tools.analyzer-1.0.0/clojure and deps/github/nasser/mage-master/src/mage folders into the Magic.Unity/Infrastructure/Desktop folder of your Unity project. This is how I managed to build for iOS in the past few weeks.

This problem is being tracked in #173 and is scheduled to be addressed next week as part of wrapping up the final milestone in the project. I am going go close this issue as it is a duplicate of #173.

BTW, in namespace magic.analyzer.untyped-passes line 137, there is #_else seems like a problem.

That's valid Clojure, #_ comments out the form else. The containing form is a case so the last expression is the default expression.