Bug 6984 - DCR - more fault-tolerance in presence of inconsistent binaries
Summary: DCR - more fault-tolerance in presence of inconsistent binaries
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 7119
  Show dependency tree
 
Reported: 2001-12-17 05:53 EST by Philipe Mulet CLA
Modified: 2002-01-11 08:56 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2001-12-17 05:53:03 EST
Build 20011211

From a conversation on Eclipse Corner:

Your argument for compiling with another IDE is well-taken, and our behavior 
probably indicates that in case we meet some unresolved types inside binaries, 
we should be better fault-tolerant (you still need an error, but could only be 
a warning if it affects a member).
Will log a PR to remember to revisit this (likely after 2.0).

"Jakob Braeuchi" <jbraeuchi@hotmail.com> wrote in message news:9vg833$931
$1@rogue.oti.com...
> hi philippe,
> 
> > The difference is that if the error occurs inside sources, then it is
> likely
> > you mistyped something, and we should proceed.
> > When it occurs inside binaries, there is nothing you can do to solve this
> > other than fix up your classpath (it isn't a typo).
> 
> this sounds reasonable to me.
> i'm now also the proud owner of those ... antlr.debug classes and everything
> runs fine in eclipse !
> 
> but i think if the project compiles fine (and runs fine, too) in other ides
> it also should do it in eclipse.
> we had such problems with compatibility before in vaj and they should not be
> repeated in eclipse.
> 
> i would like to have a feature for 'brute force' compilation.
> 
> thanks for your patience
> jakob
> 
> 
> "Philippe Mulet" <philippe_mulet@oti.com> schrieb im Newsbeitrag
> news:9vcll1$9i4$1@rogue.oti.com...
> > The difference is that if the error occurs inside sources, then it is
> likely
> > you mistyped something, and we should proceed.
> > When it occurs inside binaries, there is nothing you can do to solve this
> > other than fix up your classpath (it isn't a typo).
> >
> > "Jakob Braeuchi" <jbraeuchi@hotmail.com> wrote in message
> > news:9vca37$5gc$1@rogue.oti.com...
> > > what's the difference between let's say a mistyped class and a class not
> > > found in the class path ?
> > >
> > > - in case i misspell a class the compiler still tries to compile all
> > classes
> > > in the project.
> > > - in case of a class not found in the classpath the compiler comes to a
> > > complete stop ???
> > >
> > > "Kent Johnson" <kent_johnson@oti.com> schrieb im Newsbeitrag
> > > news:9vasrs$p33$1@rogue.oti.com...
> > > > Jakob Braeuchi wrote:
> > > >
> > > > > but why does the compiler completely stop ?
> > > >
> > > > When your classpath is incorrect, you can end up with hundreds of
> > compiler
> > > > problems which do not help you at all... so we stop once it is clear
> > that
> > > > you need to fix your classpath.
> > > >
> > >
> > >
> >
> >
> 
>
Comment 1 Philipe Mulet CLA 2001-12-18 04:57:15 EST
How much would it cost to discard unresolved signatures alltogether (like we do 
in sources) ? Competitors seem to recover better than us.
Comment 2 Kent Johnson CLA 2002-01-07 13:43:09 EST
javac behaves the same as we do...

1. Compile B.java using javac after creating the following 3 types in their own 
source files:

public class A { MissingType t; }

public class MissingType {}

public class B extends A {
	public static void main(String[] args) {
		System.out.println(new A());
	}
}

2. Now delete MissingType.java & MissingType.class

3. Change B.java to be:

public class B extends A {
	public static void main(String[] args) {
		System.out.println(new A().t);
	}
}

then compile it again & javac complains with:

B.java:6: cannot access bogus.MissingType
file bogus\MissingType.class not found
                System.out.println(new A().t);
Comment 3 Philipe Mulet CLA 2002-01-09 04:53:39 EST
Does javac reject the code if no source code is accessing the bogus field 't' ?

Currently, BinaryTypeBinding.fields() and methods() are not usable in case 
hitting an inconsistent binary type (burning code assist).
Comment 4 Kent Johnson CLA 2002-01-09 15:35:17 EST
Both javac & our compiler will successfully compile B as long as it does not 
reference the field t.

Only when the fields/methods of the binary type A are requested is the missing 
class detected.
Comment 5 Philipe Mulet CLA 2002-01-10 11:42:35 EST
Ok, we will keep it the same as it is. The difference could be due to some 
different checks performed by our compiler (for instance, we do diagnose extra 
warnings in case a package default method is attempted to be overriden, etc... 
these could cause more binary types to be accessed.