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

RFC: Upgrade to RxJS 5.5 #1244

Closed
tsvetomir opened this issue Jan 22, 2018 · 8 comments

Comments

@tsvetomir
Copy link
Member

commented Jan 22, 2018

RxJS 5.5 introduces a new way to import operators, namely pipeable operators née lettable operators. This new way to import operators improves module isolation and helps reduce bundle size.

Pipeable operators are only partially compatible with previous versions, particularly static methods like Obserbable.merge can lead to build errors when imported globally. See ReactiveX/rxjs#3222, #1214, #1230, #1236.

To remedy this situation, I propose to:

  1. Update the peer dependencies of affected @progress/kendo-* packages to require "rxjs": "<5.5.0"
  2. Release a major version of affected @progress/kendo-* packages that require "rxjs": "^5.5.0" and utilize pipeable operators.
  3. Tag all Angular 4 LTS compatible package versions. You will be able to get the latest LTS-compatible version by specifying "ng4" as a version. Edit: No tags needed, packages remain compatible with Angular LTS, you just need to use rxjs > 5.5

Please note:

  • Affected packages can be seen in the issue labels
  • The previous major version will not receive updates and users are urged to update to rxjs 5.5 before updating to new Kendo UI package versions.

/cc @rusev @rkonstantinov @gyoshev @ggkrustev @tapopov @valchev @danielkaradachki @Raisolution
















white space reserved for a rant on breaking changes in minor releases

@ggkrustev

This comment has been minimized.

Copy link
Contributor

commented Jan 22, 2018

I do believe that upgrading to rxjs@^5.5.x is inevitable. I suppose that we can introduce a breaking change along with the Angular@6 release.

I am not sure how we should proceed with the Angular LTS release. Probably we should also have 2 versions of the packages. What do you think?

@tsvetomir tsvetomir removed the pkg:charts label Jan 23, 2018

@tsvetomir

This comment has been minimized.

Copy link
Member Author

commented Jan 23, 2018

The Angular 6 release will lead to another major version bump for all packages, but this is not directly related to the RxJS issue.

We need a fix for Angular 5.x LTS. It has been using RxJS 5.5 since it became available, but we didn't notice the issues as they only pop up when the build optimizer is enabled. The Angular CLI enables the build-optimizer by default in version 1.6.1 and later.

@tsvetomir

This comment has been minimized.

Copy link
Member Author

commented Jan 23, 2018

More bad news. Due to angular/angular-cli#9069, pipeable operators will include the full RxJS library.

Depending on your use case the difference can be quite significant. In my test project this adds around 100kB to the download size:

With global operators, RxJS ~ 52kB gzipped
image

With pipeable operators, RxJS ~ 125kB gzipped
image

With this in mind, the benefit from migrating to pipeable operators is lost. It makes more sense to wait for the bundling issue to be resolved. This might defer this fix to the Angular 6 release time frame.

My recommendation is to disable the build optimizer for the time being:
ng build --prod --build-optimizer=false

EDIT: See following response

@tsvetomir

This comment has been minimized.

Copy link
Member Author

commented Jan 23, 2018

Okay, so that was a bit rushed. The solution was to import individual operators:

import { map } from 'rxjs/operators/map'; instead of
import { map } from 'rxjs/operators';

image

gyoshev added a commit to telerik/kendo-common-tasks that referenced this issue Jan 24, 2018

rusev pushed a commit to telerik/kendo-common-tasks that referenced this issue Jan 24, 2018

@bjornharvold

This comment has been minimized.

Copy link

commented Jan 25, 2018

Definitely following this one closely :-) #goteamtelerik

@tsvetomir tsvetomir removed the pkg:gauges label Jan 25, 2018

@mikemwalsh

This comment has been minimized.

Copy link

commented Jan 25, 2018

Is this being done as a break fix or is there a work around for the current kendo release? We implemented the latest kendo library and have a prod production date with it, but cannot do our prod build.

What previous version of the library will work?

@tsvetomir

This comment has been minimized.

Copy link
Member Author

commented Jan 25, 2018

@mikemwalsh it will be a breaking change, resulting in a major version bump. Otherwise we'll break users with rxjs < 5.5 that don't have pipeable operators.

The workaround is to disable the build optimizer:
ng build --prod --build-optimizer=false

@tsvetomir

This comment has been minimized.

Copy link
Member Author

commented Jan 29, 2018

All packages have been updated to use the new pipeable operators from RxJS 5.5+

This is a full list of the updated packages and their current version:

Package Versions
kendo-angular-buttons ^3.0.1
kendo-angular-charts ^2.0.0
kendo-angular-dateinputs ^2.0.0
kendo-angular-dialog ^3.0.0
kendo-angular-dropdowns ^2.0.0
kendo-angular-grid ^2.0.0
kendo-angular-inputs ^2.0.0
kendo-angular-layout ^2.0.0
kendo-angular-popup ^2.0.0
kendo-angular-resize-sensor ^3.0.0
kendo-angular-treeview ^2.0.0
kendo-angular-upload ^3.0.0

It's highly recommended that you update to these versions if your project is already on the latest rxjs. In addition, older versions will output a warning when used with RxJS 5.5:

WARN xxxx requires a peer of rxjs@^5 <5.5 but none is installed. You must install peer dependencies yourself.

As always, you can use npm outdated to inspect your project dependencies for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.