Skip to content
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

Temporal Parser Cleanup/Fixes #3521

Merged
merged 4 commits into from
Dec 20, 2023
Merged

Temporal Parser Cleanup/Fixes #3521

merged 4 commits into from
Dec 20, 2023

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Dec 18, 2023

This PR addresses some of the issues that was causing the parser to panic when running the test suite, along with some general cleanup of the parser.

It changes the following:

  • Implements FromStr for MonthDay and YearMonth (also removes the ym and dm peeks)
  • Attempts to clean up the general logic in the parser and adds some utility methods to the Cursor
  • Adds a large amount of invalid DateTime parsing cases to the parser tests from test262.

Copy link

Test262 conformance changes

Test result main count PR count difference
Total 95,960 95,960 0
Passed 76,534 76,534 0
Ignored 18,477 18,477 0
Failed 949 949 0
Panics 0 0 0
Conformance 79.76% 79.76% 0.00%

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (0f82312) 48.88% compared to head (73b6128) 48.98%.
Report is 8 commits behind head on main.

Files Patch % Lines
core/temporal/src/parser/time_zone.rs 86.95% 3 Missing ⚠️
core/temporal/src/parser/annotations.rs 90.47% 2 Missing ⚠️
core/temporal/src/parser/time.rs 96.42% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3521      +/-   ##
==========================================
+ Coverage   48.88%   48.98%   +0.09%     
==========================================
  Files         471      471              
  Lines       48492    48491       -1     
==========================================
+ Hits        23705    23751      +46     
+ Misses      24787    24740      -47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nekevss nekevss added technical debt builtins PRs and Issues related to builtins/intrinsics labels Dec 18, 2023
@nekevss nekevss requested a review from a team December 18, 2023 02:56
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

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

Looks good to me! :)

Just some really small nitpicks

core/temporal/src/components/month_day.rs Show resolved Hide resolved
core/temporal/src/parser/mod.rs Show resolved Hide resolved
core/temporal/src/parser/tests.rs Outdated Show resolved Hide resolved
@nekevss nekevss requested a review from a team December 20, 2023 16:31
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Nice improvements!

@jedel1043 jedel1043 added this pull request to the merge queue Dec 20, 2023
Merged via the queue into main with commit c2f145c Dec 20, 2023
14 checks passed
@nekevss nekevss deleted the temporal-parser-cleanup branch December 30, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants