Go to file
Alex Rickabaugh deacc741e0 fix(compiler-cli): ensure the compiler tracks `ts.Program`s correctly (#41291)
`NgCompiler` previously had a notion of the "next" `ts.Program`, which
served two purposes:

* it allowed a client using the `ts.createProgram` API to query for the
  latest program produced by the previous `NgCompiler`, as a starting
  point for building the _next_ program that incorporated any new user
  changes.

* it allowed the old `NgCompiler` to be queried for the `ts.Program` on
  which all prior state is based, which is needed to compute the delta
  from the new program to ultimately determine how much of the prior
  state can be reused.

This system contained a flaw: it relied on the `NgCompiler` knowing when
the `ts.Program` would be changed. This works fine for changes that
originate in `NgCompiler` APIs, but a client of the `TemplateTypeChecker`
may use that API in ways that create new `ts.Program`s without the
`NgCompiler`'s knowledge. This caused the `NgCompiler`'s concept of the
"next" program to get out of sync, causing incorrectness in future
incremental analysis.

This refactoring cleans up the compiler's `ts.Program` management in
several ways:

* `TypeCheckingProgramStrategy`, the API which controls `ts.Program`
  updating, is renamed to the `ProgramDriver` and extracted to a separate
  ngtsc package.

* It loses its responsibility of determining component shim filenames. That
  functionality now lives exclusively in the template type-checking package.

* The "next" `ts.Program` concept is renamed to the "current" program, as
  the "next" name was misleading in several ways.

* `NgCompiler` now wraps the `ProgramDriver` used in the
  `TemplateTypeChecker` to know when a new `ts.Program` is created,
  regardless of which API drove the creation, which actually fixes the bug.

PR Close #41291
2021-04-08 10:20:38 -07:00
.circleci ci: add cache for windows run (#41467) 2021-04-06 12:44:48 -07:00
.devcontainer build: update the recommended `Dockerfile` for VSCode remote development (#41396) 2021-04-05 12:41:34 -07:00
.github docs: use dedicated anchors for links to `CONTRIBUTING.md` (#41250) 2021-04-01 11:19:57 -07:00
.husky build: update to husky@5 (#39739) 2020-11-18 11:11:41 -08:00
.ng-dev build: add `dev-infra` and `docs-infra` as targetLabelExemptScopes (#41459) 2021-04-07 11:52:36 -07:00
.vscode build: use "outFiles" in .vscode/launch.json to speed up debugging sessions (#39848) 2020-12-17 11:23:13 -08:00
.yarn build: update to yarn v1.22.10 (#40562) 2021-01-26 10:52:27 -08:00
aio docs: fix typo in migration guide (#41447) 2021-04-07 13:51:08 -07:00
dev-infra feat(dev-infra): add support for `targetLabelExemptScopes` for merging (#41459) 2021-04-07 11:52:35 -07:00
docs docs: use dedicated anchors for links to `CONTRIBUTING.md` (#41250) 2021-04-01 11:19:57 -07:00
goldens refactor(core): rename `ɵɵInjectableDef` interface to `ɵɵInjectableDeclaration` (#41316) 2021-04-07 13:57:12 -07:00
integration refactor(compiler-cli): implement `ɵɵngDeclareFactory` (#41231) 2021-03-30 16:46:37 -07:00
modules fix(dev-infra): update build tooling for latest changes in rules_nodejs (#40710) 2021-02-09 10:48:43 -08:00
packages fix(compiler-cli): ensure the compiler tracks `ts.Program`s correctly (#41291) 2021-04-08 10:20:38 -07:00
scripts build: correctly publish `angular-in-memory-web-api` as CI build artifact (#41429) 2021-04-06 10:22:54 -07:00
third_party test(core): fix `Function#name` shim used in IE11 (#41439) 2021-04-05 08:56:17 -07:00
tools build: rely on engines to prevent using npm for dependency install (#41477) 2021-04-07 12:05:01 -07:00
.bazelignore ci: add integration test for Angular Elemens with SSR (#40559) 2021-02-12 08:55:25 -08:00
.bazelrc build: emit performance JSON file for each ng_module() (#41125) 2021-03-24 13:42:25 -07:00
.bazelversion build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
.clang-format feat(tooling): Add a .clang-format for automated JavaScript formatting. 2015-04-02 08:44:34 -07:00
.editorconfig build: use https link to editorconfig.org in .editorconfig (#27664) 2018-12-18 09:30:09 -08:00
.gitattributes test: fix ts api guardian and public guard tests on windows (#30105) 2019-04-26 16:32:22 -07:00
.gitignore fix(dev-infra): add vim .swp files to gitignore (#40094) 2020-12-14 11:39:41 -08:00
.gitmessage fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
.mailmap build: add a Git .mailmap with my new name (#19550) 2017-10-09 14:35:30 -07:00
.npmrc build: rely on engines to prevent using npm for dependency install (#41477) 2021-04-07 12:05:01 -07:00
.nvmrc build: migrate to node@12.14.1 (#34955) 2020-01-27 09:31:22 -08:00
.pullapprove.yml ci: add Zach Arend to pullapprove (#41386) 2021-04-01 12:06:17 -07:00
.yarnrc build: update to yarn v1.22.10 (#40562) 2021-01-26 10:52:27 -08:00
BUILD.bazel test(upgrade): run tests against AngularJS v1.8.x as well (#39972) 2020-12-07 09:40:49 -08:00
CHANGELOG.md release: cut the v12.0.0-next.8 release (#41493) 2021-04-07 11:40:31 -07:00
CODE_OF_CONDUCT.md docs: add Discord as an official communication channel (#39149) 2020-10-14 10:23:15 -07:00
CONTRIBUTING.md docs: add link to fork repo how-to (#41266) 2021-03-23 11:22:31 -07:00
LICENSE docs: update the copyright notice date (#40707) 2021-02-16 10:04:23 -08:00
README.md docs: document `help wanted` and `good first issue` labels (#41195) 2021-03-15 10:31:29 -07:00
WORKSPACE build: update to rules_nodejs@3.2.1 (#40972) 2021-02-24 08:00:03 -08:00
browser-providers.conf.js ci: remove IE 9 and IE 10 from CI (#38931) 2020-09-25 14:31:10 -04:00
gulpfile.js build: remove check-env script (#39980) 2020-12-07 09:48:11 -08:00
karma-js.conf.js test(core): tag `render3` test targets as ivy-only (#40127) 2021-01-06 08:28:03 -08:00
package.json build: rely on engines to prevent using npm for dependency install (#41477) 2021-04-07 12:05:01 -07:00
renovate.json ci: add renovate (#41407) 2021-04-02 15:47:33 -07:00
test-events.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test-main.js feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08:00
tslint.json build: exclude build-worker file from formatting (#40012) 2020-12-08 12:06:53 -08:00
yarn.lock build: update to husky@6 (#41405) 2021-04-06 10:02:51 -07:00
yarn.lock.readme.md build: remove travisci leftovers (#27979) 2019-01-09 10:41:16 -08:00

README.md

Angular - One framework. Mobile & desktop.

angular-logo
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.

www.angular.io

Contributing Guidelines · Submit an Issue · Blog

CI status   Angular on npm   Discord conversation


Documentation

Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.

Advanced

Development Setup

Prerequisites

Setting Up a Project

Install the Angular CLI globally:

npm install -g @angular/cli

Create workspace:

ng new [PROJECT NAME]

Run the application:

cd [PROJECT NAME]
ng serve

Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.

Quickstart

Get started in 5 minutes.

Ecosystem

angular ecosystem logos

Changelog

Learn about the latest improvements.

Upgrading

Check out our upgrade guide to find out the best way to upgrade your project.

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules and more.

Want to Help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

Code of Conduct

Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.

Community

Join the conversation and help the community.

Love Angular badge

Love Angular? Give our repo a star ⬆️.