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

[Belt] Change ofArray to fromArray, and ofFoo to fromFoo in general #2590

Merged
merged 5 commits into from
Mar 8, 2018

Conversation

chenglou
Copy link
Member

@chenglou chenglou commented Mar 7, 2018

Discussed offline. Easier API to guess. Only changed the externally visible APIs.

Didn't check in the JS files; too much noise for now.

Discussed offline. Easier API to guess. Only changed the externally visible APIs.

Didn't check in the JS files; too much noise for now.
@@ -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
Copy link
Member

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

@@ -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
Copy link
Member

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

Copy link
Member Author

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)
Copy link
Member

Choose a reason for hiding this comment

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

same

@bobzhang
Copy link
Member

bobzhang commented Mar 8, 2018

see my comments, otherwise lgtm

@chenglou
Copy link
Member Author

chenglou commented Mar 8, 2018

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.

@chenglou chenglou merged commit 3f6f686 into rescript-lang:master Mar 8, 2018
@chenglou chenglou deleted the from branch March 8, 2018 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