Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureCLR by

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.

3 Answers

0 votes
by

Comment made by: dmiller

Simplified CLI to
Clojure.Compile.exe (link: -o outputAssemblyName) cljFileName...

0 votes
by

Comment made by: dmiller

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.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJCLR-25 (reported by speige)
...