-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Support for defineEnumerableProperties #12703
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@ericvicenti has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This looks pretty safe and well-documented so I'm gonna push this through. But ideally I think we should share the implementation on with babel-helpers. cc @bestander |
@ericvicenti I agree, sharing the babel implementation of the helpers just make sense, and could prevent future issues for other use cases. Here is a similar case for an earlier rn version #4844. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
I find it very odd that such a minor addition would cause build failure. Anything I can do to move this along @ericvicenti? |
I am not familiar with how this works, I take it the pull request was rejected? |
Summary: **Motivation** detailed in #12702. **Test plan** 1) running [a piece of code](mobxjs/mobx#839 (comment)) that utilizes the helper without any modifications on the react native package results an error being thrown. ![b589a71-0041-11e7-9d47-cb79efff3ba5](https://cloud.githubusercontent.com/assets/23000873/23579517/3c8fe992-0100-11e7-9eb5-93c47f3df3e0.png) 2) updating the list of helpers available by adding the definition of `defineEnumerableProperties` as provided by babel [babel/babel/packages/babel-helpers/src/helpers.js](https://github.com/babel/babel/blob/master/packages/babel-helpers/src/helpers.js#L275-L285) results no errors. ![kapture 2017-03-04 at 16 48 35](https://cloud.githubusercontent.com/assets/23000873/23579520/457b8ca0-0100-11e7-8ca4-c704c6e9631f.gif) Closes #12703 Differential Revision: D4658120 Pulled By: ericvicenti fbshipit-source-id: 914aed4d313b3cc4f7ab99049d05d0aef269a3be
Nope, this was landed! I had to retry it because there was a flaky test failure that prevented it from landing the first time |
Summary: **Motivation** detailed in facebook#12702. **Test plan** 1) running [a piece of code](mobxjs/mobx#839 (comment)) that utilizes the helper without any modifications on the react native package results an error being thrown. ![b589a71-0041-11e7-9d47-cb79efff3ba5](https://cloud.githubusercontent.com/assets/23000873/23579517/3c8fe992-0100-11e7-9eb5-93c47f3df3e0.png) 2) updating the list of helpers available by adding the definition of `defineEnumerableProperties` as provided by babel [babel/babel/packages/babel-helpers/src/helpers.js](https://github.com/babel/babel/blob/master/packages/babel-helpers/src/helpers.js#L275-L285) results no errors. ![kapture 2017-03-04 at 16 48 35](https://cloud.githubusercontent.com/assets/23000873/23579520/457b8ca0-0100-11e7-8ca4-c704c6e9631f.gif) Closes facebook#12703 Differential Revision: D4658120 Pulled By: ericvicenti fbshipit-source-id: 914aed4d313b3cc4f7ab99049d05d0aef269a3be
Motivation
detailed in #12702.
Test plan
defineEnumerableProperties
as provided by babel babel/babel/packages/babel-helpers/src/helpers.js results no errors.