Glossary · Automation software engineering and architecture
Source compatibility
Also known as: Source-level compatibility, API compatibility
German: Quellcodekompatibilität
In software engineering, source compatibility is the property that code written against one version of a library, API or language still compiles without changes against a newer version.
- Software engineering
In one sentence
Source compatibility means code written for one version of a library or API still compiles unchanged against a newer version.
Example
The new motion library version is source compatible: existing PLC projects compile without changes, but they must be recompiled to use the new library.
How it applies
- Engineering: Renaming or removing public functions, changing parameter types or adding required parameters breaks source compatibility. Adding optional functionality usually preserves it.
- Maintenance: Source compatibility reduces migration effort, but projects still need rebuilding and regression testing.
- Documentation: Release notes should state explicitly whether a version is source compatible, binary compatible or neither, and list the changes that require code adaptation.
Source vs. binary compatibility
Source compatibility means existing code compiles. Binary compatibility means existing compiled programs keep working with the new version without recompilation. A change can preserve one and break the other.