add Meta Programming System gitignore files #897

Closed
wants to merge 1 commit into
from

3 participants

@coolya

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.

@bkolb

i think that would be a nice addition for MPS users

@arcresu

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.

@arcresu

@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.

@coolya

@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.

@coolya 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
@arcresu arcresu added a commit that closed this pull request Jun 12, 2014
@arcresu arcresu Grammar/formatting tweak to comments
Fixes #897 with amendment
d26de55
@arcresu arcresu closed this in d26de55 Jun 12, 2014
@arcresu

Thanks, and sorry for the delay 😅

@trimeloni trimeloni added a commit to trimeloni/gitignore that referenced this pull request Jun 24, 2014
@arcresu 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