Go to file
Alex Rickabaugh 0823622202 fix(compiler-cli): track poisoned scopes with a flag (#39923)
To avoid overwhelming a user with secondary diagnostics that derive from a
"root cause" error, the compiler has the notion of a "poisoned" NgModule.
An NgModule becomes poisoned when its declaration contains semantic errors:
declarations which are not components or pipes, imports which are not other
NgModules, etc. An NgModule also becomes poisoned if it imports or exports
another poisoned NgModule.

Previously, the compiler tracked this poisoned status as an alternate state
for each scope. Either a correct scope could be produced, or the entire
scope would be set to a sentinel error value. This meant that the compiler
would not track any information about a scope that was determined to be in
error.

This method presents several issues:

1. The compiler is unable to support the language service and return results
when a component or its module scope is poisoned.

This is fine for compilation, since diagnostics will be produced showing the
error(s), but the language service needs to still work for incorrect code.

2. `getComponentScopes()` does not return components with a poisoned scope,
which interferes with resource tracking of incremental builds.

If the component isn't included in that list, then the NgModule for it will
not have its dependencies properly tracked, and this can cause future
incremental build steps to produce incorrect results.

This commit changes the tracking of poisoned module scopes to use a flag on
the scope itself, rather than a sentinel value that replaces the scope. This
means that the scope itself will still be tracked, even if it contains
semantic errors. A test is added to the language service which verifies that
poisoned scopes can still be used in template type-checking.

PR Close #39923
2020-12-03 13:42:13 -08:00
.circleci ci: remove unnecessary retry for docs examples tests (#39905) 2020-12-01 11:39:49 -08:00
.devcontainer build: update the recommended `Dockerfile` for VSCode remote development (#34697) 2020-01-09 13:31:14 -08:00
.github ci: update angular-robot config for L2 triage of PRs (#39655) 2020-11-13 13:40:05 -08:00
.husky build: update to husky@5 (#39739) 2020-11-18 11:11:41 -08:00
.ng-dev build: define the package building function for ng-dev release tooling (#39711) 2020-11-23 12:07:39 -08:00
.vscode docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
.yarn build: update to latest version of yarn (#38869) 2020-09-18 16:47:33 -07:00
aio docs: add alvarocamillont to GDE resources (#39138) 2020-12-03 10:43:03 -08:00
dev-infra build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
docs docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
goldens fix(core): remove application from the testability registry when the root view is removed (#39876) 2020-12-02 12:56:04 -08:00
integration test(compiler-cli): add TypeScript 4.1 typings integration test (#39571) 2020-11-25 11:10:01 -08:00
modules build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
packages fix(compiler-cli): track poisoned scopes with a flag (#39923) 2020-12-03 13:42:13 -08:00
scripts build: define the package building function for ng-dev release tooling (#39711) 2020-11-23 12:07:39 -08:00
third_party docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
tools build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
.bazelignore build: add npm package manifest to npm_integration_test (#35669) 2020-02-26 12:58:35 -08:00
.bazelrc build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#39182) 2020-10-08 11:54:59 -07:00
.bazelversion build: update bazelversion (#39351) 2020-10-21 11:59:40 -07: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 build: add husky ignored files to .gitignore (#39388) 2020-10-27 11:07:22 -07: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
.nvmrc build: migrate to node@12.14.1 (#34955) 2020-01-27 09:31:22 -08:00
.pullapprove.yml build: update to husky@5 (#39739) 2020-11-18 11:11:41 -08:00
.yarnrc build: update to latest version of yarn (#38869) 2020-09-18 16:47:33 -07:00
BUILD.bazel build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#39182) 2020-10-08 11:54:59 -07:00
CHANGELOG.md release: cut the v11.1.0-next.1 release (#39932) 2020-12-02 10:40:10 -08: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 an exception for accepting contributions (#39611) 2020-11-24 08:40:22 -08:00
LICENSE docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
README.md docs: typo fix for 'Intall' (#39585) 2020-11-06 09:16:04 -08:00
WORKSPACE build: update bazelversion (#39351) 2020-10-21 11:59:40 -07: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: revert back to downloading cldr-data directly rather than via npm (#39341) 2020-10-20 10:46:19 -07:00
karma-js.conf.js fix(core): detect DI parameters in JIT mode for downleveled ES2015 classes (#38463) 2020-08-17 10:55:37 -07:00
package.json release: cut the v11.1.0-next.1 release (#39932) 2020-12-02 10:40:10 -08:00
test-events.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test-main.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
tslint.json test(compiler-cli): create "full compile" compliance test rules (#39617) 2020-11-13 11:25:56 -08:00
yarn.lock build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08: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

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 in the hotlist: community-help.

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 ⬆️.