nasser / magic

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

pprint breaks when compiled through MAGIC #192

Closed nasser closed 3 years ago

nasser commented 4 years ago
user> (clojure.pprint/pprint {1 2 3 (range 20) :foo (mapv inc (range 20))})
{()[]}nil

The implementation of pprint depends on defstruct, which isn't well tested. In principle it should be fine, but it clearly isn't. This might point to a more subtle semantic issue.

nasser commented 4 years ago

clojure.pprint.pretty_writer.clj.dll does not verify

Could not load class with token 2000072 due to Could not resolve type with token 0100002b from typeref (expected class 'clojure.pprint.PrettyFlush' in assembly 'Clojure, Version=1.10.0.0, Culture=neutral, PublicKeyToken=null') assembly:Clojure, Version=1.10.0.0, Culture=neutral, PublicKeyToken=null type:clojure.pprint.PrettyFlush member:(null)
Could not initialize class(0x02000073) .<magic>clojure_pprint$<fn>__23 due to Invalid type proxy_1 for instance field <magic>clojure_pprint$<fn>__23:this assembly:/home/nasser/projects/magic/Magic.Unity/Infrastructure/clojure.pprint.pretty_writer.clj.dll type:<magic>clojure_pprint$<fn>__23 member:(null)
Could not initialize vtable of class(0x02000073) .<magic>clojure_pprint$<fn>__23 due to Invalid type proxy_1 for instance field <magic>clojure_pprint$<fn>__23:this assembly:/home/nasser/projects/magic/Magic.Unity/Infrastructure/clojure.pprint.pretty_writer.clj.dll type:<magic>clojure_pprint$<fn>__23 member:(null)
Could not initialize class(0x02000074) .<magic>clojure_pprint$<fn>__24 due to Invalid type proxy_1 for instance field <magic>clojure_pprint$<fn>__24:this assembly:/home/nasser/projects/magic/Magic.Unity/Infrastructure/clojure.pprint.pretty_writer.clj.dll type:<magic>clojure_pprint$<fn>__24 member:(null)
Could not initialize vtable of class(0x02000074) .<magic>clojure_pprint$<fn>__24 due to Invalid type proxy_1 for instance field <magic>clojure_pprint$<fn>__24:this assembly:/home/nasser/projects/magic/Magic.Unity/Infrastructure/clojure.pprint.pretty_writer.clj.dll type:<magic>clojure_pprint$<fn>__24 member:(null)
In method: <magic>expr_1975::eval()
Error: Cannot load method from token 0x0600015f for newobj at 0x0010
In method: proxy_1::.ctor(object)
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::__getClojureFnMappings()
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::deref()
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::Close()
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::__updateClojureFnMappings(IPersistentMap)
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::Write(object)
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::get_Encoding()
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::ppflush()
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::__initClojureFnMappings(IPersistentMap)
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::Write(string,object,object)
Error: Could not load type .proxy_1 at 0x0000
In method: proxy_1::Flush()
Error: Could not load type .proxy_1 at 0x0000
In method: <magic>clojure_pprint$<fn>__23::.cctor()
Error: Cannot load field from token 0x04000199 for stsfld at 0x000b
In method: <magic>clojure_pprint$<fn>__23::.ctor()
Error: Could not load type .<magic>clojure_pprint$<fn>__23 at 0x0000
In method: <magic>clojure_pprint$<fn>__23::invoke()
Error: Could not load type .<magic>clojure_pprint$<fn>__23 at 0x0000
In method: <magic>clojure_pprint$<fn>__23::HasArity(int)
Error: Could not load type .<magic>clojure_pprint$<fn>__23 at 0x0000
In method: <magic>clojure_pprint$<fn>__24::.cctor()
Error: Cannot load field from token 0x040001ab for stsfld at 0x000b
In method: <magic>clojure_pprint$<fn>__24::.ctor()
Error: Could not load type .<magic>clojure_pprint$<fn>__24 at 0x0000
In method: <magic>clojure_pprint$<fn>__24::invoke()
Error: Could not load type .<magic>clojure_pprint$<fn>__24 at 0x0000
In method: <magic>clojure_pprint$<fn>__24::HasArity(int)
Error: Could not load type .<magic>clojure_pprint$<fn>__24 at 0x0000
In method: <magic>clojure_pprint$pretty-writer__0::.cctor()
Error: Cannot load field from token 0x040001b1 for stsfld at 0x000b
In method: <magic>clojure_pprint$pretty-writer__0::.ctor()
Error: Could not load type .<magic>clojure_pprint$pretty-writer__0 at 0x0000
In method: <magic>clojure_pprint$pretty-writer__0::invokeTyped(object,object,object)
Error: Could not load type .<magic>clojure_pprint$pretty-writer__0 at 0x0000
In method: <magic>clojure_pprint$pretty-writer__0::invoke(object,object,object)
Error: Could not load type .<magic>clojure_pprint$pretty-writer__0 at 0x0000
In method: <magic>clojure_pprint$pretty-writer__0::HasArity(int)
Error: Could not load type .<magic>clojure_pprint$pretty-writer__0 at 0x0000
Error count: 25