Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Drop passPerPreset #102

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Conversation

taion
Copy link
Contributor

@taion taion commented Mar 7, 2017

Babel plugin execution ordering is sufficient to ensure that the Relay transform runs before the template literal transform when used as follows. As such, specifying passPerPreset is unnecessary, and dropping it avoids a number of problems that arise when using passPerPreset.

We've been running like this for some time now, so we figured it'd be nicer to update documentation to reflect what should be current best practices.

@facebook-github-bot
Copy link

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.

@taion
Copy link
Contributor Author

taion commented Mar 27, 2017

? I'm CLAed up

@facebook-github-bot
Copy link

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

@taion
Copy link
Contributor Author

taion commented Apr 6, 2017

Does this look okay? It's a pretty small change, and it should make life better for whoever is still trying to ramp up on Relay 1.

@kassens
Copy link
Contributor

kassens commented Apr 6, 2017

Sounds good, not really sure why it was added.

@kassens kassens merged commit 4058f35 into facebookarchive:master Apr 6, 2017
@taion taion deleted the drop-passPerPreset branch April 6, 2017 00:35
@taion
Copy link
Contributor Author

taion commented Apr 6, 2017

I think it might have been a misinterpretation of (lack of) Babel ordering guarantees. Babel doesn't strictly order transforms as atomic units, but it does impose weaker ordering guarantees, which are sufficient here, since the Relay transform only needs to run before the template literal one, but both operate on the same type of node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants