-
Notifications
You must be signed in to change notification settings - Fork 47.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
React cannot be compiled with latest Google Closure Compiler #7551
Comments
Do you know how to fix this? |
No, sorry. Removing the |
I think that the annotation should be removed. It is apparently Closure-Compiler-speific (https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#nosideeffects-modifies-thisarguments), but it currently serves no other purpose than to break the minification. |
See also #824 |
Can you please send a PR removing all GCC annotations? |
I'd appreciate if someone else could create the PR, because I don't want to sign the CLA. |
Probably I can do it |
Still failing with React 15.3.2 (as well as 15.4.0-rc.2) and Closure Compiler v20161024. |
Since nobody worked on it, the issue did not advance. If you'd like to contribute please feel free to. |
@gaearon now i'm working on removing GCC anotations and plan to create pr tomottow or day after |
thanks @Shastel |
Thanks! |
Hey guys what's the current status? |
Hi, just bumped into this. After removing the I see there's a commit above but there doesn't seem to be a PR (?), happy to contribute if needed. |
Fixed via #8882 |
Yep, thank you! |
the @nosideeffects annotation is still showing up in the current create-react-class npm package (15.5.2) and, thus, is still breaking my build :( |
Thank you |
Sorry about that. Want to send a PR against |
@gaearon i will do it |
thank you guys for the prompt attention. @gaearon I'm a little star struck, I've been an admirer ever since the original redux presentation. fwiw it appears that create-react-class just needs to be republished with the current class -- though it's not clear to me how that package is being generated. |
@elijahsmith it's a little confusing since the addon doesn't live in the master branch anymore. You can find it on the 15.5-dev branch in the addons folder: https://github.com/facebook/react/tree/15.5-dev/addons/create-react-class |
I'm finally getting back around to this after some distractions. I noticed that a new version of create-react-class had been published to npm, but it looks like it's still based on the 15.5.0 code. Is this as simple as creating a PR with the dependencies in the create-react-class package.json updated? I can take a crack at that if so... what branch should it be made against? |
we are blocked on this issue (our build system relies on the Closure Compiler, and some of our dependencies use create-react-class). Is there anything I can do to help this process forward? |
Merged #9933, will be out soon. |
This should be fixed in |
Now, GCC complains about trailing commas in object literals:
The error positions seem to be wrong though. |
If we fix those trailing commas, are there any more issues? It's a bit frustrating we don't have the whole list of issues and have to fix them one by one. |
@gaearon is React 15 supports ie8 and bellow? |
No. |
@gaearon so, we can ignore GCC warn about ie8 |
Ah, I see. Regardless, this was easy to fix, so I added the fix for 15.6.0 final (which I'll cut soon). |
It's not a warning, it's an error. The behavior depends on the language level that is set for GCC. |
Sorry, I haven't published the version without trailing commas yet. Doing some final testing. |
You can always check the results using http://closure-compiler.appspot.com/home#code or https://developers.google.com/closure/compiler/docs/api-tutorial1 |
|
Works fine AFAICT, thanks! |
Thanks for reporting all the issues! Sorry we haven't been acting very fast. The good news is we revamped how addons are built, so it's very unlikely we'll have more issues there, and if you find something, we'll be able to fix them much faster now. |
The same problem bundler: webpack 4.0.1
|
When trying to compile React 15.3.1 with the latest Closure Compiler, the following output is produced:
The last one is an errors, the others are warnings.
To reproduce:
The text was updated successfully, but these errors were encountered: