parser
parser copied to clipboard
how to reduce the collision probability between different PRs
Feature Request
Is your feature request related to a problem? Please describe:
Background: Once a PR modifies the parser.y file, it needs to regenerate the parser.go file with goyacc tool.
The problem is, when two or more PRs modify the parser.y file, once one of these PRs get merged, all the others are conflicted with the parser.go file.
Describe the feature you'd like:
reduce the collision probability, let PRs merged faster.
Describe alternatives you've considered:
N/A
Teachability, Documentation, Adoption, Migration Strategy:
N/A
@tiancaiamao @kennytm PTAL if free.
Potential solutions
- Configure a bot which automatically do the rebase-and-squash operation, which resolves the conflict by running
goyacc. - Configure a bot which performs the merge and resolve conflict by running
goyacc; still let human to hit the big green button. - Change to another YACC-compatible parser generator, which the
parser.gois merge-friendly (likely very difficult). - Change to a YACC-compatible runtime parser generator, thus getting rid of
parser.go. - ...
2 looks like a good idea, maybe we can provide a "/parser.go" command that calls the make parser.go to resolve conflicts automatically?
3 is difficult
4 is not approachable, because Go module requires repeatable build, so we can't generate code at runtime.
@zhouqiang-cl How do you think idea 2?
test webhook
@zhouqiang-cl How do you think idea 2?
sorry. I don't know what I should do
@zhouqiang-cl Ping. Could we raise this again to the EE-team? SIG-DDL can't do anything to fix this, since only you guys can add the bots (web hooks), and also pingcap can't use GitHub Actions.