-
Notifications
You must be signed in to change notification settings - Fork 157
Developing ClojureCLR
For development work, you will need:
- .Net 4.0
- Optional: Visual Studio 2010 or 2012 (Express edition not supported)
- NuGet installed in VS for package management
You can check out the repo from the ClojureCLR Github site -- https://github.com/clojure/clojure-clr -- or, better yet, fork the project and go from there.
- Build products are placed in the
bin\
subdirectory. We support Debug and Release builds for .NET 3.5 and 4.0. - Make
Clojure.Main
your startup project. - If you want to run the compiler (
Clojure.Compile
) under the debugger, find the post-compile step on the Clojure.Compile project and copy the list of files there to the command-line args for debugging if you want to debug compiling the core .clj files. - The Clojure compiler looks for the Clojure libraries in either a) the current directory, b) the GAC, or c) another directory specified by the environment variable CLOJURE_LOAD_PATH. If your libraries aren't in one of these three places, it will balk.
If you are using Visual Studio, you should be able to figure this out.
It is also possible to build from the command-line. This likely will be necessary if you are developing under Mono.
MSBuild.exe build.proj /target:XXX /p:Configuration="Debug 3.5" /p:Platform="Any CPU"
If you are compiling under Mono, use
xbuild build.proj /target:XXX /p:Configuration="Debug 3.5" /p:Platform="Any CPU" /p:Runtime="Mono"
The value for /p:Configuration
can be any of
- “Debug 3.5”
- “Release 3.5”
- “Debug 4.0”
- “Release 4.0”
The value for /target
can be any of
-
Build
— just build the designated configuration -
Test
— build and run the clojure test suite. This includes compiling various genclass and protocols needed for the testing. Does not do generative tests. -
TestGen
— Same asTest
except it runs the generative tests. -
Dist
— build and copy to thedist\
folder the necessary files to run ClojureCLR (not including the test_clojure files) -
ILMerge
— build an ILMerge'd DLL for distribution
To sign Clojure.dll, set the environment variable CLOJURE_SNK
to the location of your .SNK file.
Most of the tests that ship with Clojure(JVM) run. Those that don’t make sense on ClojureCLR have been edited out.
There are two ways to run the Clojure test suite, by hand and by command.
- Get a REPL by starting Clojure.Main.
- Execute
(load "clojure/run_test_i")
and stand back. - When the tests complete, you will be left at the REPL prompt.
- Bring up a Visual Studio Command Prompt Window.
- Change directory to the root directory for the ClojureCLR solution.
- Use MSBuild or xbuild with the target
test
, using the command-line parameters described above.