Bug 189907 - Change in Access Forbidden behavior in RC1 and/or RC2?
Summary: Change in Access Forbidden behavior in RC1 and/or RC2?
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 08:49 EDT by David Williams CLA
Modified: 2007-05-31 04:36 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2007-05-30 08:49:47 EDT
We in WTP recently moved to the RC2 base to compile against, and we also recently moved to the RC1 version of the base builder (which I assume has the RC1 version of JDT Core's Compiler). 

While we are still investigating ... maybe we did something to cause this ... it seemed important enough to open a bug in parallel. 

It seems like there were some changes in behavior. If intentional, then ... fine, I guess, though we may need advice on how to migrate. If not intentional (and, not out fault in changing something :) then seems perhaps a real bug? 

One build to look at is 
http://download.eclipse.org/webtools/committers/drops/R2.0/S-2.0RC2-200705300939/ 

There are 43 access forbidden errors on that page. 40 of those are _not_ new, and an odd artifact of some quirks in one plugin's dual purpose structure, so ignore those 40. 

The other (new) 3 access forbidden errors seem to be about references in JavaDoc. 
Was this an intentional change? 

The other 53 are in some test plugins, See 
http://download.eclipse.org/webtools/committers/drops/R2.0/S-2.0RC2-200705300939/testCompileResults.php 

These appear to be cases where the compiler is telling us some packages from JDT Core are no longer being exported. Would this have changed? On purpose? 

Again, we are still investigating if there could have been some change on our end causing this, but given all the time-zone differences, thought it best to open this as soon as possible. 

Thanks for any comments.
Comment 1 Philipe Mulet CLA 2007-05-30 08:59:56 EDT
David - are you saying that in the past an access violation from within javadoc was only reporting a warning, and now an error ?

Comment 2 Philipe Mulet CLA 2007-05-30 09:04:40 EDT
Maybe PDE made some changes when producing access rules (more rules than in the past) in this time frame ? cc'ing Wassim.
Comment 3 David Williams CLA 2007-05-30 09:11:51 EDT
(In reply to comment #1)
> David - are you saying that in the past an access violation from within javadoc
> was only reporting a warning, and now an error ?
> 

To my knowledge, it did neither, neither discouraged access warnings nor access forbidden warnings. 

Comment 4 Philipe Mulet CLA 2007-05-30 09:43:41 EDT
hum... then this would probably indicate more access rules having been defined (by PDE).
Comment 5 Frederic Fusier CLA 2007-05-30 10:43:23 EDT
JDT/Core didn't change its MANIFEST.MF between 3.3 RC1 and 3.3 RC2...

Furthermore:
1) IType is in a public package which does not have any restriction. 
2) Only one of the 3 additional warnings concerned JDT/Core (in jem), the two
other ones (in jst.j2ee.ejb and jst.j2ee.jca) are on Viewer class of
org.eclipse.jface.viewers package which also does not have any restriction...

So, it seems that wrong access restriction are set during the build and I would
say that JDT/Core is not involved in this problem. Wassim what do you think?
Comment 6 Wassim Melhem CLA 2007-05-30 10:54:00 EDT
The access rules generated during a releng build are coming from pde/build not pde/ui.

cc Andrew as he would know what happened.
Comment 7 Andrew Niefer CLA 2007-05-30 11:36:24 EDT
PDE/Build has not changed its generation of Access rules.

Considering org.eclipse.jem:
This bundle does not require org.eclipse.jdt.core in its manifest. (And I doubt that any of the bundles that it does require re-export jdt.core packages).  Therefore pde.build will generate a Forbidden access rule for packages from jdt.core.

I would guess that something has changed in the compiler about whether or not warnings are generated for references in javadoc.  Has the default changed for whether these are reported? PDE.Build supports specifying warning options, but does not set any by default. (Note this is disconnected from the UI so the project preferences have no affect).
Comment 8 Frederic Fusier CLA 2007-05-30 12:30:57 EDT
Thanks Andrew for the information. In fact, I mixed the versions: as the compiler was updated to RC1, the offending change must have been done between M7 and RC1...

With this new starting point, we now suspect that this issue might be a consequence of bug 188656 (doc comment support is always activated for batch compiler).

David, is the doc comment support explicitly set (ENABLED or DISABLED) while building WTP or does it rely on the default compiler option?

If the default option is used, then our assumption should be correct and everything will be back to normal when you switch to 3.3 RC2 version of the base builder...

If not then we need to investigate further.
Comment 9 David Williams CLA 2007-05-30 17:21:15 EDT
Yes, I'm pretty sure we just use the default option (and all the other funny ones were due to changes we made) so only the 3 "javadoc" ones will appear for a while. 
Comment 10 David Williams CLA 2007-05-31 03:34:18 EDT
I have confirmed moving up to the RC2 version of the base builder (and compiler) has changed the behavior back to what it was, no more JavaDoc access warnings. 

Thanks everyone for taking a quick look while I was panicking :) 
Comment 11 Frederic Fusier CLA 2007-05-31 04:36:45 EDT
Thanks David for the feedback :-)

Verified for 3.3 RC2 by user...