Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 99743

Summary: [RC2] Project compiles in Eclipse but builds with errors
Product: [Eclipse Project] PDE Reporter: Bob Foster <bob>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Bob Foster CLA 2005-06-13 13:31:14 EDT
You aren't required to specify implicit dependencies in plugin.xml (or
manifest.mf). PDE figures them out and sets the expanded dependencies in your
Build Path. But when you do a Build/Build All in the update .site editor for a
site that specifies a plug-in project that builds fine in Eclipse, the same
project has build errors, apparently due to the implied dependencies.

From his comment in the newsgroup, apparently Pascal thinks that the dependency
expansion done automatically or by Compute Classpath is not a feature and that
you have to explicitly specify all dependencies. a) This isn't the way it works
and b) if it were, it would be horrible; it would be impossible to specify the
dependencies in a platform-independent way.

Another user commented: This is bug, probably.There are more example
emf,gef,ve,webtools - all build in workspace, but export for deployment
doesn't work
Comment 1 Pascal Rapicault CLA 2005-06-13 14:03:20 EDT
Could you give steps on how to reproduce?
Comment 2 Bob Foster CLA 2005-06-13 14:33:32 EDT
Apparently, you can just install GEF as a source project and try it.

But, for example, I have a project with an explicit dependency on
org.eclipse.jface.text but no explicit dependency on org.eclipse.jface. The
Build Path computed by PDE includes org.eclipse.jface.

If I try to do, e.g., an update build from this project, any references to
org.eclipse.jface packages are compile errors.
Comment 3 Bob Foster CLA 2005-06-13 14:47:37 EDT
The Build Path also contains a dependency on org.eclipse.swt.win32.win32.x86
when there is only an explicit dependency on org.eclipse.swt. I didn't start
with this example because it may be special-cased, but it is a fairly key feature.

PS I'm still trying to figure out how to do n platform-dependent builds from one
"manifest".
Comment 4 Bob Foster CLA 2005-06-13 15:26:59 EDT
Example of such an error in a project that compiles without error in Eclipse
using a PDE-generated build path:

# 13 Jun 2005 12:21:32
----------
1. ERROR in
D:\eclipse3.1RC2\eclipse\workspace\com.objfac.xmleditor.manifested\src\com\objfac\rnceditor\RNCActionContributor.java
 (at line 8)
	import org.eclipse.jface.action.IMenuManager;
	       ^^^^^^^^^^^^^^^^^
The import org.eclipse.jface cannot be resolved

(Sorry to trickle this out. It took me awhile to get a project set up to
reproduce the problem.)
Comment 5 Bob Foster CLA 2005-06-13 15:30:14 EDT
I do apologize for spamming, but this error is probably a better example as it
illustrates the issue with specifying a platform-independent manifest. The
manifest refers to org.eclipse.swt, but the build:

52. ERROR in
D:\eclipse3.1RC2\eclipse\workspace\com.objfac.xmleditor.manifested\src\com\objfac\rnceditor\RNCCompletionProposal.java
 (at line 13)
	import org.eclipse.swt.custom.StyledText;
	       ^^^^^^^^^^^^^^^
The import org.eclipse.swt cannot be resolved

I'm rather surprised that _any_ project builds.
Comment 6 Pascal Rapicault CLA 2005-06-13 16:08:22 EDT
Do you have projects loaded as linked folder in your workspace?
Comment 7 Bob Foster CLA 2005-06-13 16:25:22 EDT
No, all projects are physically in the workspace folder.
Comment 8 Pascal Rapicault CLA 2005-06-13 17:16:33 EDT
I got GEF from HEAD of the repository and exported it and everything worked fine.
Please build me a reproduceable test case from a fresh workspace.
Comment 9 Bob Foster CLA 2005-06-13 17:31:36 EDT
Can I shine your shoes while I'm up? ;-}

You could try to make your own example, you know. I described what to do pretty
clearly. The GEF thing was some other user's experience, not mine.
Comment 10 Pascal Rapicault CLA 2005-06-13 17:37:03 EDT
Today I spent my day building various projects and RCP app without problems.
If I'm asking it is because I can't reproduce...

Comment 11 Bob Foster CLA 2005-06-13 17:57:48 EDT
Fair enough.

Looking back, I may have answered one of your questions incorrectly. I said no
to linked project folders because I'm not conscious of them as linked folders.
Apparently linked project folders don't show the decoration that user-defined
linked folders in projects do. But yes I have every SDK plugin in my workspace
as a linked folder. And you're right, it's hard to reproduce this problem unless
you do.
Comment 12 Pascal Rapicault CLA 2005-06-13 20:48:06 EDT

*** This bug has been marked as a duplicate of 66177 ***