-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADR 109: Internalize specific packages to reduce surface area #1485
ADR 109: Internalize specific packages to reduce surface area #1485
Conversation
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes, which are many but all straightforward, look good to me.
Regarding the use of internal structures as parameters and results in public API, isn't that detected by the linter?
@@ -135,15 +135,17 @@ func (app *localClient) OfferSnapshot(ctx context.Context, req *types.RequestOff | |||
} | |||
|
|||
func (app *localClient) LoadSnapshotChunk(ctx context.Context, | |||
req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { | |||
req *types.RequestLoadSnapshotChunk, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are formatting this way, then there are other places that should be changed.
I would rather make all such changes together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see #604.
It seems not. See https://github.com/cometbft/go-internalized-example |
1511af9
into
feature/adr109-reduce-go-api-surface
* ADR 109: Internalize specific packages to reduce surface area (#1485) * consensus: Move into internal Signed-off-by: Thane Thomson <[email protected]> * evidence: Move into internal Signed-off-by: Thane Thomson <[email protected]> * inspect: Move into internal Signed-off-by: Thane Thomson <[email protected]> * state: Move into internal Signed-off-by: Thane Thomson <[email protected]> * blocksync: Move into internal Signed-off-by: Thane Thomson <[email protected]> * statesync: Move into internal Signed-off-by: Thane Thomson <[email protected]> * store: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/async: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/autofile: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/bits: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/clist: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/cmap: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/events: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/fail: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/flowrate: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/os: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/progressbar: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/protoio: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/pubsub: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/net: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/rand: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/service: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/strings: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/sync: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/tempfile: Move into internal Signed-off-by: Thane Thomson <[email protected]> * libs/timer: Move into internal Signed-off-by: Thane Thomson <[email protected]> * Add changelog entries Signed-off-by: Thane Thomson <[email protected]> --------- Signed-off-by: Thane Thomson <[email protected]> * ADR 109: Modularize test infra (#1488) * test/e2e: Split out as separate module Signed-off-by: Thane Thomson <[email protected]> * test/loadtime: Split out as separate module Signed-off-by: Thane Thomson <[email protected]> * test/e2e: Remove optimization from Docker image construction Signed-off-by: Thane Thomson <[email protected]> * Ensure that linter covers E2E framework and app Signed-off-by: Thane Thomson <[email protected]> * Update CI linting to cover submodules Signed-off-by: Thane Thomson <[email protected]> * Add changelog entry Signed-off-by: Thane Thomson <[email protected]> * Expand linter coverage to loadtime tool Signed-off-by: Thane Thomson <[email protected]> * Add missing phony entries Signed-off-by: Thane Thomson <[email protected]> * test/e2e: Sync debug Dockerfile with primary Dockerfile Signed-off-by: Thane Thomson <[email protected]> --------- Signed-off-by: Thane Thomson <[email protected]> * chore: ADR 109: go mod tidy (#1606) * go mod tidy Signed-off-by: Thane Thomson <[email protected]> * go.mod: Remove patch version Signed-off-by: Thane Thomson <[email protected]> * go.mod: Remove new toolchain directives Signed-off-by: Thane Thomson <[email protected]> --------- Signed-off-by: Thane Thomson <[email protected]> * ADR 109: Fix mock generation (#1607) * internal: Fix mockery code generation script paths Signed-off-by: Thane Thomson <[email protected]> * make mockery Signed-off-by: Thane Thomson <[email protected]> --------- Signed-off-by: Thane Thomson <[email protected]> --------- Signed-off-by: Thane Thomson <[email protected]>
Partially addresses #1484, based on #1483.
One concern I have is around the possibility that this PR internalizes certain types that are present in publicly accessible function signatures as parameters or return types. This will take some work to address.
main
branch doesn't pick up any missing code-related issues at this point.This PR currently internalizes about 64k lines of code.
PR checklist
.changelog
(we use unclog to manage our changelog)docs/
orspec/
) and code comments