ADR 109: Internalize specific packages to reduce surface area#1485
Merged
thanethomson merged 27 commits intofeature/adr109-reduce-go-api-surfacefrom Oct 16, 2023
Merged
Conversation
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 tasks
Signed-off-by: Thane Thomson <connect@thanethomson.com>
lasarojc
approved these changes
Oct 13, 2023
Contributor
lasarojc
left a comment
There was a problem hiding this comment.
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?
|
|
||
| func (app *localClient) LoadSnapshotChunk(ctx context.Context, | ||
| req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { | ||
| req *types.RequestLoadSnapshotChunk, |
Contributor
There was a problem hiding this comment.
If we are formatting this way, then there are other places that should be changed.
I would rather make all such changes together.
Contributor
Author
It seems not. See https://github.com/cometbft/go-internalized-example |
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 15, 2023
* ADR 109: Internalize specific packages to reduce surface area (#1485) * consensus: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * evidence: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * inspect: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * state: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * blocksync: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * statesync: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * store: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/async: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/autofile: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/bits: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/clist: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/cmap: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/events: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/fail: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/flowrate: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/os: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/progressbar: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/protoio: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/pubsub: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/net: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/rand: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/service: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/strings: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/sync: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/tempfile: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * libs/timer: Move into internal Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add changelog entries Signed-off-by: Thane Thomson <connect@thanethomson.com> --------- Signed-off-by: Thane Thomson <connect@thanethomson.com> * ADR 109: Modularize test infra (#1488) * test/e2e: Split out as separate module Signed-off-by: Thane Thomson <connect@thanethomson.com> * test/loadtime: Split out as separate module Signed-off-by: Thane Thomson <connect@thanethomson.com> * test/e2e: Remove optimization from Docker image construction Signed-off-by: Thane Thomson <connect@thanethomson.com> * Ensure that linter covers E2E framework and app Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update CI linting to cover submodules Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add changelog entry Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand linter coverage to loadtime tool Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add missing phony entries Signed-off-by: Thane Thomson <connect@thanethomson.com> * test/e2e: Sync debug Dockerfile with primary Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> --------- Signed-off-by: Thane Thomson <connect@thanethomson.com> * chore: ADR 109: go mod tidy (#1606) * go mod tidy Signed-off-by: Thane Thomson <connect@thanethomson.com> * go.mod: Remove patch version Signed-off-by: Thane Thomson <connect@thanethomson.com> * go.mod: Remove new toolchain directives Signed-off-by: Thane Thomson <connect@thanethomson.com> --------- Signed-off-by: Thane Thomson <connect@thanethomson.com> * ADR 109: Fix mock generation (#1607) * internal: Fix mockery code generation script paths Signed-off-by: Thane Thomson <connect@thanethomson.com> * make mockery Signed-off-by: Thane Thomson <connect@thanethomson.com> --------- Signed-off-by: Thane Thomson <connect@thanethomson.com> --------- Signed-off-by: Thane Thomson <connect@thanethomson.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
mainbranch 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