Skip to content

update to rxjs@6.0.0-alpha.4 - #22573

Closed
IgorMinar wants to merge 6 commits into
angular:masterfrom
IgorMinar:rxjs/v6-alpha.3
Closed

IgorMinar wants to merge 6 commits into
angular:masterfrom
IgorMinar:rxjs/v6-alpha.3

Conversation

@IgorMinar

Copy link
Copy Markdown
Contributor

Bam!

This PR is much bigger than typical RxJS code because of a unusual way we used RxJS in the past in order to reduce payload size and not introduce Observable.prototype patching due to Angular's use of RxJS.

@IgorMinar IgorMinar changed the title update to rxjs@6.0.0-alpha.3 WIP: update to rxjs@6.0.0-alpha.3 Mar 3, 2018
@IgorMinar
IgorMinar requested review from jasonaden and vikerman March 5, 2018 17:23
@alexeagle alexeagle added the area: packaging Issues related to Angular's creation of npm packages label Mar 5, 2018
@IgorMinar
IgorMinar requested a review from bowenni March 6, 2018 02:30
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent quotes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. thanks

@googlebot googlebot added cla: no and removed cla: yes labels Mar 6, 2018
@gkalpak
gkalpak force-pushed the rxjs/v6-alpha.3 branch 3 times, most recently from aed6612 to c0bf0ad Compare March 6, 2018 17:01
@angular angular deleted a comment from googlebot Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from googlebot Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from googlebot Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018
@angular angular deleted a comment from mary-poppins Mar 6, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this doesn't seem to work. The symptom I see is that the observable that subscribes to the result of getConfig (https://github.com/angular/angular/pull/22573/files#diff-447af6fbd9dbfe9744627f202c8440c0R33) doesn't get the 'Something bad happened;...' string via the error channel.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is it being called? My guess is you're handling the error somewhere else, because that function is pretty simple... basically new Observable(s => s.error(yourError))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved via a fix of a bad import in rxjs

@mary-poppins

Copy link
Copy Markdown

You can preview f22c86d at https://pr22573-f22c86d.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 1aea83c at https://pr22573-1aea83c.ngbuilds.io/.

@ngbot

ngbot Bot commented Mar 13, 2018

Copy link
Copy Markdown

Hi @IgorMinar! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@mary-poppins

Copy link
Copy Markdown

You can preview e0bc680 at https://pr22573-e0bc680.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview ad72391 at https://pr22573-ad72391.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview f3f787c at https://pr22573-f3f787c.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview b6c467c at https://pr22573-b6c467c.ngbuilds.io/.

@ngbot

ngbot Bot commented Mar 14, 2018

Copy link
Copy Markdown

Hi @IgorMinar! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

2 similar comments
@ngbot

ngbot Bot commented Mar 14, 2018

Copy link
Copy Markdown

Hi @IgorMinar! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@ngbot

ngbot Bot commented Mar 14, 2018

Copy link
Copy Markdown

Hi @IgorMinar! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@mary-poppins

Copy link
Copy Markdown

You can preview ec6ff11 at https://pr22573-ec6ff11.ngbuilds.io/.

@jasonaden jasonaden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore comments for simplification changes. Will tack on to an add-on PR.

I removed a couple TODOs & pushed a fixup commit. Looks good!

expanded$, (rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(
rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !));
return _catch.call(urlTrees$, (e: any) => {
const urlTrees$ = expanded$.pipe(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need the urlTree$ variable here anymore. Can be converted to:

return expanded$.pipe(map(...), (catchError(...));

expanded$, (rootSegmentGroup: UrlSegmentGroup) =>
this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !));
return _catch.call(mapped$, (e: any): Observable<UrlTree> => {
const mapped$ = expanded$.pipe(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here:

return expanded$.pipe(map(...), (catchError(...));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, it's probably even easier to read as:

return this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET)
  .pipe(
    map(...),
    catchError(...)
  );

And this saves needing to create the interim const variables. This applies above as well.

if (e instanceof NoMatch) {
// TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -
// talk to Jason
return of (null) as any;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove as any & the comment (types should flow now).

});
return of (...routes).pipe(
map((r: any) => {
const expanded$ = this.expandSegmentAgainstRoute(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return this.expandSegmentAgainstRoute(...).pipe(catchError(...));

import {map} from 'rxjs/operator/map';
import {mergeMap} from 'rxjs/operator/mergeMap';
import {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';
// TODO(i): switch to fromPromise once it's expored in rxjs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@mary-poppins

Copy link
Copy Markdown

You can preview 8b0784e at https://pr22573-8b0784e.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 246285b at https://pr22573-246285b.ngbuilds.io/.

@benlesh benlesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend this goes to beta.0 instead.

@ngbot

ngbot Bot commented Mar 19, 2018

Copy link
Copy Markdown

Hi @IgorMinar! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@mary-poppins

Copy link
Copy Markdown

You can preview ecfdbaa at https://pr22573-ecfdbaa.ngbuilds.io/.

angular-in-memory-web-api is not yet compatible with rxjs v6 and rxjs v6 backwards compatibility package is not yet ready to be used.
the next step will be to update all of aio to 6.0.0-rc.0
@mary-poppins

Copy link
Copy Markdown

You can preview 6427180 at https://pr22573-6427180.ngbuilds.io/.

@angular-automatic-lock-bot

Copy link
Copy Markdown

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: packaging Issues related to Angular's creation of npm packages cla: yes target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants