<< Back to previous view

[CLJCLR-25] Clojure.Compile.exe create single dll for all compiled .clj files Created: 02/Aug/13  Updated: 14/Sep/13

Status: Reopened
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Devin Garner Assignee: David Miller
Resolution: Unresolved Votes: 1
Labels: None

Attachments: Text File 0001-PATCH-Add-NDesk.Options-ManyConsole-via-NuGet-to-all.patch    
Patch: Code

 Description   

I've created a patch for ClojureCLR that allows the Clojure.Compile.exe to build a single .dll or .exe when given a list of .clj files. This is basically the same concept as the ILMerge, but it gives the benefit to the programmer with a project containing many .clj files, rather than only to clojure.dll itself.

The merged/separate option can be specified at the commandline, so users can choose the previous method if they prefer.

I didn't remove ILMerge from the ClojureCLR build process, but it should theoretically be easy to do if desired.

ILMerge is working, but its license doesn't allow redistribution & would require each programmer to learn to use the tool (unless its built into nLeiningen & vsClojure). It seems better if Clojure.Compile.exe doesn't make tons of dlls in the first place.

The basic usage is:

Clojure.Compile.exe -include test.clj -include test2.clj -outputAssemblyName test.dll
-or-
Clojure.Compile.exe -i test.clj -i test2.clj -o test.dll

If you leave off the -o parameter, it functions the same as previously.



 Comments   
Comment by David Miller [ 14/Sep/13 2:37 PM ]

Simplified CLI to
Clojure.Compile.exe [-o outputAssemblyName] cljFileName...

Comment by David Miller [ 14/Sep/13 3:14 PM ]

I thought I had run the test suite one last time before committing – apparently not. The fix committed as 7745dec blows three tests. One test shows the :arglists metadata on functions has the wrong type. Two other tests error out function-serialization.

In addition, :file metadata went from relative paths to absolute paths, so the metadata in distributed ClojureCLR will show the file paths on my development machine.

I'm going to roll this change back until these are fixed.





[CLJCLR-26] Compiler.FnOnceSym initialized in wrong order relative to _duplicateTypeMap Created: 26/Nov/13  Updated: 26/Nov/13

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David Miller Assignee: David Miller
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Noted here: https://groups.google.com/forum/#!topic/clojure/1HqVgklTb7w

From Brian Barnes:

Unfortunately, this line:

public static readonly Symbol FnOnceSym = (Symbol) Symbol.intern("fn*").withMeta(RT.map(Keyword.intern(null, "once"), true));

comes before this line:

static Dictionary<String, Type> _duplicateTypeMap = new Dictionary<string, Type>();

The evaluation of the first causes a call to the static method FindDuplicateType() within the same class, and this method uses the _duplicateTypeMap without a null check. This causes a null exception to be thrown because the initializer for _duplicateTypeMap hasn't executed yet.

My solution is to add a section at the very top of the Compiler class for "dependency" intializations - consisiting only of the initialization of _duplicateTypeMap at this point, to give a home to all such initializations that get used by the other static initializers.






[CLJCLR-27] Add more support for attributes in gen-class Created: 07/Dec/13  Updated: 07/Dec/13

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: David Miller Assignee: David Miller
Resolution: Unresolved Votes: 1
Labels: None


 Description   

For example, to support COM interop, it would be nice to annotate the gen-class'd class with

[ComImport, Guid("E436EBB3-524F-11CE-9F53-0020AF0BA770")]

We already have attribute support for definterface, deftype, gen-interface, so this should be easy to do.






[CLJCLR-11] Simplify integration of Clojure code with existing .NET code Created: 03/Mar/13  Updated: 06/Mar/13

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Aaron Craelius Assignee: David Miller
Resolution: Unresolved Votes: 1
Labels: None

Attachments: Text File clojure-hosting2.patch     Text File clojure-hosting.patch    
Patch: Code

 Description   

It would be nice to have a nice high-level wrapper class for key Clojure integration functions. In IronPython for example, there is a IronPython.Hosting.Python class. For ClojureCLR, I created the attached clojure.lang.Hosting.Clojure class which provides three simple functions Require, GetVar, and AddNamespaceLoadMapping (for integrating .clj files into .NET assemblies as embedded resources). This class or one like it is a simple suggestion to make integration with existing code as painless as possible.

Sample usage:

Clojure.GetVar("clojure.main", "main").invoke(); // Starts an embedded Clojure REPL

This is much simpler than:

Symbol CLOJURE_MAIN = Symbol.intern("clojure.main");
Var REQUIRE = RT.var("clojure.core", "require");
REQUIRE.invoke(CLOJURE_MAIN);
RT.var("clojure.main", "main").invoke().



 Comments   
Comment by Aaron Craelius [ 06/Mar/13 8:42 PM ]

This is an updated patch that supercedes the previous patch adds an AddToLoadPath method.





[CLJCLR-24] build.proj ILMerge target broken Created: 26/Jul/13  Updated: 26/Jul/13

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Devin Garner Assignee: David Miller
Resolution: Unresolved Votes: 0
Labels: None


 Description   

When running the command

msbuild /t:Ilmerge /p:Configuration="Release 4.0" build.proj

ILMerge gives an error that "edn" is missing. I added "clojure.edn" to the post build events of Clojure.Compile.csproj and the error went away.






[CLJCLR-29] Add links to CLojureCLR ML, G+ community and JIRA to the README. Created: 11/Mar/14  Updated: 11/Mar/14

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Trivial
Reporter: David Miller Assignee: David Miller
Resolution: Unresolved Votes: 0
Labels: None





Generated at Wed Apr 23 04:49:36 CDT 2014 using JIRA 4.4#649-r158309.