-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
Replace chrono
with time
#1304
Comments
Thanks. That makes sense. Does somewant to pick this ticket? |
Let me check how much effort this takes. I just did it for some of our projects. No promises, but I'll report back soon ;) |
I'll take care of this issue. |
Let's not remove the re-exports. They are useful to avoid dependency hell. First of all, ideally we should not rely on any symbol on the API that is coming from another library. Now let's say two library do the same thing and do not do reexports. |
Tweeted it to see if smarter people can change my mind :) |
Re-export: You can't use aliased modules/types without knowing where they are actually originating. The re-export alias requires me to think about different import statements, i.e. |
I am not aware how a re-export could resolve such a version conflict? You will still end up with unrelated, incompatible types. Visibility and versioning are orthogonal. |
With two conflicting dependency, you will end up building your program with the two different crates.
That's not correct. If you don't have a version conflict, you can use your type and ignore the reexport. |
Thanks for the clarification. So the re-export of the |
Yes. I encounter the problem with third part library around once a year :). When it happens it is really painful. |
For date values `chrono` has been replaced with `time` - The `time` crate is re-exported as `tantivy::time` instead of `tantivy::chrono`. - The type alias `tantivy::DateTime` has been removed. - `Value::Date` wraps `time::PrimitiveDateTime` without time zone information. - Internally date/time values are stored as seconds since UNIX epoch in UTC. - Converting a `time::OffsetDateTime` to `Value::Date` implicitly converts the value into UTC. If this is not desired do the time zone conversion yourself and use `time::PrimitiveDateTime` directly instead. Closes #1304
For date values `chrono` has been replaced with `time` - The `time` crate is re-exported as `tantivy::time` instead of `tantivy::chrono`. - The type alias `tantivy::DateTime` has been removed. - `Value::Date` wraps `time::PrimitiveDateTime` without time zone information. - Internally date/time values are stored as seconds since UNIX epoch in UTC. - Converting a `time::OffsetDateTime` to `Value::Date` implicitly converts the value into UTC. If this is not desired do the time zone conversion yourself and use `time::PrimitiveDateTime` directly instead. Closes #1304
chrono
seems to be unmaintained and depends on an outdated version oftime
. For all features required by the engine and the APItime
should suffice.As
chrono
types and modules are re-exported by the public API this will be a breaking change. I also suggest to use this opportunity for removing those re-exports from the API which IMHO do not provide any value and are more confusing than helpful. Explicit, external dependencies are fine and more transparent.The text was updated successfully, but these errors were encountered: