binary-compatibility

Refactored methods and binary compatibility in Java

此生再无相见时 提交于 2019-12-22 04:07:09
问题 When refactoring methods it is easy to introduce binary incompabilities (with previous versions of the code) in Java. Consider changing a method to widen the type of its parameter to a parent interface: void doSomething(String x); // change it to void doSomething(CharSequence c); All the code that uses this method will continue to compile without changes, but it does require a re-compile (because the old binaries will fail with a MethodNotFoundError). How about pulling a method up into a

Refactored methods and binary compatibility in Java

梦想的初衷 提交于 2019-12-22 04:07:04
问题 When refactoring methods it is easy to introduce binary incompabilities (with previous versions of the code) in Java. Consider changing a method to widen the type of its parameter to a parent interface: void doSomething(String x); // change it to void doSomething(CharSequence c); All the code that uses this method will continue to compile without changes, but it does require a re-compile (because the old binaries will fail with a MethodNotFoundError). How about pulling a method up into a

Pure virtual functions and binary compatibility

冷暖自知 提交于 2019-12-21 13:04:32
问题 Now, I know it is generally bad to add new virtual functions to non-leaf classes as it breaks binary compatibility for any derived classes which haven't been recompiled. However, I have a slightly different situation: I have an interface class and implementation class compiled into a shared library, for example: class Interface { public: static Interface* giveMeImplPtr(); ... virtual void Foo( uint16_t arg ) = 0; ... } class Impl { public: ... void Foo( uint16_t arg ); .... } My main

ABI compatibility header/library cross check

馋奶兔 提交于 2019-12-21 06:22:04
问题 I have been looking around for an ABI cross-check tool. Now I have met some of the tools suggested in other questions, such as in these questions: How to test binary compatibility automatically? Static analysis tool to detect ABI breaks in C++ Now, this is not exactly what I am trying to do - as these track ABI changes between versions. I was wondering that given project source files + library header file and library .so file, as well as a compiler version (which is used for compiling both

C# interface breakage, ABI

十年热恋 提交于 2019-12-21 04:06:08
问题 Suppose we have the class X in version 1 of the assembly A.dll : class X { SomeType Property { set; get; } } and then in version 2 of the assembly A.dll : class X { SomeType Property { set; get; } SomeType OtherProperty { set; get; } } Now suppose we have a second assembly B.dll that loads A.dll and uses X. Will the addition of the property OtherProperty break the ABI? Will B.dll fail to use A.dll / X ? If not, would the order of the declarations make any difference? If the properties had

COM in the non-Windows world?

半城伤御伤魂 提交于 2019-12-20 10:32:42
问题 Hope this question isn't going to be too vague. Reading through the COM spec and Don Box's Essential COM book, there is plenty of talk of the "problems that COM solves" - and they all sound important, relevant and current. So how are the problems that COM addresses dealt with on other systems (linux, unix, OSX, android)? I'm thinking of things like: binary compatibility across compilers and compiler versions binary component reuse compiling an application such that it has run-time

Does changing the return type of a function for a child type breaks binary compatibility?

∥☆過路亽.° 提交于 2019-12-20 02:31:00
问题 Let's go straight to it : Old code : public interface IFoo {} public class Foo : IFoo {} ... public static IFoo Bar() { return new Foo(); } New code : public static Foo Bar() { return new Foo(); } Obviously there should be no problem here, everything you were doing on the old return type, you can still do on the new return type, any is , as or cast should behave the same as before... So did I break binary compatibility, or can I just release it as a minor version without bothering users ? 回答1

Is the official binary incompatibility between VS2017 and VS2015 app vs. dll accurate?

纵然是瞬间 提交于 2019-12-19 10:25:12
问题 TL;DR - The MS docs state that binary compatibility between VS2015 and VS2017 libs is one-way , while I'd assumed it is necessarily two-way. Where's the catch? First, for background: Any MSVC++ built libraries are officially binary compatible between VS2015 and VS2017. Specifically, you can use your VS2015 C++ app with the MSVCRT140 version from 2017. (VCRedist backwards compat) The official documentation site states a confusing restriction . Background / related Questions: Is Visual-C++-2017

Runtime error (dll loading) with win32 applications on x64 system, while compiling 0K

江枫思渺然 提交于 2019-12-19 08:18:21
问题 I originally designed a win32 application on win7 32bits, with VC9.0. I recently upgraded to win7 64 bits, and tried to build+execute the previous application. Building runs fine (win32 application), but on runtime I get the error "[...] has exited with code -1073741701 (0xc000007b)." I guess this results of the loading of a 64bits version of an [intended] 32bits dll. Specific dependencies for this project are: SDL.lib SDLmain.lib SDL_ttf.lib opengl32.lib glu32.lib wininet.lib SDL and SDL_ttf

Runtime error (dll loading) with win32 applications on x64 system, while compiling 0K

无人久伴 提交于 2019-12-19 08:18:05
问题 I originally designed a win32 application on win7 32bits, with VC9.0. I recently upgraded to win7 64 bits, and tried to build+execute the previous application. Building runs fine (win32 application), but on runtime I get the error "[...] has exited with code -1073741701 (0xc000007b)." I guess this results of the loading of a 64bits version of an [intended] 32bits dll. Specific dependencies for this project are: SDL.lib SDLmain.lib SDL_ttf.lib opengl32.lib glu32.lib wininet.lib SDL and SDL_ttf