Bug 226958

Summary: [api] Inconsistent RSECorePlugin.waitForInitCompletion() return value
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: David Dykstal <ddykstal.eclipse>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: enhancement    
Priority: P2 Keywords: api
Version: 3.0Flags: mober.at+eclipse: pmc_approved+
Target Milestone: 3.0 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Martin Oberhuber CLA 2008-04-14 11:55:37 EDT
In class RSECorePlugin, there are two overloaded methods of

class RSECorePlugin {
  static void waitForInitCompletion(int phase);
  static IStatus waitForInitCompletion();
}

These seem unnecessarily inconsistent. Every waitForInitCompletion() call should return a status value, even if just one phase is being watched.

Note that changing the return value is not binary compatible, but it is source compatible. Therefore, I don't think changing the return value is a problem in M7 - the API was newly added in this release cycle, so there is no reason for backward compatibility. And clients, who started adopting this API already will remain source compatible.
Comment 1 David Dykstal CLA 2008-05-15 18:04:16 EDT
Martin --

I have a fix (and modified tests) for this. Do you think we need to vote on it since it is new in this release?

-- Dave
Comment 2 Martin Oberhuber CLA 2008-05-15 18:10:38 EDT
Voting is never bad, but we can do it after the fact (i.e. you can be optimistic and commit it, and promise to back it out again in case anybody would vote -1).

You have my +1 for making the change as the project lead and pmc member.

What's especially helping here is that the change should be Source Compatible, since client code that expected a "void" return value will continue to compile if an IStatus is returned. 

For new code added within this release cycle, we are more concerned about source compatibility (which impacts adopters) than binary compatibility (since there are no binaries out in the wild yet).
Comment 3 David Dykstal CLA 2008-05-15 18:45:49 EDT
Right. The change is source compatible. I will go ahead and commit and advertise for negative votes on the mailing list.
Comment 4 David Dykstal CLA 2008-05-15 18:51:26 EDT
API changes:

RSECorePlugin.waitForInitCompletion(int) now returns an IStatus instead of "void"
RSEInitJob.waitForInitCompletion(int) now returns an IStatus instead of "void"

As discussed above, these changes are source compatible. Binary compatibility is not an issue with previous releases since this is new function.