eGit problems in Eclipse Mars - empty src and xtend-src [message #1739235] |
Thu, 28 July 2016 15:25 |
Gary Worsham Messages: 176 Registered: September 2013 |
Senior Member |
|
|
I have an Xtext/Xtend project saved up in Github that I want to share with someone else. So I've been going through the process of what to do when checking everything out from scratch into Eclipse Mars. One issue that I can't fix is that in the "tests" projects for my 2 DSLs, Eclipse complains that "src"and "xtend-src" folders do not exist. Sure enough, they don't exist. I never created them and as far as I can tell they are not needed. I can launch the Eclipse application by ignoring these errors, but that is not very clean.
I tried adding "src" and "xtend-src" Source Folders, but Eclipse told me they already exist (they don't). Then I tried adding "src-" and "xtend-src-" (this works) and then renaming them to the correct thing (which also works). Now my project doesn't have any errors.
I select these new folders, Team->Add to Index, but nothing happens I guess because Git doesn't create empty folders?
Bottom line, 2 issues:
a) Eclipse Mars seems to have a bug regarding "src" and "xtend-src" requiring an idiotic work around to create those folders,
b) Git won't check in empty folders, requiring anyone trying to use my project to go through idiotic workaround (a) 4 times.
Suggestions?
Thanks!
|
|
|
Re: eGit problems in Eclipse Mars - empty src and xtend-src [message #1739238 is a reply to message #1739235] |
Thu, 28 July 2016 16:41 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Gary,
Comments below.
On 28.07.2016 17:25, Gary Worsham wrote:
> I have an Xtext/Xtend project saved up in Github that I want to share
> with someone else. So I've been going through the process of what to
> do when checking everything out from scratch into Eclipse Mars. One
> issue that I can't fix is that in the "tests" projects for my 2 DSLs,
> Eclipse complains that "src"and "xtend-src" folders do not exist.
Yes, I've seen that. You're probably not committing the generated
resources because they're marked as derived and you have auto ignore
derived resources enabled for EGit.
> Sure enough, they don't exist. I never created them and as far as I
> can tell they are not needed.
You can of course delete them and remove them from the Java project's
build path via the project properties, but you probably do need them.
> I can launch the Eclipse application by ignoring these errors, but
> that is not very clean.
>
> I tried adding "src" and "xtend-src" Source Folders, but Eclipse told
> me they already exist (they don't). Then I tried adding "src-" and
> "xtend-src-" (this works) and then renaming them to the correct thing
> (which also works). Now my project doesn't have any errors.
> I select these new folders, Team->Add to Index, but nothing happens I
> guess because Git doesn't create empty folders?
No, but you could put an empty .gitignore in them and commit that.
>
>
> Bottom line, 2 issues:
> a) Eclipse Mars seems to have a bug regarding "src" and "xtend-src"
> requiring an idiotic work around to create those folders,
You're probably ignoring everything in those folder and you can't commit
a folder itself. Either something is generated into the folder, in
which case you need it and could force them to be committed by making
the folder not empty.
> b) Git won't check in empty folders, requiring anyone trying to use my
> project to go through idiotic workaround (a) 4 times.
You might want to look at automating your whole setup process with
Oomph. If you don't commit generated sources you can even invoke MWE
launchers. There are examples of others who have automated their
setups, such as Xtext itself, and XSemantics.
>
> Suggestions?
>
> Thanks!
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: eGit problems in Eclipse Mars - empty src and xtend-src [message #1739328 is a reply to message #1739326] |
Fri, 29 July 2016 17:57 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Gary,
It's always the case that new unfamiliar things seem complicated while
old familiar things seem intuitive. I also don't like investing effort
to learn tools, unless I'm convinced I'll be using them for a long time,
in which case the investment will pay off. Certainly Git is much more
powerful and hence way less simple than CVS, yet the investment to learn
it well pays off in the long term. Of course for the first weeks it
just seemed like a pointless battle that interfered with doing my real
work...
On 29.07.2016 19:19, Gary Worsham wrote:
> Thanks Ed, putting blank .gitignore into the folders seems to have
> solved this for now. Eclipse is so complicated that I'm sure I could
> devote much of my bandwidth to figuring it out better, at the expense
> of getting anything accomplished with it.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03236 seconds