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

Support for defineEnumerableProperties #12703

Closed
wants to merge 1 commit into from
Closed

Support for defineEnumerableProperties #12703

wants to merge 1 commit into from

Conversation

sonaye
Copy link
Contributor

@sonaye sonaye commented Mar 4, 2017

Motivation
detailed in #12702.

Test plan

  1. running a piece of code that utilizes the helper without any modifications on the react native package results an error being thrown.

b589a71c-0041-11e7-9d47-cb79efff3ba5

  1. updating the list of helpers available by adding the definition of defineEnumerableProperties as provided by babel babel/babel/packages/babel-helpers/src/helpers.js results no errors.

kapture 2017-03-04 at 16 48 35

@facebook-github-bot
Copy link
Contributor

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.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Mar 4, 2017
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Mar 6, 2017
@facebook-github-bot
Copy link
Contributor

@ericvicenti has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ericvicenti
Copy link
Contributor

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

@sonaye
Copy link
Contributor Author

sonaye commented Mar 6, 2017

@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.

@facebook-github-bot
Copy link
Contributor

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.

@facebook-github-bot facebook-github-bot added Import Failed and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Mar 6, 2017
@sonaye
Copy link
Contributor Author

sonaye commented Mar 6, 2017

I find it very odd that such a minor addition would cause build failure. Anything I can do to move this along @ericvicenti?

@sonaye
Copy link
Contributor Author

sonaye commented Mar 7, 2017

I am not familiar with how this works, I take it the pull request was rejected?

facebook-github-bot pushed a commit that referenced this pull request Mar 7, 2017
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
@ericvicenti
Copy link
Contributor

ericvicenti commented Mar 7, 2017

Nope, this was landed! I had to retry it because there was a flaky test failure that prevented it from landing the first time

jaredru pushed a commit to Remitly/react-native that referenced this pull request May 9, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants