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

A bunch of required types are private #166

Open
Manishearth opened this issue Jan 17, 2025 · 3 comments
Open

A bunch of required types are private #166

Manishearth opened this issue Jan 17, 2025 · 3 comments

Comments

@Manishearth
Copy link
Contributor

While working on FFI (#163) I discovered that a bunch of types, like CalendarDateLike and TzProvider and TimeDuration are all private but exposed in various APIs.

This makes it tricky to build FFI wrappers around them, and probably isn't great API design. These should probably be public, with TzProvider potentially being sealed to prevent external implementations (if that's the goal).

@nekevss
Copy link
Member

nekevss commented Jan 17, 2025

Yeah, agreed. This is sort of related to #165.

I'll look into cleaning up some of the visibility on these ASAP.

@Manishearth
Copy link
Contributor Author

Ah if the intent is that these be public I'm also happy to do that while in process of adding FFI! I didn't want to break things otherwise.

@nekevss
Copy link
Member

nekevss commented Jan 17, 2025

TzProvider/TimeZoneProvider is definitely intended to be public; meanwhile others (TimeDuration and DateDuration) can be public but the benefits of them being public are not entirely clear to me. As a result, I was going back and forth on their visibility, which resulted in them being excluded in #97.

Honestly some of these are hold overs from very early versions of temporal_rs, so this issue gives me a good reason to begin the cleanup 😄

jedel1043 pushed a commit that referenced this issue Jan 17, 2025
This PR addresses some issues brought up in #166.

The general updates are as follows:

  - `CalendarDateLike` removed in favor of using `IsoDate` directly.
  - `CalendarFieldsType` removed
  - `GetTemporalCalendar` removed
- `DateDuration` and `TimeDuration` exported from root with the other
builtins
  - `TzProvider` renamed to `TimeZoneProvider`
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

No branches or pull requests

2 participants