Metadata version changed to 2 in 2.2.2, breaking consumers with older versions
See original GitHub issueI’m submitting a …
[x] bug report
[ ] feature request
[ ] support request
Current behavior Metadata built with Angular >= 2.2.2 comes out with version 2 due to dddbb1c1cb08115f339e34487774c85a3c6493f3. An application with Angular <= 2.2.1 won’t be able to consume this metadata, throwing the following error:
Error: Metadata version mismatch for module /home/local/TELERIK/tsonev/gitlab/angular-aot/node_modules/@progress/kendo-angular-buttons/dist/es/button.service.d.ts, found version 2, expected 1
at StaticReflector.getModuleMetadata (/home/local/TELERIK/tsonev/gitlab/angular-aot/node_modules/@angular/compiler-cli/src/static_reflector.js:500:23)
Expected behavior Metadata version shouldn’t change in a patch or minor releases.
Minimal reproduction of the problem with instructions Try to consumе this dummy package built with 2.2.2 in a project with 2.2.1. You can see that the metadata is set to version 2.
What is the motivation / use case for changing the behavior? Avoiding breaking changes.
Please tell us about your environment: any
-
Angular version: 2.2.2
-
Browser: all
-
Language: TypeScript 2.x
-
Node (for AoT issues):
node --version
=
Issue Analytics
- State:
- Created 7 years ago
- Reactions:12
- Comments:20 (9 by maintainers)
Top Results From Across the Web
python - pip has problems with metadata - Stack Overflow
2 ', but metadata has '22.1.2' and pip goes into a download loop trying older and older versions... Dependencies are NP-complete... Ther scr ......
Read more >Changes — Flask Documentation (2.2.x)
Changes ¶. Version 2.2.3¶. Unreleased. Version 2.2.2¶. Released 2022-08-08. Update Werkzeug dependency to >= 2.2.2. This includes fixes related to the new ...
Read more >Release Notes — Airflow Documentation
X to 2.X breaking changes. Bug Fixes¶. Fix exception in mini task scheduler (#24865).
Read more >Release notes & updates – Azure CLI - Microsoft Learn
Synapse. [BREAKING CHANGE] az synapse role assignment create : Role names at old version are not allowed, Sql Admin, Apache Spark Admin ...
Read more >Changelog • devtools
devtools 2.2.2 ... There have been a number of breaking changes in this release, ... Fix test() compatibility with testthat versions 1.0.2 (#1503)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As a package publisher, we don’t know which version of Angular 2 the consumer is using. Yet, we have to ship metadata as part of our packages to make them usable with AoT compilation. This makes metadata part of the public API, albeit indirectly.
Thus we have two choices:
You can see where I’m going. If a version of Angular forces us to introduce a breaking change then it must be a breaking change itself.
Welcome to the world of “third-party” vendors 😃
@bahodirk The problem is that we didn’t pin the version of
@angular/tsc-wrapped
in@angular/compiler-cli
…FYI: Here is the revert PR that should become part of 2.2.3: https://github.com/angular/angular/pull/13067