Skip to content
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

Move several packages to internal/ #901

Merged
merged 5 commits into from
Jan 28, 2025
Merged

Move several packages to internal/ #901

merged 5 commits into from
Jan 28, 2025

Conversation

jtibshirani
Copy link
Member

This PR moves the following packages to internal to avoid exposing them in the API:

  • ctags
  • debugserver
  • gitindex
  • shards
  • trace

I checked public code search engines and saw no external references to these, besides zoekt forks. I did not move these packages:

  • build -> used in at least one external dependency rubygems-research
  • ignore -> used by the sourcegraph repo to ignore files during unindexed search

Background behind this PR: I became inspired to restructure the repo a bit and update the docs. I have a few more changes queued up.

@jtibshirani jtibshirani requested a review from a team January 27, 2025 23:27
@jtibshirani
Copy link
Member Author

I also thought about moving grpc to internal but wasn't sure. @ggilmore @camdencheek do you have any objections to that?

@camdencheek
Copy link
Member

We do import the gRPC definitions from the monorepo, so this would break some things right now. Personally, I think exporting the generated protos is convenient for building clients consuming the API anyways, so I'd prefer keeping grpc public

@jtibshirani
Copy link
Member Author

Ah good point, I won't touch it. I guess I could pull out some internal helpers like util.go, but not clearly worth it.

"go.uber.org/automaxprocs/maxprocs"

"github.com/sourcegraph/zoekt/internal/profiler"

"github.com/sourcegraph/zoekt/cmd"
"github.com/sourcegraph/zoekt/ctags"
"github.com/sourcegraph/zoekt/gitindex"
"github.com/sourcegraph/zoekt/internal/gitindex"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it might be good to configure goimports or something similar to keep imports tidy :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I hadn't checked "Optimize imports on save" for the zoekt repo.

@jtibshirani jtibshirani merged commit a634b6c into main Jan 28, 2025
9 checks passed
@jtibshirani jtibshirani deleted the jtibs/refactor branch January 28, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants