Skip to content

Commit 48aa96e

Browse files
alan-agius4alxhub
authored andcommitted
refactor: remove Angular Compatibility Compiler (ngcc) (#49101)
This commit removes the NGCC code and all the related infra setup required to support it. BREAKING CHANGE: Angular Compatibility Compiler (ngcc) has been removed and as a result Angular View Engine libraries will no longer work PR Close #49101
1 parent 9105c41 commit 48aa96e

File tree

196 files changed

+202
-53383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+202
-53383
lines changed

.bazelignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ integration/ng_elements/node_modules
3131
integration/ng_elements_schematics/node_modules
3232
integration/ng_update/node_modules
3333
integration/ng_update_migrations/node_modules
34-
integration/ngcc/node_modules
3534
integration/platform-server/node_modules
3635
integration/service-worker-schema/node_modules
3736
integration/side-effects/node_modules

.ng-dev/commit-message.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const commitMessage: CommitMessageConfig = {
2525
'language-service',
2626
'localize',
2727
'migrations',
28-
'ngcc',
2928
'packaging',
3029
'platform-browser',
3130
'platform-browser-dynamic',

.ng-dev/google-sync-config.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
"packages/bazel/src/protractor/**",
1212
"packages/bazel/src/schematics/**",
1313
"packages/bazel/src/types_bundle/**",
14-
"packages/compiler-cli/src/ngcc/**",
1514
"packages/compiler-cli/linker/**",
16-
"packages/compiler-cli/ngcc/**",
1715
"packages/compiler-cli/src/ngtsc/sourcemaps/**",
1816
"packages/compiler-cli/src/ngtsc/testing/**",
1917
"packages/compiler-cli/private/bazel.ts",

.pullapprove.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ groups:
149149
<<: *defaults
150150
conditions:
151151
- >
152-
contains_any_globs(files.exclude('packages/compiler-cli/ngcc/*'), [
152+
contains_any_globs(files, [
153153
'packages/compiler/**/{*,.*}',
154154
'packages/examples/compiler/**/{*,.*}',
155155
'aio/content/examples/angular-compiler-options/**/{*,.*}',
@@ -166,18 +166,6 @@ groups:
166166
- atscott
167167
- JoostK
168168

169-
# =========================================================
170-
# Framework: Compiler / ngcc
171-
# =========================================================
172-
fw-ngcc:
173-
<<: *defaults
174-
conditions:
175-
- files.include('packages/compiler-cli/ngcc/*')
176-
reviewers:
177-
users:
178-
- alxhub
179-
- JoostK
180-
181169
# =========================================================
182170
# Framework: Migrations
183171
# =========================================================

CONTRIBUTING.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ The `footer` is optional. The [Commit Message Footer](#commit-footer) format des
246246
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
247247
│ elements|forms|http|language-service|localize|platform-browser|
248248
│ platform-browser-dynamic|platform-server|router|service-worker|
249-
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
249+
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|
250250
│ devtools
251251
252252
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
@@ -306,10 +306,6 @@ There are currently a few exceptions to the "use package name" rule:
306306
307307
* `migrations`: used for changes to the `ng update` migrations.
308308
309-
* `ngcc`: used for changes to the [Angular Compatibility Compiler](./packages/compiler-cli/ngcc/README.md)
310-
311-
* `ve`: used for changes specific to ViewEngine (legacy compiler/renderer).
312-
313309
* `devtools`: used for changes in the [browser extension](./devtools/README.md).
314310
315311
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).

aio/content/guide/glossary.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,6 @@ Install Angular libraries with the [npm package manager][NpmjsDocsAboutNpm] and
500500

501501
Compare to [NgModule][AioGuideGlossaryNgmodule].
502502

503-
## ngcc
504-
505-
Angular compatibility compiler.
506-
If you build your application using [Ivy][AioGuideGlossaryIvy], but it depends on libraries that have not been compiled with Ivy, the Angular CLI uses `ngcc` to automatically update the dependent libraries to use Ivy.
507-
508503
## NgModule
509504

510505
A class definition preceded by the `@NgModule()` [decorator][AioGuideGlossaryDecoratorDecoration], which declares and serves as a manifest for a block of code dedicated to an application domain, a workflow, or a closely related set of capabilities.
@@ -1085,7 +1080,6 @@ Learn more about zones in this [Brian Ford video][YoutubeWatchV3iqtmusceU].
10851080
[AioGuideGlossaryLibrary]: guide/glossary#library "library - Glossary | Angular"
10861081
[AioGuideGlossaryM]: guide/glossary#module "M - Glossary | Angular"
10871082
[AioGuideGlossaryModule]: guide/glossary#module "module - Glossary | Angular"
1088-
[AioGuideGlossaryN]: guide/glossary#ngcc "N - Glossary | Angular"
10891083
[AioGuideGlossaryNgmodule]: guide/glossary#ngmodule "NgModule - Glossary | Angular"
10901084
[AioGuideGlossaryNpmPackage]: guide/glossary#npm-package "npm package - Glossary | Angular"
10911085
[AioGuideGlossaryO]: guide/glossary#observable "O - Glossary | Angular"
@@ -1212,4 +1206,4 @@ Learn more about zones in this [Brian Ford video][YoutubeWatchV3iqtmusceU].
12121206

12131207
<!-- end links -->
12141208

1215-
@reviewed 2022-02-28
1209+
@reviewed 2023-02-16

aio/content/guide/migration-module-with-providers.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,10 @@ It should match the type of whichever `NgModule` is returned in the `ModuleWithP
7171

7272
Libraries should add the generic type to any usages of the `ModuleWithProviders` type.
7373

74-
## What about applications using non-migrated libraries?
75-
76-
The [Angular compatibility compiler](guide/glossary#ngcc) \(`ngcc`\) should automatically transform any non-migrated libraries to generate the proper code.
77-
7874
<!-- links -->
7975

8076
<!-- external links -->
8177

8278
<!-- end links -->
8379

84-
@reviewed 2022-02-28
80+
@reviewed 2023-02-16

aio/content/guide/migration-undecorated-classes.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,10 @@ Classes that don't use Angular features don't need an Angular decorator.
198198
As support for selectorless decorators is introduced in Angular version 9, if you want to support Angular version 8 and earlier, you shouldn't add a selectorless `@Directive()` decorator.
199199
You can either add `@Directive()` with a selector or move the Angular-specific features to affected subclasses.
200200

201-
## What about applications using non-migrated libraries?
202-
203-
The [Angular compatibility compiler](guide/glossary#ngcc) \(`ngcc`\) should automatically transform any non-migrated libraries to generate the proper code.
204-
205201
<!-- links -->
206202

207203
<!-- external links -->
208204

209205
<!-- end links -->
210206

211-
@reviewed 2022-02-28
207+
@reviewed 2023-02-16

aio/content/guide/roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ As the next step, we need to finalize the recommendations and compile a list of
217217

218218
Earlier in 2020, we shared an [RFC](https://github.com/angular/angular/issues/38366) for Ivy library distribution.
219219
After invaluable feedback from the community, we developed a design of the project.
220-
We are now investing in the development of Ivy library distribution, including an update of the library package format to use Ivy compilation, unblock the deprecation of the View Engine library format, and [ngcc](guide/glossary#ngcc).
220+
We are now investing in the development of Ivy library distribution, including an update of the library package format to use Ivy compilation, unblock the deprecation of the View Engine library format, and ngcc.
221221

222222
### Improve test times and debugging with automatic test environment tear down
223223

aio/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
"npm": "Please use yarn instead of NPM to install dependencies"
6161
},
6262
"private": true,
63+
"// resolutions": "Temp resolutions until CLI releases v16.0.0-next.0",
64+
"resolutions": {
65+
"@ngtools/webpack": "https://github.com/angular/ngtools-webpack-builds.git#c784933671856a6529d7dd560ba1026890898f57"
66+
},
6367
"dependencies": {
6468
"@angular/animations": "15.2.0-next.4",
6569
"@angular/cdk": "15.2.0-next.4",

0 commit comments

Comments
 (0)