chrono icon indicating copy to clipboard operation
chrono copied to clipboard

functions from core-foundation

Open esheppa opened this issue 3 years ago • 7 comments

This is a proof of concept PR to go along with https://github.com/servo/core-foundation-rs/pull/521 at core-foundation. If/when that PR is accepted, this can be fixed (change the git dependency to a proper dependency) and properly documented

esheppa avatar Aug 17 '22 11:08 esheppa

I think it definitely make sense to invert the dependency here -- core-foundation seems like it ought to be lower-level than chrono. Would like to better understand who's using this code (if anyone still is) before we move this code into chrono.

djc avatar Aug 17 '22 12:08 djc

core-foundation seems like it ought to be lower-level than chrono

Yep this was my thought as well.

Would like to better understand who's using this code

I've checked reverse dependencies on https://lib.rs/crates/core-foundation/rev and didn't find anyone using it on the first page. Ideally we could merge this ASAP after servo/core-foundaton-rs#521 so that any users have a migration path.

esheppa avatar Aug 17 '22 12:08 esheppa

Ideally we could merge this ASAP after https://github.com/servo/core-foundation-rs/pull/521 so that any users have a migration path.

Hmm, I think I'd prefer to let it linger a little bit to find out what those users actually need, instead of moving code around that was introduced 5 years ago and might, for all we know, no longer have an actual user.

djc avatar Aug 17 '22 12:08 djc

Fair point, no need for a migration path if no one is using the code anyway :smile:

esheppa avatar Aug 17 '22 12:08 esheppa

Maybe this https://twitter.com/sourcegraph/status/1547991489149423620 can come in handy?

Starting today, Sourcegraph can search and navigate through 87k+ Rust Crates and all their versions.

For example, see all the crates and versions starting with "tokio" here: https://sourcegraph.com/search?q=repo%

Kijewski avatar Aug 17 '22 12:08 Kijewski

I found nothing outside of core-foundation itself: https://sourcegraph.com/search?q=context:global+CFDate.*naive_utc&patternType=regexp. Maybe @ratake can tell for what they use(d) the feature?

Kijewski avatar Aug 17 '22 13:08 Kijewski

Great find @Kijewski!

esheppa avatar Aug 17 '22 13:08 esheppa

@djc Do you have an opinion on how to proceed with this PR?

pitdicker avatar Apr 07 '24 18:04 pitdicker

Personally I think it is fine to leave the conversion between a CFDate and NaiveDateTime to the core-foundation crate.

pitdicker avatar Apr 07 '24 18:04 pitdicker

I pinged the upstream PR again, now that the Servo project is a bit more alive.

djc avatar Apr 08 '24 09:04 djc

I see you removed the chrono dependency in core-foundation in https://github.com/servo/core-foundation-rs/pull/666. Still it seems no-one was using this code?

pitdicker avatar Apr 08 '24 12:04 pitdicker

Yeah, we're only adding this back if some people come asking for it.

djc avatar Apr 08 '24 13:04 djc