Eclipse does IMHO a *massively* stupid thing. It _automagically_ picks
up my _darcs dir in my project workspace and tries to compile all the
.c files in it. So the moment I add darcs support to my new project I
get loads of duplicate symbols. I've seen some bonehead IDE's but thats
way up there in the list.
So you think there is a way to decide in general which files that may
arrive in a project are of interest for the user and which are not? And
it is so obvious that every IDE that doesn't manage to do so must be
stupid ... Very interesting. On the other hand, it doesn't exactly help
that Darcs stores a copy of the entire project in a subfolder of the
project folder, right? (Not that it is a bad thing in itself, but it
makes the job of the IDE a bit more difficult than, say CVS/Entries etc.
inside a project folder.)
One possible solution for that problem is to make the project folder a
subfolder of the repo, instead of having the project files under the
repo root. You would call 'darcs init' in the parent folder of the
project, not in the project folder. That is, instead of
myProjectName/
myProjectName/_darcs/
myProjectName/.project
myProjectName/myProjectFile1.c
...
you would then have a structure like
repo/myProjectName/.project
repo/myProjectName/myProjectFile1.c
repo/_darcs
...
This is also helpful when you need several different, but
interdependent, Eclipse projects inside one repo (which is frequent in
the projects I work on).
I can't see any options yet to make eclipse ignore the _darcs dir or not
auto pickup stuff.
Window > Preferences > General > Workspace > uncheck 'Build automatically'.
Most people that I know value the feature that you have automatically a
built workspace, so you don't have to hit that stupid 'Build' button all
the time, and you never debug an executable that is out of sync with the
sources. But I admit it gets a bit nasty for large c projects if the IDE
is not able to build incrementally and building starts to take more than
a few seconds. With Java projects in JDT (Eclipse's Java IDE) you barely
notice the build at all, even for big projects.
Eclipse is not an IDE, but a platform on top of which different IDEs
work. The IDEs are responsible for providing an option to exclude
specific files or folders from their activities. So it really depends on
what you are using on top of Eclipse if you want a more sophisticated
solution. The IDE that you use may have an option to exclude specific
resources from the build.
The same applies to analyzing the source code. Most Eclipse IDEs that I
know allow you to declare one or more folders of the project as source
folder. Everything in there is regarded as source and analyzed, the rest
is not. But again, that depends on the IDE.
Last but not least, you can make Eclipse Darcs-aware by installing a
plugin that knows about Darcs and its metadata
(http://eclipsedarcs.org). The plugin is still in a beta stage, which
means there is a number of Darcs features that cannot be used from it,
so you have to change to the command line. Also, there are still lots of
bugs in it. So you'll have to try and see if it is of any use for you.
Hope that helps,
Ciao,
Leif
_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users