Migrating Callers to a Changed Contract
A change in an interface may require callers to revise assumptions about input, result meaning, or discarded effects.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace an optional field
Returning a missing value instead of zero changes consumers that sum it directly. Provide a deliberate transition and verify callers under both supported behaviors when applicable. See versioning function contracts.
Avoid relying only on signature changes
An unchanged type can still have a changed interpretation. Add examples for the old and new semantics. Checking stage boundaries helps confirm the workflow after migration.[1]