テーマ: compatibility
-
musl versus glibc on Alpine: why some prebuilt binaries, Python wheels and DNS behaviour differ
Alpine's musl libc is not binary-compatible with glibc, has a different (parallel, non-search-falling-back) DNS resolver, defaults to the C.UTF-8 locale rather than a full locale database, and does not support lazy symbol binding — differences that explain glibc-linked binaries failing to run, manylinux Python wheels being rejected, and some legacy DNS configurations behaving differently. gcompat can run some unmodified glibc binaries but cannot be used to build software that itself requires glibc headers.
-
Protocol Buffers:フィールド番号、未知のフィールド、メッセージの進化規則
Protocol Buffers の通信形式では、フィールドを識別するのは名前ではなく番号です。番号は変更も再利用もしてはいけません。追加は通信上安全で、削除は番号を再利用しない場合だけ安全です(reserved で強制できます)。古い読み取り側は未知のフィールドを保持し、int32 から int64 への拡張は条件付きで安全です。ProtoJSON には別の規則があります。
-
Diffing the OpenAPI document in CI catches breaking changes that code review misses
Hypothesis: a CI step that compares the OpenAPI document of each change against the released one with a breaking-change classifier such as oasdiff flags removed fields, narrowed types and new required parameters that human review of the code diff misses, so fewer unintended breaking changes reach a release.
-
Deprecating a function in a library: warn, document the replacement, remove on schedule
A library deprecation has four parts: a replacement that exists first, a runtime warning plus a documentation note naming the version and the replacement, a changelog entry, and a removal release fixed in advance by policy. PEP 387 requires a deprecation period of at least two years under Python's annual cadence and describes a documentation-only soft deprecation; Django removes shims no earlier than two feature releases after the warning.
-
Schema evolution with Avro and Parquet: reader and writer schemas, merged files and compatibility modes
Avro resolves a writer's schema against a reader's schema field by field, filling missing fields from reader defaults and ignoring unknown ones; Parquet files with different but compatible schemas can be merged by the reading engine at a cost; a schema registry enforces backward, forward or full compatibility. Adding optional fields with defaults is the safe move, renaming and type changes are not.
-
Deprecation と Sunset ヘッダーで API エンドポイントを廃止する
サポート終了をレスポンス内で通知します。Deprecation ヘッダー(RFC 9745)はリソースを非推奨とし、Sunset ヘッダー(RFC 8594)は動作を停止する日時を示し、文書への Link が代替先を説明します。これらを、まだ利用しているクライアントの記録と組み合わせます。
-
Protocol Buffers の enum:ランタイムの動作に従って未知の数値を扱う
選んだスキーマモードと言語実装に基づき、将来の版との互換性を保つ enum 処理を計画します。
-
複数のリリース系列を支える:どの修正をどこに適用するか
サポート方針は、各リリース系列の状態(機能開発、バグ修正、セキュリティのみ、サポート終了)の表と、修正の種類ごとのバックポート先の規則で構成される。Pythonは系列に2年間のバグ修正リリースと、その後3年間のセキュリティのみのリリースを提供する。Djangoは重大な修正を直近の機能リリースに、安全性とデータ損失の修正を直近2つと長期サポート系列に戻す。Rustは最新の安定版のみを支える。小規模プロジェクトは表を公開し、守れる最小限の約束を標準とすべきである。
-
主張をその対象バージョンに対応付ける
バージョンの適用範囲を明示し、現行ドキュメントの主張を、バージョンが不明または互換性のない導入環境に適用しない。
機械可読: JSON