Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext stuff and SVN
Xtext stuff and SVN [message #557570] Wed, 08 September 2010 07:02 Go to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
Hi,

My little DSL project is maturing pretty well and I would like to move it to an SVN repo as there will be some other contributors. I went to Project->Clean to try to clean out everything before setting up SVN. Also prevented a new build from happening automatically. However, I noticed that the clean didn't delete the .java files that get generated when I run the DSL workflow.

I'm wondering how do you people handle Xtext projects with SVN? Should I just check in everything in the three folders (language, generator, ui)? What about the hidden files like .classpath, .project files?

Should the src-gen folder be checked in? Or just checkin an empty src-gen?


Thanks.
Re: Xtext stuff and SVN [message #557573 is a reply to message #557570] Wed, 08 September 2010 07:15 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

you have to check in the hidden files (they are not hidden because they are not needed).

With respect to the generated files (in src-gen):
First: the clean does not care about java files being generated or not (after all, nobody prevents you from naming your source folder whatever you like, so it is not obvious that src-gen-files are really generated and can therefor be deleted without risk); the compiled classes get deleted.
Second: there are different opinions about checking in generated sources or not.
a) never check in generated sources, as these files can be, well, generated and also there is no risk of someone making manual changes to them which will get lost when regenerating.
b) why not checking them in? If you don't, you are always forced to regenerate before the projects compile (as the missing files will cause lots of errors). So by checking them in, you'll have a working project after check-out.

In my opinion it is a matter of taste, you decide what's best for your project.

Alex
Re: Xtext stuff and SVN [message #557966 is a reply to message #557570] Thu, 09 September 2010 16:01 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

I often check in the empty src-gen and add 'svn:ignore *'. This way no generated files get checked in and the build path does not break. My strategy is always do not check in any generated code whenever possible. Depends sometimes on project strategies how this is done in real.

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Xtext stuff and SVN [message #558038 is a reply to message #557966] Thu, 09 September 2010 21:06 Go to previous message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
I've grown quite fond of checking everything in, if only because anyone can check out the sources without having to re-generate despite all those compile errors. But that maybe down to sheer laziness Very Happy Conceptually/usually, Karsten's solution is much cleaner and saves a bunch on check-in traffic.

Previous Topic:Xtext model and EMFCompare
Next Topic:Simple xtext Grammar with function calls
Goto Forum:
  


Current Time: Fri Apr 26 20:15:27 GMT 2024

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

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

Back to the top