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 Stdlib #7132

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Oct 27, 2024

No description provided.

@cknitt cknitt requested a review from cristianoc October 27, 2024 07:48
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).

@cknitt cknitt force-pushed the gentype-pervasives branch from abfe2bd to d270512 Compare February 18, 2025 08:34
@cknitt cknitt changed the title Gentype: handle null/nullable/undefined from Pervasives Gentype: handle null/nullable/undefined from Stdlib Feb 18, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: d270512 Previous: 80744a5 Ratio
Print HeroGraphic.res - time/run 13.609067813333333 ms 12.308145193333333 ms 1.11

This comment was automatically generated by workflow using github-action-benchmark.

@cknitt
Copy link
Member Author

cknitt commented Feb 18, 2025

Rebased after #7285, please re-review.

@cknitt cknitt requested a review from zth February 18, 2025 09:05
@cknitt cknitt requested a review from cristianoc February 19, 2025 07:11
@cknitt cknitt merged commit 5437d14 into master Feb 19, 2025
20 checks passed
@cknitt cknitt deleted the gentype-pervasives branch February 19, 2025 07:24
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