About

This project is dedicated to the creation of Nemerle integration for VS 2008. Minimum goals for the project are to implement:

Code completion on input.

Quick Info tooltip display when the cursor is over an identifier.

Full-fledged syntax highlighting (according to macros and types imported into the particular file).

Quick Info tooltip display for function parameters.

Code navigation.

WinForms designer.

Simple code snippets.

The following features may be implemented later on:

Refactoring.

Semantic constructs look-up.

Visual Web designer support.

Support for automatic snippets generated at run-time for imported macros.

SVN support.

Other delightful features have been forgotten to enlist.

License

BSD-style open source. In a nutshell: You must mention the authors in your products’ “About”s, readme etc. and your derived code must also retain all copyright notices and refer to them as appropriate.

If you have installed Nemerle binaries before using msi installer then correct «Nemerle» environment variable: remove quotation-marks (it was a bug in 0.9.3 installer) and change it if you plan to install newly compiled binaries to another directory. Warning! You must build the latest compiler version yourself from the SVN sources to work with this project.

Open Nemerle.VsIntegration project properties and find Debug tab. Set “Start external program:” field to «%VS80COMNTOOLS%..\..\Common7\IDE\devenv.exe». Set «Command line arguments:» field to «/ranu /rootsuffix Exp».

Build the solution and run the project.

If all the steps above were performed correctly an experimental version of VS2005 where you can test Nemerle integration should start.

Building the compiler from source using MSBuild

You can use batch files located in the root folder of the compiler’s SVN trunk to build Nemerle compiler from source. Here is their description:

Build.cmd — Builds the project in two stages. This guarantees that the compiler can build itself and also allows to compile code in case of internal compiler macros changes. Choose this option if you modified compiler code and want to commit new binary assemblies (which are in the trunk\boot folder).

Build-1-phase.cmd — Builds the project in one stage. It’s twice faster than the previous option but doesn’t allow to compile some compiler macros changes and can result in compiler binaries that cannot build themselves from their own source. Never commit trunk\boot contents built using this batch file!

Reg.cmd — Copies compiled assemblies to %ProgramFiles%\Nemerle directory and precompiles them using NGEN.EXE utility. This makes these assemblies available for both VS integration types and shortens compiler loading times (this makes compilation of small projects substantially faster).

BuildAndReg.cmd — Project is compiled using Build.cmd first and then Reg.cmd is called if the first stage has succeeded. Therefore it performs two-stage compilation and precompilation of assemblies.

BuildAndReg-1-phase.cmd — It’s analogous to BuildAndReg.cmd but performs compilation in one stage (as in Build-1-phase.cmd). Use this option when you update compiler source from the SVN repository and you need debug information in compiler assemblies.

BuildAndReg-Release.cmd — It’s analogous to BuildAndReg.cmd but performs Release build for compiler assemblies. Debug information is not generated and XML documentation is generated (this slows down the compilation approximately twice). Use this option if you want to obtain the fastest compiler variant and you do not need debug information. Also use this option if you need to commit compiler binaries (trunk\boot) to the SVN repository.

Building the compiler from source using GNU make

This is the approach used by the main compiler developers. If you want to perform it on a Windows machine you have to install Cygwin.

ПРИМЕЧАНИЕ

* If you don’t understand what does this mean and unable to find relevant information using Google and Nemerle web site this project is probably not for you. Sorry.

Possible problems

If you try to recompile Nemerle compiler binaries using an opened Visual Studio and you have used previous compiler versions at least once you’ll see a lot of twinkling text at the registration stage and the number of files copied will be different from anticipated 4, 1, 5. Just close the studio and run the compilation and pre-JIT from the command line again.

Notice that you’ll have to force rebuild of the integration project after every new build of Nemerle compiler assemblies.

How to get involved in the development of VS 2005 integration and Nemerle compiler?

You can obtain login and password that will grant you access to the SVN repository with the sources and you’ll be able to work on them and commit the changes (see below). You should realize that this implies a certain degree of responsibility and your changes may affect integrity of the project. So you should be accurate and attentive and your changes should be reasonable. Usually the best way to start is to ask questions and participate in the discussion in the Nemerle Google group and join developers’ mailing list. You may find information how to subscribe here. Conference archives are available here. There’s also a forum for Russian-speaking people solely dedicated to the integration project: http://rsdn.ru/Forum/?group=prj.nemerle. Be polite and respect other people opinions.

Follow the coding style of the original code while making your changes.

You can send patches (created automatically by SVN client) personally to the integration project’s lead developers (VladD2 and IT at the moment – see http://nemerle.org/svn/nemerle/trunk/misc/users for contact information) until you have a personal SVN login. Or you can also attach patches to your developers’ mailing list postings. Please don’t attach patches with the size of more than 100 Kb.

To obtain an SVN login you should generate a password hash here first. Then you should send the generated hash to the project admin Michal Moskal [malekith A T nemerle.org]. After obtaining permission add yourself and your contact information to the http://nemerle.org/svn/nemerle/trunk/misc/users.

Unit tests

The VS2005 integration project contains unit tests. NUnit framework (http://www.nunit.org/) with the version 2.2.8 or higher is required to run them.

ПРЕДУПРЕЖДЕНИЕ

If you do not install NUnit you will get error messages during compilation of the lntegration solution projects because they contain references to NUnit assemblies.

You may encounter debugger crashes/freezes while debugging in VS 2005 in interactive mode for prolonged periods of time. This makes complicated problems hard to debug. This is one of the reasons why it is desirable to employ unit tests as a good replacement for interactive debugging. Nemerle.Compiler.Utils project contains unit tests in Nemerle.Completion2\Tests subdirectory. (Note: Completion Engine will possibly be renamed to IntelliSense Engine in the future).

Files:

Nemerle.Completion2\Tests\Content\Class1.n

Nemerle.Completion2\Tests\Content\Class1-2.n

contain sample code that is parsed in the tests. More files or even whole projects will be possibly added here in the future.