-
Notifications
You must be signed in to change notification settings - Fork 463
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
[Belt] Change ofArray to fromArray, and ofFoo to fromFoo in general #2590
Conversation
Discussed offline. Easier API to guess. Only changed the externally visible APIs. Didn't check in the JS files; too much noise for now.
jscomp/others/belt_MapInt.ml
Outdated
@@ -161,4 +161,5 @@ let getExn = I.getExn | |||
let split = I.split | |||
let mergeU = I.mergeU | |||
let merge = I.merge | |||
let fromArray = I.ofArray | |||
let ofArray = I.ofArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also change the internal I.ofArray
into I.fromArray
jscomp/others/belt_MapString.ml
Outdated
@@ -161,4 +161,5 @@ let getExn = I.getExn | |||
let split = I.split | |||
let mergeU = I.mergeU | |||
let merge = I.merge | |||
let fromArray = I.ofArray | |||
let ofArray = I.ofArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, maybe a global regex replace should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would accidentally grep the ofArray deprecation aliases & msgs if not careful, so I'm doing this semi-manually. Could have been a few clicks of merlin supported cross-file refactoring!
@@ -155,9 +155,11 @@ let removeMany (type key) (type id) (d : _ t) xs = | |||
(* let merge = I.merge *) | |||
|
|||
|
|||
let ofArray xs = | |||
let fromArray xs = | |||
t ~data:(I.ofArray xs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
see my comments, otherwise lgtm |
Guess I have to check in the JS artifacts after all, to make tests pass. I thought they were generated by CI on the fly but either Belt isn't or some of the tests aren't. Might create a few more conflicts while merging different diffs. |
Discussed offline. Easier API to guess. Only changed the externally visible APIs.
Didn't check in the JS files; too much noise for now.