Bug 552601 - API tools error message in SWT
Summary: API tools error message in SWT
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.14   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Vikas Chandra CLA
QA Contact: Sravan Kumar Lakkimsetti CLA
URL:
Whiteboard: 4.14 M2
Keywords:
: 552604 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-31 11:17 EDT by Sravan Kumar Lakkimsetti CLA
Modified: 2019-11-04 01:00 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sravan Kumar Lakkimsetti CLA 2019-10-31 11:17:12 EDT
We added a new public constant to a public class as part of bug 545804. Specifically SWT.IMAGE_SVG constant has been made available.

But the api tools report is suggesting there is no api change

https://download.eclipse.org/eclipse/downloads/drops4/I20191030-1800/apitools/analysis/html/org.eclipse.swt/report.html

Please suggest a way to fix this
Comment 2 Eclipse Genie CLA 2019-10-31 12:04:59 EDT
New Gerrit change created: https://git.eclipse.org/r/151847
Comment 3 Sravan Kumar Lakkimsetti CLA 2019-10-31 12:19:16 EDT
In this case we have added new API field to an API class

according to https://wiki.eclipse.org/Evolving_Java-based_APIs_2#Evolving_API_Classes

it is binary compatible. but API tools is reporting to increment Major version.


Here is the log 

Description	Resource	Path	Location	Type
The field org.eclipse.swt.SWT.IMAGE_SVG has been added to a class	SWT.java	/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt	line 4247	Compatibility Problem
The major version should be incremented in version 3.113.0, since API breakage occurred since version 3.112.0	MANIFEST.MF	/org.eclipse.swt/META-INF	line 5	Version Numbering Problem
Comment 5 Niraj Modi CLA 2019-10-31 13:31:01 EDT
*** Bug 552604 has been marked as a duplicate of this bug. ***
Comment 6 Vikas Chandra CLA 2019-10-31 13:38:19 EDT
Opened Bug 552605 for future M3 work.
Comment 7 Eric Williams CLA 2019-10-31 13:43:56 EDT
(In reply to Vikas Chandra from comment #1)
> See https://www.eclipse.org/eclipse/news/4.7/M5/#PDE
> and https://bugs.eclipse.org/bugs/show_bug.cgi?id=496145
> 
> Adding a field to a class is a breaking change.
> 
> https://git.eclipse.org/c/platform/eclipse.platform.swt.git/diff/bundles/org.
> eclipse.swt/Eclipse%20SWT/common/org/eclipse/swt/SWT.
> java?id=049ef11cbbb59d85197809bada18506a5b1ae0fe
> 
> 
> And then a filter is added to suppress this 
> 
> https://git.eclipse.org/c/platform/eclipse.platform.swt.git/diff/bundles/org.
> eclipse.swt/.settings/.
> api_filters?id=049ef11cbbb59d85197809bada18506a5b1ae0fe
> 
> 
> And then minor version is increased
> https://git.eclipse.org/c/platform/eclipse.platform.swt.git/diff/bundles/org.
> eclipse.swt/META-INF/MANIFEST.MF?id=049ef11cbbb59d85197809bada18506a5b1ae0fe
> 
> So API tool complains about "The minor version should be the same for
> version 3.113.0, since no new APIs have been added since version 3.112.0"
> 
> I will recommend adding a filter for this.

Did I miss a step when adding this API? If so please do elaborate, as I want to document it for future API changes.
Comment 8 Vikas Chandra CLA 2019-10-31 13:49:37 EDT
Bug 552605  will ensure that all the versioning issues are errors and not warning.
An extra warning added can be overlooked. 

Also it is a good practice to check if a particular gerrit increases the number of warning in the plugin.
Comment 10 Vikas Chandra CLA 2019-11-01 02:40:43 EDT
I am investigating this !
Comment 11 Eclipse Genie CLA 2019-11-01 02:53:52 EDT
New Gerrit change created: https://git.eclipse.org/r/151870