ReactiveX / ReactiveX/rxjs

forkJoin/combineLatest works differently from 6.6.2 to 6.6.3 and even latest version 7.8.1

Open
#7,517 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
31.7k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

forkJoin/combineLatest works differently from 6.6.2 to 6.6.3 when used with a ReplaySubject and Observable, the replay subject doesn't seem to emit the next value.

Expected behavior

From the reproduction URL provided below

Expected console output (as seen in rxjs <= 6.6.2):
0:one
1:two

Actual console output (as seen in rxjs >= 6.6.3):
0:one
0:two

I thought combineLatest might solve this issue instead, but even using combineLatest also doesn't make any difference

Reproduction code

No response

Reproduction URL

https://stackblitz.com/edit/rxjs-7dw9nv?file=index.ts,package.json

Version

7.8.1

Environment

Angular CLI: 16.2.12
Node: 18.20.2
Package Manager: npm 10.5.0
OS: win32 x64

Angular: 16.2.12
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1602.12
@angular-devkit/build-angular 16.2.12
@angular-devkit/core 16.2.12
@angular-devkit/schematics 16.2.12
@angular/cdk 16.2.14
@angular/flex-layout 15.0.0-beta.42
@angular/material 16.2.14
@angular/material-moment-adapter 16.2.14
@schematics/angular 16.2.12
rxjs 7.8.1
typescript 4.9.5
zone.js 0.13.3

Additional context

I cant find anyone mentioning this problem from an internet search but as 7.8.1 is two years old it would strike me as odd that if this is a bug no one else has discovered it. So perhaps it's just a case of incorrect usage of the library?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproduction and compare the console output under RxJS 6.6.2, 6.6.3, and 7.8.1 for forkJoin and combineLatest with ReplaySubject and Observable. Determine whether the changed output is a regression or expected usage, with the comparison and explanation serving as the completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.