Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » What to commit(GIT commit of xtext project)
What to commit [message #1730915] Fri, 29 April 2016 18:25 Go to next message
Danny Quizzo is currently offline Danny QuizzoFriend
Messages: 16
Registered: April 2016
Junior Member
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 #1730917 is a reply to message #1730915] Fri, 29 April 2016 18:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
You should exclude src-gen xtend-gen bin / target and Model/generated

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What to commit [message #1730918 is a reply to message #1730917] Fri, 29 April 2016 18:51 Go to previous messageGo to next message
Danny Quizzo is currently offline Danny QuizzoFriend
Messages: 16
Registered: April 2016
Junior Member
But if the only file I created is under
org.example.domainmodel/src/org.example.domainmodel/Domainmodel.xtext

do I really need to commit the entire src directory?
do I really need the ide/tests/ui and ui.tests directories?
Re: What to commit [message #1730919 is a reply to message #1730918] Fri, 29 April 2016 18:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
You should run the mwe once. This will trigger the Generation of the the generated once / stub Classes that will Contain manually written customization Code and yes you need the other Projects as well as you chose. To create them in the wizard

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What to commit [message #1730922 is a reply to message #1730919] Fri, 29 April 2016 19:41 Go to previous messageGo to next message
Danny Quizzo is currently offline Danny QuizzoFriend
Messages: 16
Registered: April 2016
Junior Member
what is mwe?
Re: What to commit [message #1730923 is a reply to message #1730922] Fri, 29 April 2016 19:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
This is the generateyourdsl.mwe2 file that triggers the xtext generator

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What to commit [message #1731301 is a reply to message #1730923] Wed, 04 May 2016 08:12 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
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.


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:What is the best way to allow xtext work on extensions ignoring case of them
Next Topic:Eclipse Plugin Install Error
Goto Forum:
  


Current Time: Fri Apr 26 14:19:15 GMT 2024

Powered by FUDForum. Page generated in 0.05017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top