Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for rxjs 7 #41897

Closed
prabh-62 opened this issue Apr 30, 2021 · 17 comments
Closed

Support for rxjs 7 #41897

prabh-62 opened this issue Apr 30, 2021 · 17 comments
Labels
area: core Issues related to the framework runtime feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Milestone

Comments

@prabh-62
Copy link

prabh-62 commented Apr 30, 2021

Description

Angular 12 workspace comes bundled with rxjs 6.6.0

❯ npx @angular/cli@12.0.0-rc.1 new web-apps --create-application false --skip-install

angular_12_rxjs_6 6

Describe the solution you'd like

Angular 12 workspace should come bundled with rxjs 7

RxJS 7 Slides: https://docs.google.com/presentation/d/1-LU7YE3NWw8jHeAgdmLu4CBfG7osCx6MsSIeFs16k60

I see pull request angular/angular-cli#20669 was closed recently.

@alan-agius4
Copy link
Contributor

Before update to RXJS 7.0, the framework needs to be compatible.

Transferring to the FW repo to keep tracking this.

@alan-agius4 alan-agius4 transferred this issue from angular/angular-cli Apr 30, 2021
@alan-agius4 alan-agius4 added area: core Issues related to the framework runtime feature Issue that requests a new feature labels Apr 30, 2021
@ngbot ngbot bot modified the milestone: Backlog Apr 30, 2021
@jelbourn jelbourn changed the title [Angular 12]: Support for rxjs 7 Support for rxjs 7 Apr 30, 2021
@jelbourn
Copy link
Member

rxjs v7 won't be stable for v12, so it won't be included by default.

Related: #41590

@PowerKiKi
Copy link
Contributor

rxjs v7 won't be stable for v12, so it won't be included by default.

@jelbourn, actually rxjs 7.0.0 was released 1 day before you said that. Were you not aware of that release at that time or did you mean that rxjs 7 support in Angular won't be stable enough for v12 ?

@alxhub
Copy link
Member

alxhub commented May 4, 2021

rxjs v7 won't be stable for v12, so it won't be included by default.

@jelbourn, actually rxjs 7.0.0 was released 1 day before you said that. Were you not aware of that release at that time or did you mean that rxjs 7 support in Angular won't be stable enough for v12 ?

v12's first Release Candidate (rc0) was cut 2 weeks ago. After that, the versions of dependencies such as RxJS are generally fixed.

Note that this doesn't mean you can't use RxJS 7 with Angular v12 - changes such as #41590 will still land to ensure the framework is compatible with the new RxJS. We just can't change the default/minimum required version until v13, as doing so is a breaking change for users and we don't merge such changes in the RC period.

@jelbourn
Copy link
Member

jelbourn commented May 5, 2021

Yeah, it caught me by surprise- I wasn't expecting it until after v12 since there are still outstanding issues w/ v7 inside Google.

@BenRacicot
Copy link

I had read somewhere that V7 was good to go on V12, hmm.
Should we not force it? npm i --legacy-peer-deps

➜ client git:(master) ✗ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: aspectratia@0.0.0
npm ERR! Found: rxjs@7.0.1
npm ERR! node_modules/rxjs
npm ERR! rxjs@"~7.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^6.5.3" from @angular/core@12.0.0
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"~12.0.0" from the root project
npm ERR! peer @angular/core@"12.0.0" from @angular/animations@12.0.0
npm ERR! node_modules/@angular/animations
npm ERR! @angular/animations@"~12.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/bracicot/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bracicot/.npm/_logs/2021-05-15T01_52_18_845Z-debug.log

@zijianhuang
Copy link

Angular 12 with rxjs 7.0.1 could be built and run, however, the VS IDE could not check reference. And tsconfig with strict=true has NG CLI complaining no reference to rxjs could be found and suggesting downloading type info.

@vitaly-t
Copy link

Now that RXJS v7.1 is out, can we expect Angular v12.1.0 to start using it?

This new RXJS is so much better and smaller, it will be a shame not to start using it with v12 of Angular.

@arobinson
Copy link

@angular/core has a peer dependency on RxJS 6, is it possible to allow RxJS 7 as a peer dependency so that Angular can support 6 or 7 but still have a minimum of 6?

@crisbeto
Copy link
Member

We can't update the minimum required version of rxjs until Angular 13, because rxjs version 7 includes breaking changes. We're exploring how to support both 6 and 7 for projects that want to opt into it earlier.

@eugene-stativka
Copy link

@crisbeto thank you! It would be great to be able to use RxJS 7. It brings so many benefits.

@angular-robot angular-robot bot added the feature: under consideration Feature request for which voting has completed and the request is now under consideration label Jun 5, 2021
@klizter

This comment has been minimized.

crisbeto added a commit to crisbeto/angular that referenced this issue Jul 29, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (angular#42660).

Fixes angular#41897.
crisbeto added a commit to crisbeto/angular that referenced this issue Jul 29, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (angular#42660).

Fixes angular#41897.
crisbeto added a commit to crisbeto/angular that referenced this issue Aug 2, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (angular#42660).

Fixes angular#41897.
crisbeto added a commit to crisbeto/angular that referenced this issue Aug 2, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (angular#42660).

Fixes angular#41897.
@atscott atscott closed this as completed in 9a3cf66 Aug 2, 2021
atscott pushed a commit that referenced this issue Aug 2, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (#42660).

Fixes #41897.

PR Close #42991
@theodorejb
Copy link
Contributor

I'm still getting incompatible peer dependency errors for @angular/cdk and @angular/material when using RxJS 7:

Package "@angular/cdk" has an incompatible peer dependency to "rxjs" (requires "^6.5.3", would install "7.1.0")
Package "@angular/material" has an incompatible peer dependency to "rxjs" (requires "^6.5.3", would install "7.1.0")

@crisbeto
Copy link
Member

crisbeto commented Aug 5, 2021

Ah, we never bumped the allowed version on the non-core packages. I'll do it now.

@princemaple
Copy link

If you simply update angular packages then install rxjs 7, it would just work fine. Given that you are still on node 14 and npm 6. It would probably have issues on npm 7

@destus90
Copy link
Contributor

destus90 commented Aug 6, 2021

@princemaple
Both flags --force and --legacy-peer-deps should resolve the issue when using npm7.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2021
TeriGlover pushed a commit to TeriGlover/angular that referenced this issue Sep 16, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (angular#42660).

Fixes angular#41897.

PR Close angular#42991
TeriGlover pushed a commit to TeriGlover/angular that referenced this issue Sep 22, 2021
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (angular#42660).

Fixes angular#41897.

PR Close angular#42991
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to the framework runtime feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.