-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Dead code cleanup #14894
Dead code cleanup #14894
Conversation
This removes a bunch of unused code and removes some helpers that are available in standard Go packages these days. Signed-off-by: Dirkjan Bussink <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
This removes a trie that is not use for anything except for the tests. Also fixes some tests when colldump has been run, the path was wrong after a recent refactor for these tests to run. Signed-off-by: Dirkjan Bussink <[email protected]>
Signed-off-by: Dirkjan Bussink <[email protected]>
@@ -17,10 +17,8 @@ limitations under the License. | |||
package topotools | |||
|
|||
import ( | |||
"context" |
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.
💥 🧹
@@ -58,7 +56,7 @@ func findContractedCollations(t testing.TB, unique bool) (result []CollationWith | |||
continue | |||
} | |||
|
|||
rf, err := os.Open(fmt.Sprintf("testdata/mysqldata/%s.json", collation.Name())) | |||
rf, err := os.Open(fmt.Sprintf("../testdata/mysqldata/%s.json", collation.Name())) |
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.
was this not working before, or maybe a VTROOT issue?
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.
It was not working before anymore but that was not noticed since there tests only run when you manually generate the collation data.
testMatch(t, "ContractTrie", cnt, result, nil, 2) | ||
|
||
result = cwc.ContractFast.FindContextual(head, tail) | ||
result := cwc.ContractFast.FindContextual(head, tail) |
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.
Why are we removing the testMatch
on ContractTrie
here?
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.
got my answer below :)
f9f4350
to
f3cfe90
Compare
This cleans up dead code in two areas. First in
topotools
there's a bunch of unused code and code that can be replaced by more standard library logic.Second, we can clean up some unused code in collations. See each specific commit message for more details.
Checklist