Community
Participate
Working Groups
Build N20040510 In my full source workspace the ant.ui plug-in has compile errors. The complaint is against AntUtil: "The type org.eclipse.core.boot.IPlatformRunnable cannot be resolved. It is indirectly referenced from required .class files." As a result, the ant.ui project is not built, and this means that pde.ui does not build either. The ant.ui plug-in does not depend on org.eclipse.core.runtime.compatibility (and hasn't for about 1 week). However, the .project file still has left over static project references, which should be cleaned out: <project>org.apache.ant</project> <project>org.eclipse.ant.core</project> <project>org.eclipse.core.resources</project> <project>org.eclipse.core.runtime.compatibility</project> <project>org.eclipse.core.variables</project> <project>org.eclipse.debug.core</project> <project>org.eclipse.debug.ui</project> <project>org.eclipse.jdt.debug.ui</project> <project>org.eclipse.jdt.launching</project> <project>org.eclipse.jdt.ui</project> <project>org.eclipse.jface.text</project> <project>org.eclipse.ui</project> <project>org.eclipse.ui.console</project> <project>org.eclipse.ui.editors</project> <project>org.eclipse.ui.externaltools</project> <project>org.eclipse.ui.ide</project> <project>org.eclipse.ui.views</project> <project>org.eclipse.ui.workbench.texteditor</project> I removed these ion my ws, but the problem remains.
*** Bug 61604 has been marked as a duplicate of this bug. ***
Can someone please help me out in the correct means of cleaning up our .project files? The support I have tried does not do what I would have expected. Thanks.
To remove them manualy, switch to resource view, open .project file, and delete the <project>...</project> lines.
I have made a pass of all our .project files and removed our static project refs. Changes to: org.eclipse.ant.core org.eclipse.ant.tests.core org.eclipse.ant.tests.ui org.eclipse.ant.ui org.eclipse.core.variables org.eclipse.debug.core org.eclipse.debug.ui org.eclipse.jdt.debug org.eclipse.jdt.debug.jdi.tests org.eclipse.jdt.debug.tests org.eclipse.jdt.debug.ui org.eclipse.jdt.launching org.eclipse.jdt.launching.j9 org.eclipse.ui.console org.eclipse.ui.externaltools
Please verify DarinW.
The "real" problem here may be related to bug 60910. The ant.ui plugin has an empty plug-in dependency collection. This causes the compilation failures. Once the .project references are cleaned up, we should move this to PDE.
I'm pretty sure it's not related to problems with the PDE classpath container. Deleting the extra <project> elements does not fix the problem.
Moving to PDE to investigate the errors.
1. the build order appears to be fine (the extra .project references are noise - they should be cleaned up, but they don't make for bad classpaths). 2. The problem is related to the fact that ant.ui doesn't require the compatability layer, but it depends on ant.core (which does). Therefore there is an indirect reference to the compatability layer that is not ending up in the classpath. I can recreate this problem with a trivial plugin (attachment follows - myplugin.zip)
Created attachment 10464 [details] project containing plugin that exhibits this problem
Not sure it's a PDE issue. ant.ui does not have a dependency on core.runtime.compatibility, so PDE does not put org.eclipse.internal.core.boot.IPlatformRunnable on its classpath. All good from a PDE classpath point of view. The JDT/Compiler complains that this particular class is indirectly referenced by AntUI. Since the classpath computed by PDE is correct, this means one of three things: 1. A false error flagged by the compiler. 2. Ant/UI dependencies need to be reexamined. That is, it is possible that it is enough to just drop core.runtime.compatibility and pick up core.runtime. Some classes that used to be visible to ant.ui are no longer visible through core.runtime. 3. The "Provide-Package" of core.runtime might want to "provide" more packages, if they want clients of core.runtime.compatibility to transition to core.runtime smoothly.
Most likely it's explanation 2. Darins, please look at your plugin's dependencies and make sure ant.ui's code is not referencing any code it has not explicitly depend on. ant.core could reexport core.runtime.compatibility, but this would not be recommended as it would be abusing the "reexported dependency" notion. Drop the dependency of ant.core on runtime.compatibility and see what happens.
AntUtil is flagged as having a fatal problem. If you comment out the method bodies of all AntUtil methods and rebuild, the problem shifts to AntLaunchDelegate. If you comment out the method bodies of all AntLaunchDelegate methods, the ant.ui project compiles without errors. The problem is with methods that reference AntRunner. Potentially relevant: org.eclipse.ant.core.AntRunner is declared in 2 places: (1) org.eclipse.ant.core/src (2) org.eclipse.core.resource/lib/antsupport.jar ant.ui requires both org.eclipse.ant.core and org.eclipse.core.resource
Note that the jdt/compiler resolves all types referenced by an ant/ui class and all those types referenced by ant.core. So when compiling AntUtil, it tries to resolve AntCorePreferences. it then goes to AntCorePreferences finds IPlatformRunnable. It tries to resolve it, but it fails because it's not on ant.ui's classpath.
Ok: more info. ant.core needs to keep the dependency on the compatability layer - we are not going to rewrite it entirely. However, we should change AntRunner (the API class) to eliminate the compatability reference in its API. This issue was exposed by the change to address bug 61097. The consequence is that the development time dependencies do not match the runtime dependencies (they are a subset). This helps plug-in writers not get distracted with implementation details, but requires implementation details to appear in the plugin.xml (if there is an implementation extension in the API class - creating an API class that subclasses an implementation class for example).
Changing AntRunner to implement o.e.core.runtime.IPlatformRunnable (instead of o.e.core.boot.IPlatformRunnable) does indeed fix the problem in my full source ws.
I have released the changes to AntRunner.
Thanks for all the help. Please verify DarinW.
Verified.