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

[PERF] Guard against poorly optimized babel output #4950

Merged
merged 1 commit into from
Apr 27, 2017

Conversation

runspired
Copy link
Contributor

This PR will fail to build until we have fixed all the locations in which our babel compilation step is producing sub-optimal output to handle let and const closures.

When this PR is green, we can merge it and gain perfs.

cc @stefanpenner

@stefanpenner
Copy link
Member

the thrown error is good (from ci):

The Broccoli Plugin: [broccoli-persistent-filter:Babel] failed with:
SyntaxError: ember-data/serializers/rest.js: Compiling let/const in this block would add a closure (throwIfClosureRequired).
  254 |     let keys = Object.keys(payload);
  255 | 
> 256 |     for (let i = 0, length = keys.length; i < length; i++) {
      |                                                            ^
  257 |       let prop = keys[i];
  258 |       let modelName = prop;
  259 |       let forcedSecondary = false;

@stefanpenner
Copy link
Member

@runspired should i fix?

@runspired
Copy link
Contributor Author

@stefanpenner yes. However, it stops the build on the first error encountered, you may just encounter the next one :)

@stefanpenner
Copy link
Member

looking now

@stefanpenner
Copy link
Member

this made me finally fix: broccolijs/broccoli-persistent-filter@d7ab2d1 :trollface:

@stefanpenner
Copy link
Member

oops broke something...

@stefanpenner
Copy link
Member

oops broke something...

fixed locally, lets see what try says.

@stefanpenner stefanpenner merged commit 4304c47 into emberjs:master Apr 27, 2017
@stefanpenner stefanpenner deleted the fix/error-on-let-closures branch April 27, 2017 22:14
@runspired
Copy link
Contributor Author

Thanks @stefanpenner :)

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