Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

rvantonder
Copy link
Contributor

Components store and zipcache can be reused by upcoming replacer service, so am factoring it out of searcher to pkg/store instead of copying.

  • Notes: I tried create pkg/zipcache but there's a circular dependency (zipcache_test depends on store/tmpStore and store uses and depends on zipcache in its type definition. Wasn't obvious how to break the dependency.

Test plan: None, this just moves around existing code.

const (
// maxFileSize is the limit on file size in bytes. Only files smaller
// than this are searched.
maxFileSize = 1 << 20 // 1MB; match https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/zoekt%24+%22-file_limit%22
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out this const was only used by store, so I moved it there.

@rvantonder rvantonder changed the title Factors out store and zipcache from searcher to store pkg Factor out store and zipcache from searcher to store pkg Apr 23, 2019
Copy link
Contributor

@ijt ijt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ijsnow ijsnow left a comment

Choose a reason for hiding this comment

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

LGTM. Did you use comby to do this work? :P

@rvantonder
Copy link
Contributor Author

@ijsnow Ha! No, not this time :)

@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #3543 into master will decrease coverage by 0.07%.
The diff coverage is 80.76%.

Impacted Files Coverage Δ
cmd/searcher/search/matcher.go 86.48% <100%> (ø) ⬆️
cmd/searcher/search/search.go 66.21% <100%> (ø) ⬆️
pkg/store/store.go 65.85% <100%> (ø)
cmd/searcher/search/eval.go 77.12% <100%> (ø) ⬆️
cmd/searcher/search/retry.go 87.5% <100%> (ø) ⬆️
pkg/store/zipcache.go 46.23% <66.66%> (ø)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants