Skip to content

More deprecations in Pervasives; add Stdlib.Pair and Stdlib.Int.Ref #7371

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

Merged
merged 7 commits into from
Apr 1, 2025

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Mar 30, 2025

  • Add Stdlib.Pair and Stdlib.Int.Ref to cover some functionality currently in Pervasives.
  • Deprecate more stuff in Pervasives.
  • Get rid of Pervasives_mini.

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: 6a84bd1 Previous: 3f06468 Ratio
Parse RedBlackTree.res - time/run 1.8706953800000001 ms 1.3461563799999998 ms 1.39
Print RedBlackTree.res - time/run 2.9356200866666664 ms 1.8942094533333333 ms 1.55
Print RedBlackTreeNoComments.res - time/run 2.6982062666666664 ms 1.7506641333333335 ms 1.54
Parse Napkinscript.res - time/run 63.02000473999999 ms 42.33869618 ms 1.49
Print Napkinscript.res - time/run 101.28971613333333 ms 57.47105978 ms 1.76
Parse HeroGraphic.res - time/run 7.623864753333333 ms 5.736426893333333 ms 1.33
Print HeroGraphic.res - time/run 12.621982873333334 ms 7.840572506666666 ms 1.61

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

@cknitt cknitt changed the title More deprecations in Pervasives More deprecations in Pervasives; add Stdlib.Pair and Stdlib.Int.Ref Mar 31, 2025
@@ -330,4 +357,5 @@ let rec \"@" = (l1, l2) =>

/* Miscellaneous */

@deprecated("This will be removed in v13")
type int32 = int
Copy link
Member Author

Choose a reason for hiding this comment

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

@cometkim Do you know why this is here at all? It was added in #7108.

@cknitt cknitt requested review from zth, tsnobip and cometkim March 31, 2025 14:40
Copy link
Member

@tsnobip tsnobip left a comment

Choose a reason for hiding this comment

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

I'd just add equal and compare to Pair module and I think we're good to go!

Comment on lines +111 to +116
module Ref = {
type t = ref<int>

external increment: ref<int> => unit = "%incr"
external decrement: ref<int> => unit = "%decr"
}
Copy link
Member

Choose a reason for hiding this comment

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

nice!

Copy link
Member

Choose a reason for hiding this comment

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

what was the original reasoning behind Pervasives_mini?

Copy link
Member Author

Choose a reason for hiding this comment

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

  • Avoiding cycles because Pervasives had global stuff referencing other modules that is now in Stdlib_Global.
  • Original idea was also to build Stdlib, Belt, Js separately based on a minimal set Pervasives_mini. Now Pervasives itself is reduced anyway with most stuff deprecated.

@cknitt cknitt requested a review from tsnobip April 1, 2025 09:30
Copy link
Member

@tsnobip tsnobip left a comment

Choose a reason for hiding this comment

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

looks good to me now!

@cknitt cknitt merged commit 1ad3d50 into master Apr 1, 2025
20 checks passed
@cknitt cknitt deleted the deprecations branch April 1, 2025 09:51
fhammerschmidt pushed a commit that referenced this pull request Apr 4, 2025
…7371)

* More deprecations in Pervasives

* Add Stdlib.Pair

* Add Int.Ref.increment/decrement

* CHANGELOG

* Get rid of Pervasives_mini

* Fix CHANGELOG category

* Add Pair.equal, Pair.compare
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.

3 participants