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

RFC: drop datetime feature (or drop FieldValue) #169

Closed
lnicola opened this issue Feb 23, 2021 · 8 comments · Fixed by #229
Closed

RFC: drop datetime feature (or drop FieldValue) #169

lnicola opened this issue Feb 23, 2021 · 8 comments · Fixed by #229

Comments

@lnicola
Copy link
Member

lnicola commented Feb 23, 2021

I think we should drop the feature and eat the extra dependency.

chrono builds in about 3 seconds and having different code paths can be annoying (see 3765736 for a recent example, where clippy failed because of an apparently infallible function returning Result).

@lnicola
Copy link
Member Author

lnicola commented Mar 2, 2021

One more argument for this: feature-gating an enum value can make dependent crates stop building if the feature gets pulled in by another crate. I gave an example in georust/wkt#50 (comment).

@lnicola
Copy link
Member Author

lnicola commented Mar 3, 2021

On the other hand, we could try to do this "the right way" and define a set of conversion traits. This way we could get rid of the enum and still be able to make the chrono dependency optional.

One problem with this approach would be the "loose" typing we currently have in FieldValue::into_foo.

@lnicola lnicola changed the title RFC: drop datetime feature RFC: drop datetime feature (or drop FieldValue) Mar 3, 2021
@ChristianBeilschmidt
Copy link
Contributor

For me, time is essential to geoprocessing, so I don't see the point in having this feature-gated.

And if we keep it, I guess you are right in working on the enum value.

@jdroenner
Copy link
Member

we can drop the feature gate now and change to conversion traits later. I think the additional dependency is fine.

@lnicola
Copy link
Member Author

lnicola commented Oct 19, 2021

Actually, chrono is currently unmaintained, we should also look into using the time crate instead.

In a different PR, of course.

@jdroenner
Copy link
Member

really? That is very unfortunate.

@lnicola
Copy link
Member Author

lnicola commented Oct 19, 2021

Yeah, see e.g. this soundness issue from one year ago: chronotope/chrono#499. https://github.com/chronotope/chrono/commits/main shows some movement, but the last commit before was from January.

@jdroenner
Copy link
Member

if i get it right the issue is with localtime and time removed that in 0.3. I guess we will never need local time and should be able to use time instead.

@lnicola lnicola mentioned this issue Oct 19, 2021
2 tasks
@bors bors bot closed this as completed in d930fbf Oct 19, 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 a pull request may close this issue.

3 participants