What to commit [message #1730915] |
Fri, 29 April 2016 14:25  |
Eclipse User |
|
|
|
I tried to find something like this online and could not, so sorry if this is a duplicated question.
I've created a grammar (new project -> file under org,example.domainmodel ->etc)
I would like to commit this grammar to a repo, so other collaborators will be able to both edit it and use it.
I tried to find online some guidelines of what I should commit
1) should I commit all directories that were created with the project?
2) should I commit just the xtext file?
3) should I do something else?
Thank you
|
|
|
|
|
|
|
|
Re: What to commit [message #1731301 is a reply to message #1730923] |
Wed, 04 May 2016 04:12  |
Eclipse User |
|
|
|
It's a matter of taste/necessity what you check in.
You should always check in
- everything that is hand written. That includes the grammar
- everything that has been manually modified, e.g. if you touched the generated plugin.xml
- the base plug-in structure as created by the 'New Xtext project' wizard, as the generator is not capable of recreating plug-ins and the base files (e.g. MANIFEST.MF) therein.
It makes sense to check in
- all generate-once artifacts, e.g. plugin.xml, everything in the src folder. Why? Because you could manually modify it in the future and forget to add it.
- the .settings folder if you want your project settings to be valid for all users
You don't have to check in
- purely generated code in the folders src-gen or xtend-gen. It makes sense to check them in if you don't want to force users (that includes a CI server) to generated after checking out, or to better track what changes between two generator runs, or to make it easy to revert a change.
I never checked in
- the bin folder as it is really automatically created and populated by Eclipse. Eclipse skip this by default.
Some versioning systems, e.g. git, delete empty folders on checkout. This can cause errors after checkout, e.g. when Eclipse cannot find the src-gen folder you chose not to check in. To avoid that you can add and check in a dummy file in these directories.
|
|
|
Powered by
FUDForum. Page generated in 0.09783 seconds