Since SVN rev 1110: user=> (compile 'clojure.contrib.str-utils) java.lang.Exception: Namespace name must match file, had: clojure.contrib.str-utils and clojure/contrib/str_utils.clj (NO_SOURCE_FILE:0)
I think the only problem is that the test to generate this exception asserts that classnames equal namespace names. I think the actual convention is meant to be that namespaces can have dashes, but the generated classes will have underscores in their place. The attached patch fixes the assertion. With this fix I can compile, and then without the .clj sources in the classpath anymore, load the generated .class files. --Chouser --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
commit 7946422ff14968673b82e58ffd181f417355ddf1 Author: Chouser <[EMAIL PROTECTED]> Date: Thu Nov 20 00:11:12 2008 -0500 compile failed for namespaces with dashes in their names. Fixed. diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java index 01f3c27..d3c4559 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -4498,7 +4498,7 @@ public static Object compile(Reader rdr, String sourcePath, String sourceName) t { Keyword gk = Keyword.intern(null, "gen-class"); Symbol nssym = (Symbol) RT.second(r); - if(!nssym.toString().equals(classname)) + if(!nssym.toString().replace('-','_').equals(classname)) throw new Exception(String.format("Namespace name must match file, had: %s and %s", nssym, sourcePath)); for(ISeq s = RT.rest(RT.rest(r)); s != null; s = s.rest())