binary-compatibility

How to test binary compatibility automatically?

那年仲夏 提交于 2019-11-27 14:49:40
问题 Can it be done before compiling, by comparing code? Is there any tools already doing this? 回答1: You might find this interesting: Static analysis tool to detect ABI breaks in C++ 回答2: ABI Compliance Checker — a tool for checking backward API/ABI compatibility of a C/C++ library: abi-compliance-checker -lib NAME -old OLD.abidump -new NEW.abidump *.abidump files are ABI dumps of OLD and NEW library versions generated by the ABI Dumper tool. icheck - C interface ABI/API checker: icheck --canonify

How to design a C++ API for binary compatible extensibility

蓝咒 提交于 2019-11-27 09:38:24
问题 I am designing an API for a C++ library which will be distributed in a dll / shared object. The library contains polymorhic classes with virtual functions. I am concerned that if I expose these virtual functions on the DLL API, I cut myself from the possibility of extending the same classes with more virtual functions without breaking binary compatibility with applications built for the previous version of the library. One option would be to use the PImpl idiom to hide all the classes having

Using Scala 2.12 with Spark 2.x

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 02:06:15
问题 At the Spark 2.1 docs it's mentioned that Spark runs on Java 7+, Python 2.6+/3.4+ and R 3.1+. For the Scala API, Spark 2.1.0 uses Scala 2.11. You will need to use a compatible Scala version (2.11.x). at the Scala 2.12 release news it's also mentioned that: Although Scala 2.11 and 2.12 are mostly source compatible to facilitate cross-building, they are not binary compatible. This allows us to keep improving the Scala compiler and standard library. But when I build an uber jar (using Scala 2.12

How to identify a missing method (Binary Compatibility) in a JAR statically

自古美人都是妖i 提交于 2019-11-27 00:56:49
问题 I want to verify binary compatibility between 2 JARs. Following the suggestions in this answer I used jboss tattletale but it can find only missing classes. How can I find if there are missing methods? Is it possible at all? E.g. "Depends - on" class Foo depends on Bar (like many other middle class workers) import org.overlyusedclassnames.Bar public class Foo{ public void someMethod(){ Bar tender = new Bar(); tender.getJohnnyRedLabel(); tender.getJohnnyBlueLabel(); //this method is new in the

Scala: binary incompatibility between releases

為{幸葍}努か 提交于 2019-11-26 21:14:56
问题 Why is Scala binary incompatible between different releases? 回答1: It has to do with the way traits are compiled, because traits are kind of like interfaces but they can contain implementation. This makes it so it is VERY easy to make changes that don't break source compatibility but break binary compatibility, because when you add a new method to a trait along with an implementation, you have to recompile everything that implements that trait so that they will pickup that implementation.

Is JDK “upward” or “backward” compatible?

瘦欲@ 提交于 2019-11-26 14:32:59
Backward binary compatibility (or downward compatibility) - an ability of clients built with an old version of library API to run on a new one ( wiki ). Upward binary compatibility (or forward compatibility) - an ability of clients built with a new version of library API to run on old one ( wiki ). The general Sun's document about JDK Incompatibilities in J2SE 5.0 since 1.4.2 (and Java SE 6 compatibility with J2SE 5.0 too) describes the compatibility of JDK as following: JDK 5.0 is upwards binary-compatible with Java 2 SDK, v1.4.2 except for the incompatibilities listed below. This means that,

What causes java.lang.IncompatibleClassChangeError?

时光总嘲笑我的痴心妄想 提交于 2019-11-25 23:57:48
问题 I\'m packaging a Java library as a JAR, and it\'s throwing many java.lang.IncompatibleClassChangeError s when I try to invoke methods from it. These errors seem to appear at random. What kinds of problems could be causing this error? 回答1: This means that you have made some incompatible binary changes to the library without recompiling the client code. Java Language Specification §13 details all such changes, most prominently, changing non- static non-private fields/methods to be static or