Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 552601

Summary: API tools error message in SWT
Product: [Eclipse Project] Platform Reporter: Sravan Kumar Lakkimsetti <sravankumarl>
Component: SWTAssignee: Vikas Chandra <Vikas.Chandra>
Status: VERIFIED FIXED QA Contact: Sravan Kumar Lakkimsetti <sravankumarl>
Severity: normal    
Priority: P3 CC: daniel_megert, ericwill, niraj.modi, Vikas.Chandra
Version: 4.14   
Target Milestone: 4.14 M3   
Hardware: PC   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=545804
https://git.eclipse.org/r/151847
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=15f1b9aa1fd77f7e62bbb292447fc0fcdc7a15dd
https://git.eclipse.org/r/151870
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=bd24052e1d701845adabcc2e0eaa36973a445323
https://bugs.eclipse.org/bugs/show_bug.cgi?id=552605
Whiteboard: 4.14 M2

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