2

I am trying to find a way to alert my developers that their changes may break binary compatibility.


Our application is structured such that it provides a core framework that 20+ (independently deployed) child DLLs consume. If changes are made to the core framework, a child DLL might break.

For this particular application, we don't necessarily care that the core framework maintains full backwards compatibility such that the methods must always output the same values/manipulate the inputs in the same way. So a child DLL plugged into the core framework might get fixes "for free" as framework components are modified.

In the past few weeks we have seen two cases come up, both of which broke binary compatibility and required immediate fixes:

  1. Interface modified from void SomeMethod(List<...> someList); to SomeMethod(IList<...> someList);
  2. Static helper modified to add an optional parameter, e.g., public static int FancyCompare(..., string right) to public static int FancyCompare(..., string right, int maxPrecision=3);

In these cases the problems weren't caught until production because our automated Bamboo builds are always recompiled against the latest checkin and the tests we have execute the code, they don't really check top level method signatures. We don't currently have a way for Bamboo to run plugin_vOld against core_vNew.


I could potentially get around the interface thing by disallowing all changes to core interfaces and requiring developers to create new interfaces, and then have the concrete implementations implement multiple interfaces, but that will get messy fast. That still doesn't get around the optional parameter issue.

Does anyone know of, for instance, a VS or Resharper plugin that would alert the developer that their change breaks binary compatibility? Or perhaps a Bamboo build system plugin? Or some other method?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
debracey
  • 6,517
  • 1
  • 30
  • 56

0 Answers0