Importing a language project into the Eclipse LWB is error-prone
What you did
Import a language project into the Eclipse LWB.
What you expected to happen
Building that language project to succeed.
What actually happened
Building that language project failed due to many duplicate definitions. This is caused by Eclipse copying the entire project to the bin directory after importing it, and this in turn is caused by a missing .classpath file.
Context
Spoofax version: 0.16.1
Operating system & version: Any
Additional information
It should be possible to import a language project into the Eclipse LWB without requiring a .project and .classpath file to be checked into source control. Although the .project file is OK to check-in, the .classpath file is not as it contains file references on the local filesystem.
I see a couple of ways to solve the problem:
ignore bin directories in all meta-languages.
create a builder that always runs before the Java builder that sets up the classpath.
move the Spoofax 3 classpath into some kind of variable, like the org.eclipse.jdt.launching.JRE_CONTAINER variable, such that the .classpath file can be checked into source control.
create an Eclipse project importer for Spoofax 3 language projects based on spoofaxc.cfg files such that .project and .classpath do not need to be checked into source control at all.
Summary
Importing a language project into the Eclipse LWB is error-prone
What you did
Import a language project into the Eclipse LWB.
What you expected to happen
Building that language project to succeed.
What actually happened
Building that language project failed due to many duplicate definitions. This is caused by Eclipse copying the entire project to the
bin
directory after importing it, and this in turn is caused by a missing.classpath
file.Context
Additional information
It should be possible to import a language project into the Eclipse LWB without requiring a
.project
and.classpath
file to be checked into source control. Although the.project
file is OK to check-in, the.classpath
file is not as it contains file references on the local filesystem.I see a couple of ways to solve the problem:
bin
directories in all meta-languages.org.eclipse.jdt.launching.JRE_CONTAINER
variable, such that the.classpath
file can be checked into source control.spoofaxc.cfg
files such that.project
and.classpath
do not need to be checked into source control at all.in descending order of speed/hackyness.