Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 280463 - Resolve API references (use scan) in alternate baseline
Summary: Resolve API references (use scan) in alternate baseline
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 288557
Blocks:
  Show dependency tree
 
Reported: 2009-06-16 11:16 EDT by Darin Wright CLA
Modified: 2010-01-20 14:35 EST (History)
2 users (show)

See Also:
darin.eclipse: review+


Attachments
patch (33.12 KB, patch)
2009-08-31 12:25 EDT, Darin Wright CLA
no flags Details | Diff
patch (136.26 KB, patch)
2009-09-02 16:51 EDT, Darin Wright CLA
no flags Details | Diff
support for regex scoping (20.57 KB, patch)
2009-09-03 12:15 EDT, Darin Wright CLA
no flags Details | Diff
reports (34.83 KB, patch)
2009-10-19 17:11 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2009-06-16 11:16:22 EDT
Scenario:

An API use scan of a product is generated showing API/internal references to a specific version (X) of the SDK on which the product runs/depends. The SDK continues development on the next release (version Y). The product wants to migrate to the new version (Y) of the SDK. It would be interesting to be able to show what API/internal references are broken (if any) on version Y of the SDK based on the use scan from version X.
Comment 1 Darin Wright CLA 2009-08-31 12:25:00 EDT
Created attachment 146082 [details]
patch

This patch:

* Adds some qualified member information to the API use scans ($ qualified type name, member name/signature).
* Provides a parser for an API use scan that takes a general purpose visitor (I made the visitor general, as I could see different kinds of uses of parsing the scans - adding to a database, etc. The parser insulates the processors from the file format).
* Provides a visitor that resolves references in an alternate baseline

Currently, error messages are just written to the console (we'll need to generate HTML).
Comment 2 Darin Wright CLA 2009-08-31 15:55:20 EDT
I applied a cleaned up version of the patch to HEAD. This way report generation will include the extra member info ($ qualified types).
Comment 3 Darin Wright CLA 2009-09-02 16:51:47 EDT
Created attachment 146326 [details]
patch

Creates a report similar to use scan that details the migration issues when resolving a use scan in an alternate baseline (migration candidate).
Comment 4 Darin Wright CLA 2009-09-02 17:13:06 EDT
Released to HEAD. Leaving open to add support for selective bundle analysis (regex scope support) and UI to create reports.
Comment 5 Darin Wright CLA 2009-09-03 12:15:24 EDT
Created attachment 146418 [details]
support for regex scoping
Comment 6 Darin Wright CLA 2009-09-03 13:01:10 EDT
Released scope support to HEAD
Comment 7 Michael Rennie CLA 2009-10-19 17:11:17 EDT
Created attachment 149921 [details]
reports

This patch provides report conversion for migration reports and adds all the task doc for both the migration task and the report conversion task. The two tasks have also been added to our template build file and the reusable Ant properties file.

The two Ant task are:

apitooling.apimigration
apitooling.apimigration_reportconversion
Comment 8 Michael Rennie CLA 2009-10-20 14:46:44 EDT
applied Ant task + reporting patch to HEAD, please verify Darin W
Comment 9 Michael Rennie CLA 2009-10-20 14:49:18 EDT
Here is a sample build file for the tasks, you will need to edit the properties as needed:

<?xml version="1.0" encoding="UTF-8"?>
<project name="api_migration_reporting" default="run" basedir=".">
<property name="r_loc" value="../api-use-share/deltas/xml" />
<property name="h_loc" value="../api-use-share/deltas/html" />
<property name="scan" value="../api-use-share/deltas/sdk3.4/xml"/>
<property name="candidate" value="/eclipse/eclipse_3.5.0"/>
<property name="m_report" value="../api-use-share/deltas/xml"/>

    <target name="run">
      <apitooling.apimigration
    		candidate="${candidate}"
    		usescan="${scan}"
    		report="${m_report}"
    		debug="true"/>
      <apitooling.apimigration_reportconversion
       	xmlfiles="${r_loc}"
       	htmlfiles="${h_loc}"
       	debug="true"/>
    </target>
</project>
Comment 10 Darin Wright CLA 2009-10-22 13:30:34 EDT
Verified.