Tool for compatibility checking?

  • Follow


Does anyone know of a tool, preferably open source, for checking that 
versions N and N+1 of a library are compatible?  Ideally:

* The tool is open source
* It allows specifying which classes are to be checked, either by inclusion 
or by exclusion
* Its result is a report listing any places where compatibility has been 
violated, e.g.  where a method was added to an interface

 

0
Reply Mike 3/27/2011 4:13:07 PM

On 27-03-2011 12:13, Mike Schilling wrote:
> Does anyone know of a tool, preferably open source, for checking that
> versions N and N+1 of a library are compatible? Ideally:
>
> * The tool is open source
> * It allows specifying which classes are to be checked, either by
> inclusion or by exclusion
> * Its result is a report listing any places where compatibility has been
> violated, e.g. where a method was added to an interface

I assume that you mean a simple API support check and not a check
against implementation problems in the library.

No - I don't know of either, but it is two very different problems.

Arne

0
Reply ISO 3/27/2011 4:21:17 PM



"Arne Vajh�j" <arne@vajhoej.dk> wrote in message 
news:4d8f63f6$0$23752$14726298@news.sunsite.dk...
> On 27-03-2011 12:13, Mike Schilling wrote:
>> Does anyone know of a tool, preferably open source, for checking that
>> versions N and N+1 of a library are compatible? Ideally:
>>
>> * The tool is open source
>> * It allows specifying which classes are to be checked, either by
>> inclusion or by exclusion
>> * Its result is a report listing any places where compatibility has been
>> violated, e.g. where a method was added to an interface
>
> I assume that you mean a simple API support check and not a check
> against implementation problems in the library.

Yes.  I don't see how to check the latter (run-time compatibility) other 
than a complete set of unit tests.
 

0
Reply Mike 3/27/2011 4:38:34 PM

On 3/27/11 9:13 AM, Mike Schilling wrote:
> Does anyone know of a tool, preferably open source, for checking that
> versions N and N+1 of a library are compatible? Ideally:
>
> * The tool is open source
> * It allows specifying which classes are to be checked, either by
> inclusion or by exclusion
> * Its result is a report listing any places where compatibility has been
> violated, e.g. where a method was added to an interface

I don't know of any for Java.  There are several tools for .NET that do 
that sort of thing (Diff add-in for Reflector, NDepend, LibCheck, and 
BitDiffer come to mind).  Last year when I needed that sort of thing for 
some work I was doing, I found BitDiffer came closest to our needs, but 
unfortunately even it didn't fully support our use case.  So I wound up 
writing our own.

It only took a couple of weeks of off and on work (I had other 
responsibilities to deal with of course), including a GUI to allow 
fine-tuning of things like renamed members.

I think it would be even easier to write a similar tool for Java, 
because of the simpler type system (no properties, no events…just 
methods and fields).  The language has similar reflection features, so 
presumably the basic task is similar: load types, sort members, then 
recursively compare using a merge-sort style diff loop.

Obviously, it would be more ideal if such a tool already exists.  At 
least in the .NET world, the license fees were much less expensive than 
the cost for me to reinvent that wheel, even assuming only 40-80 hours 
of work.  A web search turned up these possibilities:
http://www.extradata.com/products/jarc/
http://www.activityworkshop.net/software/jarcomp/index.html

A StackOverflow thread suggests decompiling the contents of a library 
and then using your favorite diff tool to compare.

Unfortunately, because .jar uses the .zip format, it appears that at 
least one of those tools is really just a .zip comparer, and doesn't 
really look at the actual Java types implemented in each file.  I didn't 
try it though, so I'm not really sure.

Hope that helps.

Pete
0
Reply Peter 3/27/2011 4:49:14 PM

On 27-03-2011 12:38, Mike Schilling wrote:
> "Arne Vajh�j" <arne@vajhoej.dk> wrote in message
> news:4d8f63f6$0$23752$14726298@news.sunsite.dk...
>> On 27-03-2011 12:13, Mike Schilling wrote:
>>> Does anyone know of a tool, preferably open source, for checking that
>>> versions N and N+1 of a library are compatible? Ideally:
>>>
>>> * The tool is open source
>>> * It allows specifying which classes are to be checked, either by
>>> inclusion or by exclusion
>>> * Its result is a report listing any places where compatibility has been
>>> violated, e.g. where a method was added to an interface
>>
>> I assume that you mean a simple API support check and not a check
>> against implementation problems in the library.
>
> Yes. I don't see how to check the latter (run-time compatibility) other
> than a complete set of unit tests.

Exactly.

Arne

0
Reply ISO 3/27/2011 8:12:49 PM

4 Replies
273 Views

(page loaded in 0.056 seconds)

Similiar Articles:













7/25/2012 11:42:51 PM


Reply: