angular/packages/compiler/src
Pete Bacon Darwin 3923201f95 refactor(compiler-cli): change how partial-linkers are matched to declaration versions (#41578)
Previously, it was not possible to block a partial-linker from trying to
process a declaration that was defined in a newer version of Angular than
that of the partial-linker. For example, if a partial-linker was published as
part of version 12.0.0, there was no way for a partially-compiled declaration
compiled via version 13.0.0 to tell the 12.0.0 linker that it would be invalid
to attempt to process it.

This commit adds a new `minVersion` property to partial-declarations, which is
interpreted as the "minimum partial-linker version" that can process this
declaration. When selecting a partial-linker for such a declaration, the known
linker version ranges are checked to find the most recent linker whose version
range has an overlap with the interpreted declaration range.

This approach allows us to set a minimum version for a declaration, which
can inform an old partial-linker that will it not be able to accurately
process the declaration.

Note that any pre-release part to versions are ignored in this selection
process.

The file-linker can be configured, via the `unknownDeclarationVersionHandling`
property of `LinkerOptions`, to handle such a situation in one of three ways:

- `error` - the version mismatch is a fatal error
- `warn` - a warning is sent to the logger but the most recent partial-linker
  will attempt to process the declaration anyway.
- `ignore` - the most recent partial-linker will, silently, attempt to process
  the declaration.

The default is to throw an error.

Closes #41497

PR Close #41578
2021-04-14 11:00:40 -07:00
..
aot feat(compiler): support nullish coalescing in templates (#41437) 2021-04-07 12:04:28 -07:00
compiler_util refactor(compiler): add an argumentSpan to the method call AST (#41581) 2021-04-13 12:39:17 -07:00
expression_parser fix(compiler): avoid parsing EmptyExpr with a backwards span (#41581) 2021-04-13 12:39:17 -07:00
i18n docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
jit docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
ml_parser fix(compiler): recover from an incomplete open tag at the end of a file (#41054) 2021-03-03 09:58:56 -08:00
output feat(compiler): support nullish coalescing in templates (#41437) 2021-04-07 12:04:28 -07:00
render3 refactor(compiler-cli): change how partial-linkers are matched to declaration versions (#41578) 2021-04-14 11:00:40 -07:00
schema fix(compiler): allow binding to autocomplete property on select and textarea elements (#40928) 2021-03-03 10:00:27 -08:00
template_parser fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
view_compiler fix(core): QueryList should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
assertions.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ast_path.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
chars.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compile_metadata.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
compile_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compiler.ts refactor(compiler-cli): introduce declaration function to declare class metadata (#41200) 2021-04-12 10:41:17 -07:00
compiler_facade_interface.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
config.ts refactor(compiler): remove extra imports (#37246) 2020-06-11 19:00:33 -07:00
constant_pool.ts refactor(compiler): remove unreachable code (#40984) 2021-03-01 15:29:20 -08:00
core.ts refactor(core): remove the need for ɵɵinjectPipeChangeDetectorRef() (#41231) 2021-03-30 16:46:37 -07:00
directive_normalizer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
identifiers.ts refactor(compiler-cli): introduce declaration function to declare class metadata (#41200) 2021-04-12 10:41:17 -07:00
injectable_compiler.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
injectable_compiler_2.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
jit_compiler_facade.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
lifecycle_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_resolver.ts fix(compiler-cli): show a more specific error for Ivy NgModules (#41534) 2021-04-13 07:34:45 -07:00
ng_module_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
parse_util.ts refactor(compiler): store the fullStart location on ParseSourceSpans (#39486) 2020-11-06 09:01:37 -08:00
pipe_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
provider_analyzer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
resource_loader.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
selector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadow_css.ts fix(compiler): correctly process multiple rules containing :host selectors (#41261) 2021-03-19 12:38:15 -07:00
style_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
style_url_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
summary_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_resolver.ts docs: remove unused "docregions" (#40479) 2021-01-20 16:12:15 -08:00
util.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00