Bug 548249 - Investigate API errror on https://git.eclipse.org/r/c/143156/
Summary: Investigate API errror on https://git.eclipse.org/r/c/143156/
Status: CLOSED DUPLICATE of bug 548279
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.12   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 4.13 M1   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-13 12:10 EDT by Lars Vogel CLA
Modified: 2019-06-26 12:01 EDT (History)
6 users (show)

See Also:


Attachments
See image (277.11 KB, image/jpeg)
2019-06-14 01:33 EDT, Vikas Chandra CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2019-06-13 12:10:24 EDT
https://git.eclipse.org/r/c/143156/ caused a API tools error and API tools may have a bug.

AFAICS the change in MultiList.java is API compliant because:

* Only internal code was changed and 
* Two redundant method overrides were removed

The API tooling claims that some API breakage happened. If Dani removes his -1 on https://git.eclipse.org/r/c/143973/ you will have to revert the API filter to see the error.
Comment 1 Lars Vogel CLA 2019-06-13 12:10:41 EDT
Vikas, please have a look.
Comment 2 Vikas Chandra CLA 2019-06-13 23:39:59 EDT
Thanks for reporting Lars !

I will look at this asap.
Comment 3 Vikas Chandra CLA 2019-06-14 01:33:22 EDT
Created attachment 278934 [details]
See image
Comment 4 Vikas Chandra CLA 2019-06-14 01:34:13 EDT
    Earlier for MultiList

	@Override
	public Object[] toArray() {
		getterCalled();
		return toArray(new Object[doGetSize()]);
	}

	@Override
	public <T> T[] toArray(T[] a) {
		getterCalled();
		return super.toArray(a);
	}


   Now for MultiList (from superclass)

@Override
	public Object[] toArray() {
		getterCalled();
		return super.toArray();
	}

	@Override
	public <T> T[] toArray(T a[]) {
		getterCalled();
		return super.toArray(a);
	}
Comment 5 Vikas Chandra CLA 2019-06-14 01:36:06 EDT
From API tools perspective since the method has moved up in hierarchy, it is flagging this as new API.

If the developer thinks this is equivalent, they can probably add a filter.
Comment 6 Lars Vogel CLA 2019-06-14 02:06:33 EDT
Thanks for the analysis Vikas. As the method signature is they same, I assume this not an API change and will add a filter once Dani removes his -1 on the pending change.
Comment 7 Dani Megert CLA 2019-06-14 05:12:06 EDT
(In reply to Vikas Chandra from comment #5)
> From API tools perspective since the method has moved up in hierarchy, it is
> flagging this as new API.
> 
> If the developer thinks this is equivalent, they can probably add a filter.
The minor version should be increased because the methods are removed from MultiList. However, it's not a breaking change.

I'm marking this as "FIXED" since we did the investigation.
Comment 8 Mickael Istria CLA 2019-06-24 05:25:31 EDT
I'm still seeing API errors in my IDE and in automated API Check with this, but nothing in https://download.eclipse.org/eclipse/downloads/drops4/I20190621-1800/apitools/analysis/html/index.html . Have the API Check been disabled for this bundle? Were API Filters added?
Comment 9 Vikas Chandra CLA 2019-06-25 02:55:19 EDT
(In reply to Mickael Istria from comment #8)
> I'm still seeing API errors in my IDE and in automated API Check with this,
> but nothing in
> https://download.eclipse.org/eclipse/downloads/drops4/I20190621-1800/
> apitools/analysis/html/index.html . Have the API Check been disabled for
> this bundle? Were API Filters added?

I will investigate this.
Comment 10 Vikas Chandra CLA 2019-06-25 04:43:42 EDT
https://download.eclipse.org/eclipse/downloads/drops4/R-4.11-201903070500/apitools/analysis/html/index.html

has org.eclipse.core.databinding.observable present

but latest build doesnt have.

The bundle does have pde nature and API tooling enabled.

That bundle doesn't have pom.xml also. I am not sure if that is related or not. 

This warrants a separate bug. 


>>I'm still seeing API errors in my IDE 

Will investigate this next.
Comment 11 Vikas Chandra CLA 2019-06-25 04:47:17 EDT
I see a unused filter issue only and not a API tool problem.


The API problem filter for: 'The minor version should be the same for version 1.7.0, since no new APIs have been added since version 1.6.400' is no longer used

Mickael, what is the problem you see in your IDE?
Comment 12 Vikas Chandra CLA 2019-06-25 04:51:23 EDT
See Bug 548613  for missing API report
Comment 13 Vikas Chandra CLA 2019-06-25 04:52:09 EDT
I will mark as resolved again.

Mickael, if you see anything inconsistent, please feel free to reopen this.
Comment 14 Mickael Istria CLA 2019-06-25 05:10:59 EDT
I see

On MultiList.java (attached to class name declaration)
"""
Multiple markers at this line
	- The method org.eclipse.core.databinding.observable.list.MultiList.toArray(T[]) has been 
	 removed
	- The method org.eclipse.core.databinding.observable.list.MultiList.toArray() has been removed
"""


and, as a consequence most likely, in MANIFEST.MF
"""
The major version should be incremented in version 1.8.0, since API breakage occurred since version 1.7.0
"""

Note that I'm running on Java 11 if it makes a difference.
Comment 15 Lars Vogel CLA 2019-06-25 05:23:04 EDT
(In reply to Mickael Istria from comment #14)
> I see
> 
> On MultiList.java (attached to class name declaration)
> """
> Multiple markers at this line
> 	- The method
> org.eclipse.core.databinding.observable.list.MultiList.toArray(T[]) has been 
> 	 removed
> 	- The method
> org.eclipse.core.databinding.observable.list.MultiList.toArray() has been
> removed
> """
> 
> 
> and, as a consequence most likely, in MANIFEST.MF
> """
> The major version should be incremented in version 1.8.0, since API breakage
> occurred since version 1.7.0
> """
> 
> Note that I'm running on Java 11 if it makes a difference.

Jens, can you comment?
Comment 16 Mickael Istria CLA 2019-06-25 05:26:23 EDT
What's strange here is that I shouldn't see those errors actually. The methods were overridden ones, so they are not causing an API breakage.
What is also important, at least to me, is to sort out why I do see such errors while others don't.
Comment 17 Vikas Chandra CLA 2019-06-25 05:27:22 EDT
Reopening to investigate comment#14.

I launched eclipse with Java 11 and I don't get this issue.
Comment 18 Vikas Chandra CLA 2019-06-25 05:31:13 EDT
(In reply to Mickael Istria from comment #16)
> What's strange here is that I shouldn't see those errors actually. The
> methods were overridden ones, so they are not causing an API breakage.
> What is also important, at least to me, is to sort out why I do see such
> errors while others don't.

API considers this as methods moved up in hierarchy and hence only a minor version increase required as stated earlier in this bug.

>important, at least to me, is to sort out why I do see such  errors while >others don't.

This bug will track this now.
Comment 19 Mickael Istria CLA 2019-06-25 05:35:37 EDT
Can you please try to run `mvn clean verify -Pbuild-individual-bundles,api-check` from the org.eclipse.core.databinding.observables folder?
Comment 20 Vikas Chandra CLA 2019-06-25 05:45:59 EDT
(In reply to Vikas Chandra from comment #11)
> I see a unused filter issue only and not a API tool problem.
> 
> 
> The API problem filter for: 'The minor version should be the same for
> version 1.7.0, since no new APIs have been added since version 1.6.400' is
> no longer used
> 
> Mickael, what is the problem you see in your IDE?

Do you see this warning too. Is you see this warning, your baseline is correct.

What is the baseline you have set?
Comment 21 Mickael Istria CLA 2019-06-25 05:52:18 EDT
(In reply to Vikas Chandra from comment #20)
> Do you see this warning too. Is you see this warning, your baseline is
> correct.

Yes, I see this warning

> What is the baseline you have set?

Baseline > Eclipse installation > Path to eclipse-SDK-4.12-linux-gtk-x86_64.
Baseline content shows version of org.eclipse.core.databinding.observables is 1.7.0
Comment 22 Alexander Kurtakov CLA 2019-06-25 06:04:17 EDT
(In reply to Mickael Istria from comment #19)
> Can you please try to run `mvn clean verify
> -Pbuild-individual-bundles,api-check` from the
> org.eclipse.core.databinding.observables folder?

[/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc30.x86_64/jre/bin/java, -Xmx2048M, -jar, /home/akurtakov/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.5.400.v20190515-0925/org.eclipse.equinox.launcher-1.5.400.v20190515-0925.jar, -install, /home/akurtakov/git/eclipse.platform.ui/bundles/org.eclipse.core.databinding.observable/target/eclipserun-work, -configuration, /home/akurtakov/git/eclipse.platform.ui/bundles/org.eclipse.core.databinding.observable/target/eclipserun-work/configuration, -data, /home/akurtakov/git/eclipse.platform.ui/bundles/org.eclipse.core.databinding.observable/../target/org.eclipse.core.databinding.observable-apiAnalyzer-workspace, -application, org.eclipse.pde.api.tools.apiAnalyzer, -project, /home/akurtakov/git/eclipse.platform.ui/bundles/org.eclipse.core.databinding.observable, -baseline, default, -dependencyList, /home/akurtakov/git/eclipse.platform.ui/bundles/org.eclipse.core.databinding.observable/target/dependencies-list.txt, -failOnError]
0 API ERRORS
1 API warnings
* Marker [on: /org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF, id: 0, type: org.eclipse.pde.api.tools.unused_filters, attributes: [apiMarkerID: 9, charEnd: -1, charStart: -1, filterhandle: 926941240%]META-INF/MANIFEST.MF%]null%]1.7.0,1.6.400, lineNumber: 1, message: The API problem filter for: 'The minor version should be the same for version 1.7.0, since no new APIs have been added since version 1.6.400' is no longer used, messagearguments: The minor version should be the same for version 1.7.0, since no new APIs have been added since version 1.6.400, problemid: 664797214, severity: 1, sourceId: API Tools], created: 6/25/19 1:01 PM]
Comment 23 Dani Megert CLA 2019-06-26 12:01:04 EDT
I tried it with our latest build (eclipse-SDK-I20190626-0720-win32-x86_64.zip). No problem except for an unused filter:

The API problem filter for: 'The minor version should be the same for version 1.7.0, since no new APIs have been added since version 1.6.400' is no longer used	MANIFEST.MF	/org.eclipse.core.databinding.observable/META-INF	line 1	Unused API Problem Filter Problem


Looks like bug 548279.

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