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

feat(angular): rename projects for better report readability #845

Merged
merged 7 commits into from
Feb 6, 2021

Conversation

meeroslav
Copy link
Contributor

@meeroslav meeroslav commented Dec 30, 2020

This PR consists of the following changes:

  • All keyed angular projects updated to v11
  • Closure projects updated to the latest google closure compiler and rollup for dev
  • Dev serve for rollup fixed, you can now run your rollup projects in dev mode
  • Titles and folders renamed to match the intent angular-{closure}-{nozone}
  • PlatformBrowserDynamic replaced with PlaformBrowser as there are no dynamic components

@krausest
Copy link
Owner

krausest commented Jan 9, 2021

I'm planning to remove the angular 8 implementations, since we should focus on the current version. Sadly so far I failed to create an angular 11 closure build. Do you have any pointers or can you contribute such an implementation (the regular "angular-closure" one would suffice) ?

@meeroslav
Copy link
Contributor Author

meeroslav commented Jan 22, 2021

I will migrate two closure projects to ng11, hopefully in a few days. Sorry for the late reply.

I hope it's ok to make it part of this PR

@krausest
Copy link
Owner

That sounds great!

@krausest
Copy link
Owner

Thanks, but the closure builds do not work properly on my machine. Can you please take a look at it?

zone.min.js:21 Unhandled Promise rejection: R3InjectorError(lk)[Hk -> zk -> Bj -> InjectionToken Application Initializer -> InjectionToken Application Initializer -> InjectionToken Application Initializer]: 
  NullInjectorError: No provider for InjectionToken Application Initializer! ; Zone: <root> ; Task: Promise.then ; Value: NullInjectorError: R3InjectorError(lk)[Hk -> zk -> Bj -> InjectionToken Application Initializer -> InjectionToken Application Initializer -> InjectionToken Application Initializer]: 
  NullInjectorError: No provider for InjectionToken Application Initializer!
    at Sg.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:157:226)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:161:153)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:161:153)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:161:153)
    at Wc (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:54:430)
    at O (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:55:51)
    at Xc (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:55:456)
    at Object.d [as g] (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:168:360)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:160:430)
    at Wc (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:54:430) NullInjectorError: R3InjectorError(lk)[Hk -> zk -> Bj -> InjectionToken Application Initializer -> InjectionToken Application Initializer -> InjectionToken Application Initializer]: 
  NullInjectorError: No provider for InjectionToken Application Initializer!
    at Sg.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:157:226)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:161:153)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:161:153)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:161:153)
    at Wc (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:54:430)
    at O (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:55:51)
    at Xc (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:55:456)
    at Object.d [as g] (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:168:360)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:160:430)
    at Wc (http://localhost:8080/frameworks/keyed/angular-closure/dist/bundle.js:54:430)
bundle.js:157 Uncaught (in promise) NullInjectorError: R3InjectorError(lk)[Hk -> zk -> Bj -> InjectionToken Application Initializer -> InjectionToken Application Initializer -> InjectionToken Application Initializer]: 
  NullInjectorError: No provider for InjectionToken Application Initializer!
    at Sg.get (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:157:226)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:161:153)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:161:153)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:161:153)
    at Wc (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:54:430)
    at O (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:55:51)
    at Xc (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:55:456)
    at Object.d [as g] (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:168:360)
    at bh.get (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:160:430)
    at Wc (http://localhost:8080/frameworks/keyed/angular-closure-nozone/dist/bundle.js:54:430)

@meeroslav
Copy link
Contributor Author

Can you tell me what OS and node version you use?

@krausest
Copy link
Owner

The error happens on Fedora 33 (on my notebook, both with node 14.13.0 and node 15.7.0) and in the docker container with an Ubuntu 20.10 (node 14.4.0).

@meeroslav
Copy link
Contributor Author

meeroslav commented Feb 5, 2021

The problem is with Closure ADVANCED_OPTIMIZATIONS/ Typescript 3.9+ incompatibility. I was using stale node_modules so my local version was still running.

The support for the Closure compiler in Angular packages has been broken for quite some time. As of TS3.9 Closure is unusable with the JavaScript emit. Please follow microsoft/TypeScript#38374 for further developments.

Meanwhile, I have switched to using SIMPLE_OPTIMIZATIONS. This way the solution works, but we lose the granular tree shaking and uglification. Unless this gets resolved fast on the TS side, I'd recommend removing the two closure projects.

@krausest krausest merged commit 09eb114 into krausest:master Feb 6, 2021
@krausest
Copy link
Owner

krausest commented Feb 6, 2021

Thanks - that's very interesting. I wouldn't have thought that closure performs so poor with SIMPLE_OPTIMIZATIONS.

I'll remove the closure versions.

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