Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PDE/API Tools"

< PDE
(Usecases)
 
(103 intermediate revisions by 10 users not shown)
Line 1: Line 1:
API tooling is a collection of utilities that can be used in API maintenance and consistency checks. We hope to explore four directions here:
+
{{API_Tools}}
<ul>
+
<li>'''[http://wiki.eclipse.org/PDE_UI_Incubator_ApiTools#API_Comparison_tool API Comparison tool]'''
+
<ul>
+
<li>API comparison – discover new APIs, modified APIs, flag APIs that are modified in a non-backward compatible way</li>
+
<li>Bundle version checking – use API comparison results to see if version number of a bundle has been properly incremented</li>
+
</ul>
+
</li>
+
<li>'''[http://wiki.eclipse.org/PDE_UI_Incubator_ApiTools#Reference_Extractor_tool Reference Extractor tool]'''<ul>
+
<li>Usage discovery – allow developers to discover who is using their APIs and non-APIs</li>
+
<li>Usage validation – check if usage of APIs from other bundles fits into Eclipse standards</li>
+
</ul></li>
+
</ul>
+
  
Also note that there is an ongoing work on [http://wiki.eclipse.org/index.php/PDE_UI_Incubator_Vis API visualization].
+
== Introduction ==
  
== Present state ==
+
API tooling will assist developers in API maintenance by reporting API defects such as binary incompatibilities, incorrect plug-in version numbers, missing or incorrect <code>@since</code> tags, and usage of non-API code between plug-ins. The tooling will be integrated in the Eclipse SDK and will be used in the automated build process. Specifically, the tooling is designed to do the following:
  
At present we have functional '''API comparison''' tool that received moderate amount of testing.
+
* Identify binary compatibility issues between two versions of a software component or product.
 +
* Update version numbers for plug-ins (bundles) based on the Eclipse versioning scheme.
 +
* Update <code>@since</code> tags for newly added classes, interfaces, methods, etc.
 +
* Provide new Javadoc tags and code assist to annotate types with special restrictions.
 +
* Leverage existing information (in <code>MANIFEST.MF</code>) to define the visibility of packages between bundles.
 +
* Identify usage of non-API code between plug-ins.
 +
* Identity leakage of non-API types into API.
 +
* Identify usage of code from a JRE outside the bounds of the one specified in the bundle configuration (<code>MANIFEST.MF</code>).
  
The '''Reference extractor''' has reference extraction working but only skeleton code exists for processing of queries.
+
== Present state  ==
  
== Plans ==
+
API tooling was released to the Eclipse SDK in the PDE project during the [http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_4.html Eclipse 3.4] release. Our milestone development time line corresponds to that of the Eclipse SDK (currently in the 3.6 stream).
  
'''JDT models as a source''': in addition to the processing of .class files, add code to create API snapshots from JDT models. The Javadoc tags then could be used to pass "soft" API restrictions to the tool such as "this interface can not be implemented by clients".
+
== Planning ==
  
'''Scalable repository''': in addition to files on file system, support storage of API snapshot in an SQL database. Pros: improved scalability and reliability; new functionality could be added an a form of queries, possibly, via Web interface.
+
All planned items (and wishes) can be found on our [[PDE/Plan/3.6#API Tools|3.6 plan]] page.
  
== API Comparison tool ==
+
== Links ==
  
'''API Comparison tool''': discovers backward compatibility problems and new APIs
+
[[PDE/API Tools/Tasks|Ant Tasks]] - Description of the Ant Tasks available in API Tools
  
The tool can be used to create API snapshot of a set of bundles / jars / directories. The snapshot is used as a baseline to compare against another version of the source code to discover problems in API backward compatibility and new APIs.
+
[[PDE/API_Tools/Restrictions|API Restrictions]] - Description of the restrictions supported on API types via Javadoc tags or annotations.
 
+
The tool is written in modular fashion. It has an “engine” with replaceable input and output. Presently OSGi bundles, Java jars, and directories can be used as an input sources. The snapshot output is saved into zip-ed xml file. Comparison results are produced as  XML file which is transformed into HTML for ease of reading.
+
 
+
[http://wiki.eclipse.org/index.php/PDE_UI_Incubator_ApiTools_Compare User guide to the API comparison tool]
+
 
+
[http://wiki.eclipse.org/index.php/PDE_UI_Incubator_ApiTools_Compare_Dev Developer guide to the API comparison tool]
+
 
+
== Reference Extractor tool ==
+
 
+
The '''Reference Extractor''' tool is there to answer the following three questions:
+
<ul>
+
<li>Who is using my APIs/non-APIs</li>
+
<li>What my code is using</li>
+
<li>Identify "internal" methods being used</li>
+
</ul>
+
 
+
It does it by processing code to extract dependency information from it. The request are combined in the repository that could be queried to find downstream dependencies.
+
 
+
[http://wiki.eclipse.org/index.php/PDE_UI_Incubator_ApiTools_ReferenceExtractor_Dev Developer guide to the Reference Extractor tool]
+
 
+
== Usecases ==
+
 
+
These are the usecases that we would like to cover with the API tooling:<br>
+
<ul>
+
<li>API Management: comparison, browing, visualizing<li>
+
<li>Global Find references: This could be used to find all usages of an API from data stored in a "repository". The repository could be a database, a file in memory,...</li>
+
<li>It could also be used to find all usages of internal codes inside bundles. This is a useful information for committers when they want modify an internal method.<br> They could know who they are going to break and have a proactive way to solve this issue (add another method, inform users about a future breakage,...)</li>
+
<li>Version checking: It will help users to update theirs bundle version numbers according to the kind of changes made in a bundle: fix, new API,...</li>
+
<li>Build analysis: JRE used to build vs JRE used to run, check dependencies</li>
+
</ul>
+
 
+
== Open issues ==
+
<ul>
+
<li>How to markup the code with information for the API tool. Information like "can you subclass, instantiate, implement,...".</li>
+
<li>SPI are technically speaking API, but with the freedom of being changed at any time.</li>
+
<li>The tool must be able to:
+
  <ul>
+
  <li>run headless without any workspace, embedded in releng builds.</li>
+
  <li>notify developers asap of issues</li>
+
  <li>must scale</li>
+
  <li>input could be: bundles, jars, Eclipse installation, directory of .class files or jars</li>
+
  <li>should be able to specify what an API is in a input file</li>
+
  <li>batch and incremental processing</li>
+
  </ul>
+
</ul>
+
 
+
== Links ==
+
  
[http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs Evolving Java-based APIs] - What is considered an API in Eclipse.
+
[[ApiTools Architecture|API Tooling Architecture]] - High level description of the tooling's architecture.
  
== Resources ==
+
[[Evolving Java-based APIs]] - What is considered an API in Eclipse.
  
[https://bugs.eclipse.org/bugs/ Eclipse Bugzilla] - Eclipse bug tracking database.
+
[[Version Numbering]] - Guidelines on versioning plug-ins
  
[http://wiki.eclipse.org/index.php/PDE_UI_Incubator PDE Incubator] - New projects that might be incorporated into PDE in future.
+
[[PDE/Incubator]- New projects that might be incorporated into PDE in future.
  
 
[http://www.eclipse.org/pde/pde-ui/ PDE UI Home Page] - The main PDE UI web site.
 
[http://www.eclipse.org/pde/pde-ui/ PDE UI Home Page] - The main PDE UI web site.
  
[[Category:API|API Tooling]]
+
[[Category:API|API Tools]]
[[Category:Equinox|API Tooling]]
+
[[Category:Equinox|API Tools]]
 +
[[Category:PDE|API Tools]]
 +
[[Category:Eclipse_Project|API Tools]]

Latest revision as of 15:11, 5 June 2014

API Tools
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

Introduction

API tooling will assist developers in API maintenance by reporting API defects such as binary incompatibilities, incorrect plug-in version numbers, missing or incorrect @since tags, and usage of non-API code between plug-ins. The tooling will be integrated in the Eclipse SDK and will be used in the automated build process. Specifically, the tooling is designed to do the following:

  • Identify binary compatibility issues between two versions of a software component or product.
  • Update version numbers for plug-ins (bundles) based on the Eclipse versioning scheme.
  • Update @since tags for newly added classes, interfaces, methods, etc.
  • Provide new Javadoc tags and code assist to annotate types with special restrictions.
  • Leverage existing information (in MANIFEST.MF) to define the visibility of packages between bundles.
  • Identify usage of non-API code between plug-ins.
  • Identity leakage of non-API types into API.
  • Identify usage of code from a JRE outside the bounds of the one specified in the bundle configuration (MANIFEST.MF).

Present state

API tooling was released to the Eclipse SDK in the PDE project during the Eclipse 3.4 release. Our milestone development time line corresponds to that of the Eclipse SDK (currently in the 3.6 stream).

Planning

All planned items (and wishes) can be found on our 3.6 plan page.

Links

Ant Tasks - Description of the Ant Tasks available in API Tools

API Restrictions - Description of the restrictions supported on API types via Javadoc tags or annotations.

API Tooling Architecture - High level description of the tooling's architecture.

Evolving Java-based APIs - What is considered an API in Eclipse.

Version Numbering - Guidelines on versioning plug-ins

PDE/Incubator - New projects that might be incorporated into PDE in future.

PDE UI Home Page - The main PDE UI web site.

Back to the top