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

Gentype: handle null/nullable/undefined from Pervasives #7132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Oct 27, 2024

No description provided.

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.
Before merging, or perhaps after: we should settle on where these types exist.

Having them exist in 3 or 4 places is an opportunity for issues down the line in tooling (editor, hovering) and compiler updates.

What's the ground truth here?
I guess for each type, we should have a preferred way of expressing that type, at least.
Ideally, a unique way, but that seems difficult to achieve while maintaining backwards compatibility.

Thoughts @zth ?

@cknitt
Copy link
Member Author

cknitt commented Oct 27, 2024

What's the ground truth here? I guess for each type, we should have a preferred way of expressing that type, at least. Ideally, a unique way, but that seems difficult to achieve while maintaining backwards compatibility.

If we follow my current approach in #7129, the ground truth would be in the CoreTypes module.
Directly in Pervasives won't work because of circular dependency issues.

In any case, we still have to be able to handle the different aliases.

@cknitt
Copy link
Member Author

cknitt commented Oct 30, 2024

Will keep this open until #7129 is done, as we'll run into the same issue with any other types we alias in Pervasives (e.g. date).

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 this pull request may close these issues.

2 participants