[CLJ-432] deftype does not work if containing ns contains dashes Created: 08/Sep/10 Updated: 13/Mar/11 Resolved: 29/Nov/10
|Fix Version/s:||Release 1.3|
|Reporter:||Laurent Petit||Assignee:||Chas Emerick|
|Patch:||Code and Test|
There's a problem with the compilation (either live or AOT) of e.g. types, if the namespace containing the type definition cointains dashes.
It's quite easy to reproduce: create src/net/yournick/lr_plus.clj , and in this file, have just "(ns net.yournick.lr-plus) (deftype Foo)"
lr-plus/ contains the Foo.class file
folder lr-plus/ should really be lr_plus/
the problem is that while apparently with Oracle JVMs everything works fine while you don't try to AOT compile it, it does not work (even if not AOT'ed) with IBM JRE 6:
Caused by: java.lang.ClassFormatError: JVMCFRE068 class name is invalid; class=compile__stub/net/cgrand/parsley/lr-plus/TableState, offset=0 (lr_plus.clj:8)
|Comment by Assembla Importer [ 08/Oct/10 7:35 AM ]|
Converted from http://www.assembla.com/spaces/clojure/tickets/432
|Comment by Chas Emerick [ 19/Nov/10 9:23 PM ]|
This patch fixes namespace munging for protocols, deftype, and defrecord.
|Comment by Laurent Petit [ 21/Nov/10 6:45 AM ]|
OK, I've tested the patch and it works.
|Comment by Alex Miller [ 13/Mar/11 11:54 PM ]|
This was a breaking change for us in 1.2.1 in this kind of example:
Dropping a note here in case others run into it.