Clojure

deftype does not work if containing ns contains dashes

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

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)"
AOT compile this, and shebang! in your classes/ directory you see the following folder structure: classes/net/yournick/lr-plus/

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)

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: