Skip to content

Split parser into multiple files #344

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

Closed
wants to merge 5 commits into from
Closed

Split parser into multiple files #344

wants to merge 5 commits into from

Conversation

koushiro
Copy link
Member

@koushiro koushiro commented Sep 2, 2021

Signed-off-by: koushiro [email protected]

I found that the parser module is only in one large file, which is not very friendly for viewing the code and resolving git conflicts, so I split it by the way when I view the code, but I don’t know if this big PR can be accepted (without changing the parser logic)

visibility changes:

  • pub fn parse_identifiers ==> fn parse_identifiers
  • fn parse_prepare ==> pub fn parse_prepare
  • fn parse_execute ==> pub fn parse_execute
  • fn parse_deallocate ==> pub fn parse_deallocate

@coveralls
Copy link

coveralls commented Sep 2, 2021

Pull Request Test Coverage Report for Build 1196621825

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1404 of 1622 (86.56%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.07%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/tcl.rs 30 31 96.77%
src/parser/dml.rs 21 25 84.0%
src/parser/dql.rs 306 331 92.45%
src/parser/ddl.rs 293 365 80.27%
src/parser/mod.rs 754 870 86.67%
Totals Coverage Status
Change from base Build 1193231211: 0.0%
Covered Lines: 5687
Relevant Lines: 6314

💛 - Coveralls

@koushiro koushiro marked this pull request as ready for review September 3, 2021 02:24
@koushiro
Copy link
Member Author

koushiro commented Sep 3, 2021

The commit Differentiate methods caused a lot of git diff content, but in fact it only adjusted the order of the methods.

If this is unacceptable, I will revert the commit.

@koushiro
Copy link
Member Author

koushiro commented Sep 3, 2021

/cc @alamb @Dandandan what do you think?

Signed-off-by: koushiro <[email protected]>
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution @koushiro

I am not opposed to this change, but I am not sure if the additional value is worth the potential risk to breaking downstream consumers. I will let others weigh in as well

@koushiro
Copy link
Member Author

koushiro commented Sep 15, 2021

I dropped the commit Differentiate methods in #351 to make it easier to be reviewed.

/cc @alamb @Dandandan Is there any progress?

@alamb
Copy link
Contributor

alamb commented Sep 16, 2021

/cc @alamb @Dandandan Is there any progress?

I am of two minds here -- I like that you are trying to improve the codebase, but I am worried about doing a substantial reorganization that offers contributors to the library some benefit but imposes costs on users of the library.

@koushiro
Copy link
Member Author

koushiro commented Sep 18, 2021

I am of two minds here -- I like that you are trying to improve the codebase, but I am worried about doing a substantial reorganization that offers contributors to the library some benefit but imposes costs on users of the library.

At least this PR has no other breaking changes except for the visibility changes of some functions. I think this won't impose costs on the users of the library.

@koushiro koushiro closed this Nov 21, 2021
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.

3 participants