Skip to content

Backward Compatibility

Yuki Kimoto edited this page Feb 23, 2024 · 22 revisions

Backward Compatibility.

Policy of Keeping Backward Compatibility

There is currently no policy to keep the backward compatibility of the SPVM language.

If you look at Changes, you see a lot of breaking backward compatibility.

You expect backward compatibility to be improved little by little as more modules are released to CPAN. For now, there are more than 100 SPVM modules on CPAN.

Binary Compatibility

How developers can keep binary compatibility of SPVM

SPVM is designed to keep binary compatibility.

Even if the SPVM language itself is upgraded, previously installed SPVM modules and applications will work correctly without experiencing segmentation faults.

However, whether or not SPVM developers will actually keep binary compatibility is pending until version 1.0.

Here is how developers can keep binary compatibility after version 1.0 is reached.

Requirement 1: Do not change the SPVM operation code implementation defined in spvm_implement.h

Binary compatibility is not kept if the implementation of the SPVM operation code defined in spvm_implement.h is changed.

This is because the precompiled code contains the implementation of the operation code defined in spvm_implement.h.

On the other hand, implementation changes in spvm_api.c will not affect binary compatibility.

Requirement 2: Do not change the Native API order defined in spvm_native.h

Binary compatibility is not be kept if the order of Native APIs defined in spvm_native.h is changed (i.e., the IDs are changed in the documentation).

Requirement 3: Do not change the enumeration value published to users.

Do not change the enumeration value published to users.

A getting enumeration value is replaced to an interger literal at compilation time.

For this, if an enumeration value is changed after first publication to users, the binary compatibility is not kept.