Say we have a directory structure with 2 Eclipse projects as follows:

/grading-releng/.project
/grading-releng/spt/org.strategoxt.imp.testing/.project

where the second project is a Spoofax language that we’d like to build.

All resources in the /grading-releng/spt/org.strategoxt.imp.testing/ directory actually belong to project /grading-releng according to Eclipse, because the project of a resource is defined as: “A resource’s project is the one named by the first segment of its full path.”. This breaks many things in Spoofax because an unexpected project is returned by Eclipse. For example, sdf2imp fails with

sdf2imp.eclipse:
    [java] Build failed; see error log.

because of

java.io.IOException: /include and /editor directories must exist
  at org.strategoxt.imp.metatooling.building.DynamicDescriptorBuilder.setDerivedResources(DynamicDescriptorBuilder.java:255)
  at org.strategoxt.imp.metatooling.building.DynamicDescriptorBuilder.prepareOutputFiles(DynamicDescriptorBuilder.java:216)
  at org.strategoxt.imp.metatooling.building.DynamicDescriptorBuilder.buildDescriptor(DynamicDescriptorBuilder.java:113)
  at org.strategoxt.imp.metatooling.building.DynamicDescriptorBuilder.updateResource(DynamicDescriptorBuilder.java:88)
  at org.strategoxt.imp.metatooling.building.AntDescriptorBuilder.main(AntDescriptorBuilder.java:41)

because it tries to find the include and editor directories in grading-releng, which do not exist.

The obvious workaround is to delete the grading-releng project, but a real fix would be nice!

Submitted by Gabriël Konat on 2 October 2014 at 17:13

Log in to post comments