Giter VIP home page Giter VIP logo

Comments (19)

nasser avatar nasser commented on May 22, 2024

What version of Unity are you on? We're on 4.3.0f4.

Some things to try:

  1. Just start the REPL, it might work
  2. Restarting Unity
  3. Close Unity, delete your Library and Temp folders, then open it again

from arcadia.

JacobGood1 avatar JacobGood1 commented on May 22, 2024

4.5.4f1 I will try those things, thanks.

from arcadia.

nasser avatar nasser commented on May 22, 2024

Hydration might be a problem for you, then. We're working on it.

from arcadia.

egbulmer avatar egbulmer commented on May 22, 2024

Is it a problem with the windows paths? I had to modify ClojureAssetPostprocessor.SetupLoadPath to get rid of that error. The console tells me that the UDP REPL has started, but when I click play it hangs the editor indefinitely. 😓

    static public void SetupLoadPath() {
        string loadPath = "";
        string rootPath = System.Environment.CurrentDirectory.Replace("\\", "/");

        foreach(string path in CompilationRoots) {
            loadPath += rootPath + "/" + path + ";";
        }

        System.Environment.SetEnvironmentVariable("CLOJURE_LOAD_PATH", loadPath);
        Debug.Log(System.Environment.GetEnvironmentVariable("CLOJURE_LOAD_PATH"));
    }

from arcadia.

acron0 avatar acron0 commented on May 22, 2024

The suggested fix from @sonelliot worked for me on 4.3, Windows 7.

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

I'm on Windows 7, trying the proposed fix. Freezes on play for me in 4.5.3f,
4.3.4f1, an additional error message after starting the REPL, and still freezes on play:

NotSupportedException: The invoked member is not supported in a dynamic module.
System.Reflection.Emit.AssemblyBuilder.get_Location () (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs:241)
Unity.PackageManager.PackageManager.RefreshLocalPackagesFromDomain () (at C:/BuildAgent/work/d3d49558e4d408f4/Tools/PackageManager/PackageManager/PackageManager.cs:325)
Unity.PackageManager.PackageManager.StartInstance () (at C:/BuildAgent/work/d3d49558e4d408f4/Tools/PackageManager/PackageManager/PackageManager.cs:133)
Unity.PackageManager.PackageManager.Start () (at C:/BuildAgent/work/d3d49558e4d408f4/Tools/PackageManager/PackageManager/PackageManager.cs:109)
Unity.PackageManager.EntryPoint.Awake () (at C:/BuildAgent/work/d3d49558e4d408f4/Tools/PackageManager/PackageManager/PackageManager.cs:372)
UnityEngine.ScriptableObject:CreateInstance()
Unity.PackageManager.PackageManagerMainThread:.cctor() (at C:/BuildAgent/work/d3d49558e4d408f4/Tools/PackageManager/PackageManager/PackageManager.cs:363)
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])

from arcadia.

depy avatar depy commented on May 22, 2024

Having the same issue. Freezes and trying to start REPL gives me the same error: "Could not locate unity.repl.clj.dll or unity/repl.clj on load path"

from arcadia.

nasser avatar nasser commented on May 22, 2024

@ikarth Strange. That stacktrace doesn't hit any of our code. Does it work without the Clojure folder in it?
@depy Are you on Windows, too?

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

@nasser Remove Clojure folder, press play: it works (and does nothing much because it's an otherwise empty project). Put Clojure folder back: Debug.Log the path, Starting UDP REPL..., NotSupportedException. I assume it has something to do with something that is being dynamically created at runtime. Does seem odd.

The error message does not appear in 4.5; though pressing play still seems to freeze the Unity editor.

from arcadia.

nasser avatar nasser commented on May 22, 2024

@ikarth is Edit > Project Settings > Api Compatibility Level at .NET 2.0?

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

@nasser Yes, unfortunately. First thing I checked. I think I'll try it on another machine here and see if its somehow specific to this one.

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

@nasser Clean install, Windows 7, Unity 4.3.4. Add Clojure folder: System.IO.FileNotFoundException: Could not locate unity.repl.clj.dll or unity/repl.clj on load path and NotSupportedException: The invoked member is not supported in a dynamic module. Pressing play works but REPL does not run (probably because it can't find repl.clj).

Making the proposed change to SetupLoadPath() lets Unity find the REPL and start it. Another NotSupportedException appears, but the REPL seems to be working (haven't tried connecting to it yet). Pressing play at that point causes the editor to hang. Not sure if it ever recovers from the hang, I'm going to leave it running to check, though the NotSupportedException makes me think there's still an issue.

from arcadia.

depy avatar depy commented on May 22, 2024

@nasser yes, windows 7.

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

@nasser Same machine, Windows 7: parade-route works, clojure-unity doesn't. (Freezes when you hit the play button.)

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

For future reference, I have the REPL working, though 'play' still freezes. If anyone else is having issues, connect to the REPL (the client Ruby script in the Extras folder is probably simplest for testing) and try a simple command like (GameObject. "Hello World").

EDIT: Play works...some of the time. I haven't worked out what the difference is, though it may just be a delay. I moved the DLLs to the Compiled folder, that seemed to help, though I haven't tested extensively.

Code for Windows paths with no errors on Unity 4.5.3 (that may break everything else, so use at your own risk, I haven't tested much):

 static public string[] CompilationRoots = new [] {
        "Assets\\Clojure\\Scripts",
        "Assets\\Clojure\\Libraries",
        "Assets\\Clojure\\Internal",
    };

    static public string pathToAssemblies = "Assets\\Clojure\\Compiled";

    static public void SetupLoadPath() {
        string loadPath = Path.Combine(System.Environment.CurrentDirectory, pathToAssemblies);
        foreach(string path in CompilationRoots) {
            loadPath += ";" + Path.Combine(System.Environment.CurrentDirectory, path);
        }

        System.Environment.SetEnvironmentVariable("CLOJURE_LOAD_PATH", loadPath);
        Debug.Log(System.Environment.GetEnvironmentVariable("CLOJURE_LOAD_PATH"));
    }

from arcadia.

ikarth avatar ikarth commented on May 22, 2024

A status update:

As of today, on Windows 7, Arcadia-master and Unity 4.6.0f3 produces the following error message on initialization:

System.IO.FileNotFoundException: Could not locate arcadia.repl.clj.dll or arcadia/repl.clj on load path.
  at clojure.lang.RT.load (System.String relativePath, Boolean failIfNotFound) [0x00000] in <filename unknown>:0 
  at clojure.lang.RT.load (System.String relativePath) [0x00000] in <filename unknown>:0 
  at ClojureRepl.StartREPL () [0x00000] in F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Editor\ClojureRepl.cs:30 
  at ClojureRepl..cctor () [0x00005] in F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Editor\ClojureRepl.cs:16 
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])

Arcadia-develop and Unity 4.6.0f3 produces the following:

Starting Arcadia...
UnityEngine.Debug:Log(Object)
Arcadia.Initialization:Initialize() (at Assets/Arcadia/Editor/Initialization.cs:17)
Arcadia.Initialization:.cctor() (at Assets/Arcadia/Editor/Initialization.cs:12)
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
---
Checking Unity Settings...
UnityEngine.Debug:Log(Object)
Arcadia.Initialization:CheckSettings() (at Assets/Arcadia/Editor/Initialization.cs:27)
Arcadia.Initialization:Initialize() (at Assets/Arcadia/Editor/Initialization.cs:19)
Arcadia.Initialization:.cctor() (at Assets/Arcadia/Editor/Initialization.cs:12)
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
---
Setting Load Path...
UnityEngine.Debug:Log(Object)
Arcadia.Initialization:SetClojureLoadPath() (at Assets/Arcadia/Editor/Initialization.cs:41)
Arcadia.Initialization:Initialize() (at Assets/Arcadia/Editor/Initialization.cs:20)
Arcadia.Initialization:.cctor() (at Assets/Arcadia/Editor/Initialization.cs:12)
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
---
Load Path is F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Compiled:F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Source:F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets
UnityEngine.Debug:Log(Object)
Arcadia.Initialization:SetClojureLoadPath() (at Assets/Arcadia/Editor/Initialization.cs:51)
Arcadia.Initialization:Initialize() (at Assets/Arcadia/Editor/Initialization.cs:20)
Arcadia.Initialization:.cctor() (at Assets/Arcadia/Editor/Initialization.cs:12)
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
---
System.TypeInitializationException: An exception was thrown by the type initializer for ClojureRepl ---> System.TypeInitializationException: An exception was thrown by the type initializer for clojure.lang.RT ---> System.IO.FileNotFoundException: Could not locate clojure.core.clj.dll or clojure/core.clj on load path.
  at clojure.lang.RT.load (System.String relativePath, Boolean failIfNotFound) [0x00000] in <filename unknown>:0 
  at clojure.lang.RT.load (System.String relativePath) [0x00000] in <filename unknown>:0 
  at clojure.lang.RT.DoInit () [0x00000] in <filename unknown>:0 
  at clojure.lang.RT..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at ClojureRepl..cctor () [0x00000] in F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Editor\ClojureRepl.cs:15 
  --- End of inner exception stack trace ---
  at Arcadia.Initialization.StartREPL () [0x00005] in F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Editor\Initialization.cs:59 
  at Arcadia.Initialization.Initialize () [0x00014] in F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Editor\Initialization.cs:21 
  at Arcadia.Initialization..cctor () [0x00000] in F:\Isaac\Projects\2015\Unity\ArcadiaPlayground\Assets\Arcadia\Editor\Initialization.cs:12 
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
---
FileNotFoundException: Could not locate clojure.core.clj.dll or clojure/core.clj on load path.
clojure.lang.RT.load (System.String relativePath, Boolean failIfNotFound)
clojure.lang.RT.load (System.String relativePath)
clojure.lang.RT.DoInit ()
clojure.lang.RT..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for clojure.lang.RT
ClojureRepl..cctor () (at Assets/Arcadia/Editor/ClojureRepl.cs:15)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/AssetPostprocessor.cs:26)

The AOT compilation doesn't seem to be working, the Compiled directory is empty.

from arcadia.

gfixler avatar gfixler commented on May 22, 2024

New user here. I also have this error on startup, Win 7 64, Ruby 2.1.6, Unity 4.6.0b20:

FileNotFoundException: Could not locate .clj.dll or .clj on load path.
clojure.lang.RT.load (System.String relativePath, Boolean failIfNotFound)
clojure.lang.RT.load (System.String relativePath)
clojure/core$load$fn__5855__5859.invoke ()
clojure/core$load__5862.doInvoke (System.Object )
clojure.lang.RestFn.invoke (System.Object arg1)
clojure/core$load_one__5735.invoke (System.Object , System.Object , System.Object )
clojure/core$compile$fn__5869__5873.invoke ()
clojure/core$compile__5876.invoke (System.Object )
clojure.lang.Var.invoke (System.Object arg1)
ClojureAssetPostprocessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/Arcadia/Editor/ClojureAssetPostprocessor.cs:74)
UnityEngine.Debug:LogException(Exception)
ClojureAssetPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Arcadia/Editor/ClojureAssetPostprocessor.cs:79)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

I also managed to get the REPL up and working with the change from @sonelliot. Any work toward fixing the .clj.dll/.clj locate bug over the last few months?

from arcadia.

hatmatter avatar hatmatter commented on May 22, 2024

@nasser Was there a comment related to closing this issue? Did I miss the resolution? I am seeing this issue with the most recent release.

edit. oh I see, this issue was relpaced with #104 correct?

from arcadia.

nasser avatar nasser commented on May 22, 2024

Yup, closed as a dup. Should have been more clear of that!

@hatmatter you should jump on the gitter if you're still seeing this issue. I'd be happy to walk you though it.

from arcadia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.