Contributing to JetBrains MPS Project

Skip to end of metadata
Go to start of metadata

File a Bug Report

Bug reports are the simplest way you can get involved. Bug reports take little time to file and are very helpful to developers. When you discover a problem, please report it. Make sure you provide information about your environment (OS, JDK and MPS version), steps to reproduce the issue, as well as a textual description of the problem. You can file a bug in JetBrains MPS YouTrack bug database. Before submitting an issue, you may also want to search for already submitted ones describing the same problem - and if you find one, feel free to vote for it.

Create Unit Test reproducing the problem

Bug reports are helpful, but as you probably know most of the problems can be reproduced/checked by automated JUnit tests. It's much more easy and convenient for our developers to reproduce the problem by running a test case instead of manually going through a list of steps to reproduce the bug. If you invest a little bit more time and create a JUnit test reproducing your problem, we will usually be able to fix/process your bug faster.

Contribute code indirectly

If you would like to improve the MPS code, you can submit a patch by attaching it to corresponding request in the JetBrains MPS YouTrack bug database. You can either file a new issue with the patch attached, or attach a patch to an issue submitted by another user. A developer will review your patch and, if it meets the quality criteria and fits with the rest of the code, you'll be notified about the acceptance of the patch. As it was already mentioned, patches having a unit-test attaches should be processed faster.

Contribute code directly

Although the main Git repository is located at JetBrains (see the Accessing MPS Git Repository section below), we keep a mirror at GitHub. The mirror is primarily meant as an easy-to-use repository for external contributors. Here's a cookbook on how to contribute your idea to MPS through GitHub

Setting things up

This section describes how you create a fork of the MPS github repository and open the MPS project in IntelliJ IDEA.

  1. The MPS miror repository is at https://github.com/JetBrains/MPS. Fork the jetbrains/MPS repository into your own space using GitHub UI (go to the MPS repo and press the fork button at the top. This will create a fork of the reposistory in your github space)
  2. Once you created your own private fork, clone it to your local machine: git clone git@github.com:<yourGitHubName>/MPS.git. Depending on your internet connection, this may take a long time, MPS is big
  3. It is preferrable to work in your own branch, so create a new branch to work in git checkout -b my_branch_name
  4. Download IntelliJ IDEA from the JetBrains website.
  5. Open the MPS project using IntelliJ IDEA. In the Open Project Dialg, the folder you cloned MPS into should have the "IDEA project" icon automatically; MPS uses the .idea folder to hold IDEA project definition, so it recognizes the directory as an IDEA project)
  6. IDEA may prompt you with an error that complains that no JDK is set up for the project. In the dialog that pops open, please create a new JDK and assign it to the project.
  7. Rebuild the project Menu -> Build -> Rebuild Project
  8. Run the MPSLauncher run configuration to start MPS inside IDEA: Menu -> Run -> Run...
  9. Once MPS starts up, open the MPS project file MPS.mpr located in the root of the cloned project: Menu -> File -> Open Project...

Making the contribution

This section describes how you make changes to the source code.

  1. Now you should be ready to make your changes. Commit as frequently as you like.
  2. You should test your code by running the provided automated test suits. These can be run from IntelliJ IDEA: Run -> Run... In particular, the GlobalTestSuite, ModuleTestSuite and ProjectTest run configuration are to be used.
  3. There are no published code style guidelines at the moment. You may check out the MPS sources or drop us an email when in doubts.

Pushing your changes to us

This section explains how you can forward your local changes to JetBrains.

  1. Push your branch to your private GitHub repository: git push origin my_branch_name
  2. Make a pull request at GitHub - open your repository in a browser, make sure you are looking at the branch that you'd like to see pulled and click the Pull Request button in the upper right corner.
  3. We should process your request and you'll get notification about the progress through the standard GitHub facilities.

Keeping your fork current

As you change your code and commit, you make changes to your own fork of the MPS github repository. Using pull requests, you can make the MPS developers aware of your changes, and they may or may not integrate your change into the original repository. However, in the meantime, the original MPS repository changes (as a consequence of the MPS team working on the code), and your fork is not kept in sync. To keep your local clone and your remote fork in sync with the changes in the original repository, please do the following:

  1. in your local clone, add an additional remote that points to the original MPS github repository. git remote add mpsrepo https://github.com/JetBrains/MPS
  2. you can now pull the changes from the original repository by using git pull mpsrepo master
  3. if you develop your contribution on a branch as we suggested above, you'll have to merge the updated master into your branch using git merge master (while on your branch)
  4. as you do that, you will have to resolve possible merge conflicts locally.
  5. you can then push the merged changes to your own fork using git push origin (origin is the default name assigned to a remote by git clone).

In summary, you pull from the original, resolve conflicts and the push to your fork.

Accessing MPS Git Repository

The main MPS repository is located at git://git.jetbrains.com/mps/mps.git and can be used as a base for submitting your patches to MPS. The process using GitHub should, however, be considered to be the preferred way.

To check out from IntelliJ IDEA, select “Version Control | Checkout from Version Control | Git” from the main menu. In the “Git Repository URL” field, enter:

To check out from the command line, use the following command:

In addition you can browse MPS sources using git web access.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 07, 2011

    Building MPS from Source

    In order to build MPS from source you need to download the IDEA IntelliJ community edition and open the MPS project in idea. To do so, call "Open Project" and choose the folder in which the git repository is located. After that, trigger a rebuild. Once the rebuild is finished, open a shell and navigate into the build directory. The script to execute is called run.build.sh