esavier commented on PR #9424:
URL: https://github.com/apache/arrow-rs/pull/9424#issuecomment-3920186515

   I added tests for the actually getting quarter() from structure, but this is 
not a regression test.
   I tried to find a way to test it, but the best we could do is to use 
`trybuild` crate and run something like this:
   
   ```
     fn main() {
         use chrono::{NaiveDate, Datelike};
         let d = NaiveDate::from_ymd_opt(2026, 1, 1).unwrap();
         let _ = d.quarter(); // should not fail with the above fix
     }
     ```
     
   Given that, this is very fragile. It depends on Cargo.lock state. If Someone 
reverts the fix, and they will have older Chrono in Cargo.lock, they won't see 
an error. Also, this will complicate a bit the build - another dev dependency.
     
    I committed the tests, since those are not something that is entirely 
useless, but I require your guidance with the above with regression test issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to