Created
August 10, 2015 15:52
-
-
Save selfsame/484b01925047539a1925 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Compiled.meta b/Compiled.meta | |
| index ccc917b..98aff41 100644 | |
| --- a/Compiled.meta | |
| +++ b/Compiled.meta | |
| @@ -1,7 +1,7 @@ | |
| fileFormatVersion: 2 | |
| -guid: 75d871e7479da41c398891146382ca0a | |
| +guid: 7f7f4d2cda378464989cd93af148f6db | |
| folderAsset: yes | |
| -timeCreated: 1429620904 | |
| +timeCreated: 1439215347 | |
| licenseType: Free | |
| DefaultImporter: | |
| userData: | |
| diff --git a/Editor/ClojureConfiguration.cs b/Editor/ClojureConfiguration.cs | |
| index ba89f04..a14713f 100644 | |
| --- a/Editor/ClojureConfiguration.cs | |
| +++ b/Editor/ClojureConfiguration.cs | |
| @@ -1,3 +1,5 @@ | |
| +using System; | |
| +using System.IO; | |
| using System.Linq; | |
| using UnityEngine; | |
| using UnityEditor; | |
| @@ -7,9 +9,9 @@ public class ClojureConfigurationObject : ScriptableObject {} | |
| [CustomEditor(typeof(ClojureConfigurationObject))] | |
| public class ClojureConfiguration : Editor { | |
| - public static string configFilePath = "Assets/Arcadia/configure.edn"; | |
| + public static string configFilePath = "Assets" + Path.DirectorySeparatorChar + "Arcadia" + Path.DirectorySeparatorChar + "configure.edn"; | |
| - public static string userConfigFilePath = "Assets/ArcadiaConfig/configure.edn"; | |
| + public static string userConfigFilePath = "Assets" + Path.DirectorySeparatorChar + "ArcadiaConfig" + Path.DirectorySeparatorChar + "configure.edn"; | |
| static ClojureConfigurationObject _clojureConfigurationObject; | |
| diff --git a/Editor/ClojureRepl.cs b/Editor/ClojureRepl.cs | |
| index bd4996b..75f22c9 100644 | |
| --- a/Editor/ClojureRepl.cs | |
| +++ b/Editor/ClojureRepl.cs | |
| @@ -13,8 +13,8 @@ public class ClojureRepl : EditorWindow { | |
| private static UdpClient replSocket; | |
| - [DllImport ("ForceEditorUpdates")] | |
| - private static extern void StartForcingEditorApplicationUpdates(); | |
| + // [DllImport ("ForceEditorUpdates")] | |
| + // private static extern void StartForcingEditorApplicationUpdates(); | |
| static ClojureRepl() { | |
| RT.load("arcadia/repl"); | |
| @@ -40,7 +40,7 @@ public class ClojureRepl : EditorWindow { | |
| public static void StartREPL () { | |
| replSocket = (UdpClient)RT.var("arcadia.repl", "start-server").invoke(11211); | |
| EditorApplication.update += ClojureRepl.Update; | |
| - StartForcingEditorApplicationUpdates(); | |
| + //StartForcingEditorApplicationUpdates(); | |
| } | |
| [MenuItem ("Arcadia/REPL/Stop &#r")] | |
| diff --git a/Editor/Initialization.cs b/Editor/Initialization.cs | |
| index 5df42e0..ab528f3 100644 | |
| --- a/Editor/Initialization.cs | |
| +++ b/Editor/Initialization.cs | |
| @@ -64,9 +64,9 @@ namespace Arcadia { | |
| string clojureDllFolder = GetClojureDllFolder(); | |
| Environment.SetEnvironmentVariable("CLOJURE_LOAD_PATH", | |
| - Path.GetFullPath(VariadicCombine(clojureDllFolder, "..", "Compiled")) + ":" + | |
| - Path.GetFullPath(VariadicCombine(clojureDllFolder, "..", "Source")) + ":" + | |
| - Path.GetFullPath(Application.dataPath) + ":" + | |
| + Path.GetFullPath(VariadicCombine(clojureDllFolder, "..", "Compiled")) + Path.PathSeparator + | |
| + Path.GetFullPath(VariadicCombine(clojureDllFolder, "..", "Source")) + Path.PathSeparator + | |
| + Path.GetFullPath(Application.dataPath) + Path.PathSeparator + | |
| Path.GetFullPath(VariadicCombine(clojureDllFolder, "..", "Libraries"))); | |
| } catch(InvalidOperationException e) { | |
| throw new SystemException("Error Loading Arcadia! Arcadia expects exactly one Arcadia folder (a folder with Clojure.dll in it)"); | |
| diff --git a/Source/arcadia/compiler.clj b/Source/arcadia/compiler.clj | |
| index cee70ac..af8dcd0 100644 | |
| --- a/Source/arcadia/compiler.clj | |
| +++ b/Source/arcadia/compiler.clj | |
| @@ -38,7 +38,7 @@ | |
| [p] | |
| (if-> p | |
| (clojure.string/replace #"\.clj$" "") | |
| - (clojure.string/replace #"\/" ".") | |
| + (clojure.string/replace #"\/|\\" ".") | |
| (clojure.string/replace "_" "-"))) | |
| (defn relative-to-load-path | |
| @@ -47,7 +47,7 @@ | |
| (->> (clojure.string/split path #"\/") | |
| rests | |
| reverse | |
| - (map #(clojure.string/join "/" %)) | |
| + (map #(clojure.string/join Path/DirectorySeparatorChar %)) | |
| (filter #(clojure.lang.RT/FindFile %)))) | |
| (defn clj-file? [path] | |
| diff --git a/Source/arcadia/config.clj b/Source/arcadia/config.clj | |
| index 56992d9..489d197 100644 | |
| --- a/Source/arcadia/config.clj | |
| +++ b/Source/arcadia/config.clj | |
| @@ -167,13 +167,13 @@ | |
| (when (detect-leiningen-projects?) | |
| (map load-leiningen-configuration-map (leiningen-project-files))) | |
| (map load-basic-configuration-map (standard-project-files))))) | |
| - | |
| + | |
| (defn configured-loadpath | |
| "Computes loadpath, taking state of arcadia.config/configuration into | |
| account as of last update!." | |
| ([] (configured-loadpath @configuration)) | |
| ([config] | |
| - (clojure.string/join ":" | |
| + (clojure.string/join Path/PathSeparator | |
| (dedup-by identity ;; preserves order, unlike set | |
| (concat | |
| (when (:detect-leiningen-projects config) | |
| diff --git a/Source/arcadia/repl.clj b/Source/arcadia/repl.clj | |
| index 8bdd7bd..eff077a 100644 | |
| --- a/Source/arcadia/repl.clj | |
| +++ b/Source/arcadia/repl.clj | |
| @@ -89,9 +89,9 @@ | |
| bytes (.GetBytes Encoding/UTF8 (str result "\n" (ns-name (:*ns* @default-repl-env)) "=> "))] | |
| (try | |
| (do | |
| - (Debug/Log "Sending result") | |
| + ;(Debug/Log "Sending result") | |
| (let [res (.Send socket bytes (.Length bytes) destination)] | |
| - (Debug/Log "Sent result") | |
| + ;(Debug/Log "Sent result") | |
| res)) | |
| (catch SocketException e | |
| (let [estr (str (.ToString e) | |
| @@ -99,9 +99,9 @@ | |
| (ns-name (:*ns* @default-repl-env)) | |
| "=> ") | |
| ebytes (.GetBytes Encoding/UTF8 estr)] | |
| - (Debug/Log "Sending result") | |
| + ;(Debug/Log "Sending result") | |
| (let [res (.Send socket ebytes (.Length ebytes) destination)] | |
| - (Debug/Log "Sent result") | |
| + ;(Debug/Log "Sent result") | |
| res))))))) | |
| (defn- listen-and-block [^UdpClient socket] | |
| diff --git a/configure.edn b/configure.edn | |
| index e3a88c6..acd32f0 100644 | |
| --- a/configure.edn | |
| +++ b/configure.edn | |
| @@ -3,14 +3,15 @@ | |
| ;; Assets/AracadiaConfig/configure.edn. That file will be merged into | |
| ;; this one, with submaps merged recursively. Some standard options are given in comments below. | |
| -{:compiler {:warn-on-reflection true, :unchecked-math false, :enabled true, :debug true}, | |
| - :verbose true | |
| +{:compiler {:warn-on-reflection false, :unchecked-math false, :enabled true, :debug false}, | |
| + :verbose false | |
| ;; :injections are forms that are evaluated before the Arcadia REPL | |
| ;; evaluates each input form. They are useful for requiring or using | |
| ;; common namespaces. | |
| ;; example: | |
| - ;; :injections (do (use 'arcadia.core) (use 'clojure.repl)) | |
| +:injections (do (use 'hard.core) (use 'hard.edit)) | |
| - :detect-leiningen-projects true | |
| + :detect-leiningen-projects false | |
| } | |
| + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment