MPS is an open source project, so we can compile it ourselves. Doing so is particularly important if you want to live on the bleading edge of the development, i.e., if you are interested in the before-alpha features and bug fixes.
There isn't much documentation about how to do that, however. Mihail was kind enough to create a bug asking for more documentation on the process, but I thought I could start here with my own experiences trying to do that. Maybe this will help others, and maybe it can help with ideas for the documentation later.
Note that this is what *I think* is correct, it may be completely wrong ;-)
1 - Getting the sources
That's nicely explained in this blog entry: http://blogs.jetbrains.com/mps/2010/08/mps-source-code-repository-is-publicly-available-now/
Essentially you have to get it using git. You can either use git directly
git clone git://git.jetbrains.org/mps/mps.git
or use IntelliJ IDEA to clone using the same URL.
2 - Compiling
If all you want is to compile the sources and run MPS, go to step 3 (Building a distribution). If you want to see the sources and run MPS in debug mode, you'll need IntelliJ IDEA. I downloaded the community version and opened the single MPS project there. Then you can go to Build->Make Project (or Ctrl-9) and it will compile the project. Finally, you can use the MPSLauncher, MPSDebug, etc to run an instance of MPS directly from InteliJ IDEA.
3 - Building a distribution
There's a single script that can be executed in Linux (at least I used Linux, maybe there's a way to do that in other operating systems) to perform the full build and package a distribution. It is found in mps/build, so:
That will take a while. It will compile everything and will package the distribution in a directory called MPS.artifacts. You can then unzip the MPS-XX.zip file and run it just like you run the regular distribution.
4 - Performing changes in MPS
So, here's where my knowledge of this thing stops. I am not sure which process to follow when developing MPS itself. If I run MPS from IntelliJ, I only see its sources in the Modules Pool directory. Usually modules there are not editable, but now they where. I tried to change things there and "regenerate language", but only got errors. Sometimes they say "compiled with IntelliJ, but no IntelliJ instance found" (or something similar).
I imagine that it is possible to edit say, baseLanguage, in this MPS instance, and then test it directly in the same instance without having to regenerate java and compile in IntelliJ, but I am not sure how to do that.
5 - Caveat
I am developing a language which is working (reasonably) fine in MPS 2.0_M1. By using methods 2 and 3 here I was able to open this language in MPS and compile parts of it. But when I generate some of my modules, I get some "...smodel.DynamicReference] couldn't resolve reference..." errors. They could be a result of problems in my compilation of MPS. They could also be the result of new developments in MPS since M1 that rendered my modules wrong. I am not sure yet, so take my description here with a grain of salt.