Bug 42629 - javac error message with missing classpath entry when claims entry dropped from path
Summary: javac error message with missing classpath entry when claims entry dropped fr...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-05 13:48 EDT by Darin Swanson CLA
Modified: 2003-10-14 07:59 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2003-09-05 13:48:40 EDT
I20030903

The jdtCompilerAdapter seems to not be correctly dropping invalid classpath 
entries anymore.
For example, using the org.eclipse.ant.core/buildfiles/buildExtraJAR.xml 
compiles fine on I200308281813.
With the -debug attribute set for the build both builds claim:
  [javac] Using JDT compiler
dropping C:\0702\org.eclipse.core.runtime\bin from path as it doesn't exist
but on I20030903 you get:
 [javac] incorrect classpath: C:\0702\org.eclipse.core.runtime\bin
Comment 1 Olivier Thomann CLA 2003-09-05 13:53:30 EDT
I don't think we changed anything. I will double check.
How can I easily reproduce the problem?
Comment 2 Darin Swanson CLA 2003-09-05 13:58:24 EDT
Run org.eclipse.ant.core/buildfiles/buildExtraJAR.xml with 
org.eclipse.core.runtime as a binary plugin (and specify -debug for the full 
output).
Comment 3 Olivier Thomann CLA 2003-09-05 14:48:58 EDT
When I try this in self-hosting workspace, it cannot find the jar file 
containing the ant adapter.
Comment 4 Olivier Thomann CLA 2003-09-05 14:55:53 EDT
Using 200308281813, I also get these errors:

[javac] incorrect classpath: D:\workspaces\test42097
\org.eclipse.core.runtime\bin

This should not stop the build. It is simply a message logged to the system 
err. It doesn't stop the compilation. The build failed because some classes are 
not found using the remaining classpath. So I don't see anything wrong.
Comment 5 Darin Swanson CLA 2003-09-05 15:16:06 EDT
You are correct...the compile does succeed.

I cannot get the error message on I20030828.

As well this output differs from the "standard" javac and seems strange when 
you also get output that claims that entry is dropped from the path?
Comment 6 Olivier Thomann CLA 2003-09-05 15:19:47 EDT
I don't know how you got this in the log:
  [javac] Using JDT compiler
dropping C:\0702\org.eclipse.core.runtime\bin from path as it doesn't exist
but on I20030903 you get:

I could not get it.
Comment 7 Darin Swanson CLA 2003-09-05 15:34:00 EDT
specify -debug as an argument for the Ant build.
Comment 8 Olivier Thomann CLA 2003-09-05 15:46:38 EDT
Ok, I didn't see it.
I think this message is an ant message. I will investigate. The other message 
incorrect classpath: D:\workspaces\test42097\org.eclipse.core.runtime\bin is 
from the Eclipse compiler. For me, this is fine.
If we drop it, then the batch compiler (outside of ant) won't warn the user 
anymore and I believe this is a good warning, because:
1) if the compilation fails, you know what entry in the classpath you should fix
2) allow to remove useless entries from the classpath if the compilation 
succeeds.
Comment 9 Olivier Thomann CLA 2003-09-05 16:02:44 EDT
The message "dropping...." comes from ant. See     public void addExisting(Path 
source) in the org.apache.tools.ant.types.Path class (line 272).
So I would close it as WONTFIX.
Ok to close?
Comment 10 Darin Swanson CLA 2003-09-05 16:38:26 EDT
Fine by me.
FYI Olivier we have this entry to handle both cases of if you have runtime as 
source or if you have runtime as binary.
Comment 11 Darin Swanson CLA 2003-09-05 16:39:34 EDT
You are logging it as a warning and not an error...another case for bug 37265.
Comment 12 Olivier Thomann CLA 2003-09-05 16:47:45 EDT
We log it to the System.err. Now it depends what is passed as the System.err to 
the compiler.
Comment 13 Darin Swanson CLA 2003-09-05 16:53:04 EDT
I might see this as a problem. I think it really should only be a warning. 
Comment 14 Olivier Thomann CLA 2003-09-05 16:56:48 EDT
So you mean that we should log it to System.out?
No problem for me as long as we log it. The idea to log it to System.err is 
that you can get the message inside the log file if you have one and this could 
be helpful to get the message afterwards.
Comment 15 Darin Swanson CLA 2003-09-05 17:01:23 EDT
System.out would map to an info entry for Ant and that would be more consistent 
with the "standard" javac output (you would only see it with -verbose or -debug)
Comment 16 Olivier Thomann CLA 2003-09-05 17:27:45 EDT
Ok, I changed it to System.out instead of System.err.
Philippe, please reopen if you disagree.
Comment 17 David Audel CLA 2003-10-14 07:59:54 EDT
Verified.