Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add Meta Programming System gitignore files #897

Closed
wants to merge 1 commit into from

3 participants

Kolja Dummann Bernd Kolb Carl Suster
Kolja Dummann

The Meta Programming System is a language workbench created by JetBrains.

http://jetbrains.com/mps/

By default this file will ignore the generated java source and the compiled java classes that are
produced by the language compiler. It will only add the Models which contain all information
necessary to reproduce the the java source code and the the resulting class files.

In addition to the generated source code it will ignore the test result files and test property files,
because those are also generated from the models.

The ignore file also prevents commiting the workspace.xml which contains the currently editor state,
like open files and cursor position.

Bernd Kolb

i think that would be a nice addition for MPS users

Carl Suster
Collaborator

Thanks for this! Looks mostly okay, but I have some comments below.

I found this documentation page which states:

Regarding the (temporary Java source) files generated by MPS, two approaches are
possible: they can be checked in or not. Not checking them in means that some of
the version control operations get simpler because there is less "stuff" to deal
with. Checking them in has the advantage that no complete rebuild of these files
is necessary after updating your code from the VCS, so this results in a
faster workflow.

If you decide not to check in temporary Java source files, the following
directories and files should be added to the .gitignore in your local
repo:

  • For languages: source_gen, source_gen.caches and classes_gen
  • For solutions, if those are Java/BaseLanguage solutions, then the same applies as for languages. If these are other solutions to which the MPS-integrated Java build does not apply, then source_gen and source_gen.caches should be added, plus whatever else your own build process creates in terms of temporary files.

Without knowing MPS and its terminology, I don't really understand the last point. Is it relevant enough to be worth a comment in the template? I agree with the idea of ignoring the files as you have suggested if they indeed regeneratable since checking them in would only produce artificial churn in the repo.

As a stylistic preference, I think that the rows of dashes are inconsistent with most of the templates in the gitignore repo, so could you take them out? Same with the stray asterisk in line # * tests. Even better if you could expand "tests" to "results of test" or something like that that gives an uninformed user at least some idea of why the rules might be relevant.

Carl Suster
Collaborator

@coolya Any thoughts on the documentation quoted above? I'm thinking that a brief comment or at least the URL might be useful. If you add that and preferably strip out the dashed lines etc. then I'd be happy to merge.

Kolja Dummann

@arcresu sry for the delay I will update the pull request asap

I am not aware of any language in the MPS space the is not able to regenerate its own artifacts (source_gen and source_gen.cache content) from the data present in the models that are part of the solution file. But I will add a comment to the template if there are any custom artifacts that are not regenerateable from the models that those should be added manually.

Kolja Dummann coolya add Meta Programming System gitignore files
The Meta Programming System is a language workbench created by JetBrains.

http://jetbrains.com/mps/

By default this file will ignore the generated java source and the compiled java classes that are
produced by the language compiler. It will only add the Models which contain all information
necessary to reproduce the the java source code and the the resulting class files.

In addition to the generated source code it will ignore the test result files and test property files,
because those are also generated from the models.

The ignore file also prevents commiting the workspace.xml which contains the currently editor state,
like open files and cursor position.
51f1d9a
Carl Suster arcresu closed this pull request from a commit
Carl Suster arcresu Grammar/formatting tweak to comments
Fixes #897 with amendment
d26de55
Carl Suster arcresu closed this in d26de55
Carl Suster
Collaborator

Thanks, and sorry for the delay :sweat_smile:

trimeloni trimeloni referenced this pull request from a commit in trimeloni/gitignore
Carl Suster arcresu Grammar/formatting tweak to comments
Fixes #897 with amendment
c1f7020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 6, 2014
  1. Kolja Dummann

    add Meta Programming System gitignore files

    coolya authored
    The Meta Programming System is a language workbench created by JetBrains.
    
    http://jetbrains.com/mps/
    
    By default this file will ignore the generated java source and the compiled java classes that are
    produced by the language compiler. It will only add the Models which contain all information
    necessary to reproduce the the java source code and the the resulting class files.
    
    In addition to the generated source code it will ignore the test result files and test property files,
    because those are also generated from the models.
    
    The ignore file also prevents commiting the workspace.xml which contains the currently editor state,
    like open files and cursor position.
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 0 deletions.
  1. +20 −0 MetaProgrammingSystem.gitignore
20 MetaProgrammingSystem.gitignore
View
@@ -0,0 +1,20 @@
+# General
+
+workspace.xml
+junitvmwatcher*.properties
+build.properties
+
+# generated java classes and java source files
+# custom artifacts that can't be generated from the models you
+# should add them manually
+# see http://confluence.jetbrains.com/display/MPSD25/HowTo+--+MPS+and+Git
+# for further reference
+classes_gen
+source_gen
+source_gen.caches
+
+# generated test code and test results
+test_gen
+test_gen.caches
+TEST-*.xml
+junit*.properties
Something went wrong with that request. Please try again.