-
Notifications
You must be signed in to change notification settings - Fork 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
fix(closure): don't throw at top-level scope #2546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks ok to me.
Note, this is the minimal fix. You could instead just avoid throwing an exception: it's unclear from module semantics whether such a throw will abort execution of this one module, or the loading of the whole program. You'd be just as well with a runtime error when attempting to access the |
Hold on merging this please, it looks like there is still an issue with closure compiler in the newest release. I'll figure it out tomorrow... |
1) don't throw at top-level scope. Closure compiler does not allow this if a goog.module statement is present in the file. We need this modification to use RxJS with angular/tsickle. Addresses angular/tsickle#420 2) refactor the conditional logic for finding the root object See alexeagle/closure-compiler-angular-bundling#15 Closure seems to statically reduce the existing code and eliminates the conditional, making it always throw.
okay, fixed now @benlesh. |
Yeah, overall this throwing seems odd (I probably added it). I've often wondered if we could get around this whole This LGTM tho, next patch version. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closure compiler does not allow this. We need this modification to use RxJS in Angular projects.
Addresses angular/tsickle#420
Description:
Related issue (if exists):