GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

How internal is internal?

オープン
#1,203 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
best practices
主要言語
Java
スター
163
フォーク
80
PR マージ指標
30日以内にマージされた PR はありません

説明

Teams often want the freedom to create purely internal but public impl classes and methods that can be changed outside the constraints of semver. E.g. make a breaking API change that does not require a major version bump because no clients depend on it. However

1. Clients do depend on these things. E.g. Cloud Tools for Eclipse depends on many internal parts of Eclipse including m2e. The linkage checker itself depends on internal parts of Maven.

2. Even when clients don't directly depend on internal classes, they can get tripped up by version mismatches in multimodule projects. We've seen this happen repeatedly as a result of internal API changes in gRPC and in OpenCensus. Breaking changes inside internal packages often cause problems when different versions of multiple internal packages are in play; e.g. grpc-foo:1.25 and grpc-bar:1.67. It's not necessarily true that someone is directly accessing internal API they shouldn't be, though that could cause this too.

3. [Hyrum's Law](https://www.hyrumslaw.com/)

This affects both JLBP-3 and JLPB-4, maybe others.

For internal APIs we should recommend that their use to be limited to a single module.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。