-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
parser: fix compiling, add unit tests #28700
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
@@ -97,4 97,4 @@ require ( | |||
// we need keep the replacement until go.etcd.io supports the higher version of grpc. | |||
replace google.golang.org/grpc => google.golang.org/grpc v1.29.1 | |||
|
|||
replace github.com/pingcap/parser => ./parser | |||
replace github.com/pingcap/tidb/parser => ./parser |
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.
Can we remove this line?
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.
No. It is intended. It is added such that changes in ./parser
will take effect in this PR immediately. Otherwise CI/go will pull code from the latest commit, i.e. master, which does not contain your new changes. Then you need two PRs, 😕 , again.
The one in three tests and enterprise-plugin can be removed. Most of the time, they does not rely parser directly.
parser is still a separate module. So you will still need to first upload changes/push to github, to let other modules(tidb/plugin/tests) to import new changes. But this replace directive will help you out of doing so for tidb. @tangenta
Note that this directive does not make sense for other modules, e.g. three tests and enterprise-plugin.
Rest LGTM |
/run-build plugin=pr/50 |
1 similar comment
/run-build plugin=pr/50 |
We had better merge this ASAP. Otherwise, the conflicting files occur endlessly. |
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.
LGTM with some minor suggestion for make dev
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Co-authored-by: tangenta <[email protected]>
Signed-off-by: xhe <[email protected]>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 75f65ea
|
Signed-off-by: xhe [email protected]
What problem does this PR solve?
Issue Number: close #28699
Problem Summary: As title, after this PR, parser migration is completed.
Depends on pingcap/enterprise-plugin#50.
What is changed and how it works?
What's Changed:
LDFLAGS = -X "github.com/pingcap/tidb/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always)"
to correct version.replace github.com/pingcap/tidb/parser => ./parser
in threecmd/*test
and the enterprise-plugin. It is needed to pass CI. Once the PR is merged, they can be removed/reverted.Check List
Tests
Release note