Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Allow spaces (and other things) as separators when parsing RFC3339 - #700

#700
Merged
jhpratt merged 1 commit into
time-rs:maintime-rs/time:mainfrom
bearcove:rfc3339-is-weirdbearcove/time:rfc3339-is-weirdCopy head branch name to clipboard
Aug 27, 2024
Merged

Allow spaces (and other things) as separators when parsing RFC3339#700
jhpratt merged 1 commit into
time-rs:maintime-rs/time:mainfrom
bearcove:rfc3339-is-weirdbearcove/time:rfc3339-is-weirdCopy head branch name to clipboard

Conversation

@fasterthanlime

Copy link
Copy Markdown
Contributor

I don't like it anymore than you probably do, but the spec says so!

(and rusqlite uses that)

cf. https://hachyderm.io/@fasterthanlime/112834567377457088

@jhpratt

jhpratt commented Aug 1, 2024

Copy link
Copy Markdown
Member

I definitely don't like this, but I also don't like this from RFC2822.

It looks like tests are currently failing, as I explicitly tested for situations like this. The miri run will fail due to newer lints (it uses nightly unlike the rest of runs), so don't worry about that. With the tests updated, the change so far LGTM.

@jhpratt jhpratt added C-bug Category: bug in current code A-parsing Area: parsing A-well-known-format-description Area: well known format descriptions labels Aug 1, 2024
@codecov

codecov Bot commented Aug 1, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.6%. Comparing base (4a74924) to head (d60fded).
Report is 43 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #700     +/-   ##
=======================================
- Coverage   97.8%   97.6%   -0.2%     
=======================================
  Files         81      83      +2     
  Lines       9378    9008    -370     
=======================================
- Hits        9169    8790    -379     
- Misses       209     218      +9     

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

@fasterthanlime

fasterthanlime commented Aug 1, 2024

Copy link
Copy Markdown
Contributor Author

It looks like codecov is unhappy because of two lines that it counts as being in the patch, but are not actually part of the lines I touched?

Edit: nope, codecov on mobile was not actually showing me the right lines. Fixing that now.

@fasterthanlime

Copy link
Copy Markdown
Contributor Author

Okay, the only failing tests is now miri, just like you said it would!

This is ready for review afaict, maybe a bit heavy on the comments — if you want to trim those a bit I don't mind! Feel free to adjust the PR before merging it (if the changes otherwise look good).

Note: I have not encountered any separators other than " " or "T" in the wild, so time could be stricter than RFC3339 but.. I'm not sure what the rationale would be! Your pick.

@fasterthanlime

Copy link
Copy Markdown
Contributor Author

@jhpratt Anything I can do to help this land?

@jhpratt

jhpratt commented Aug 7, 2024

Copy link
Copy Markdown
Member

@fasterthanlime Probably the only thing would be rebasing to get miri passing. That'll save me the ~30 seconds to do it myself. Aside from that, I've been extremely busy. I do intend on reviewing this quite soon though!

@fasterthanlime

Copy link
Copy Markdown
Contributor Author

Just rebased as requested! 30 seconds is 30 seconds 😎

Comment thread time/src/parsing/parsable.rs Outdated
@jhpratt

jhpratt commented Aug 27, 2024

Copy link
Copy Markdown
Member

Thanks again! Sorry about the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parsing Area: parsing A-well-known-format-description Area: well known format descriptions C-bug Category: bug in current code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.