profile
viewpoint
ReactiveX ReactiveX http://reactivex.io Reactive Extensions for Async Programming

fork seaCloud-vn/RxSwift

Reactive Programming in Swift

fork in 36 minutes

startedReactiveX/RxSwift

started time in 40 minutes

startedReactiveX/RxJava

started time in 42 minutes

startedReactiveX/RxJava

started time in an hour

startedReactiveX/RxJava

started time in an hour

startedReactiveX/RxJava

started time in an hour

PR opened ReactiveX/rxjs

feat(Subject): SnapShotReplaySubject

SnapShotReplay Subject will collect items based on some key if new value with same key is published it will replace the old value

<!-- Thank you very much for your pull request!

If your PR is the addition of a new operator, please make sure all these boxes are ticked with an x:

  • [ ] Add the operator to Rx
  • [ ] It must have a -spec.ts tests file covering the canonical corner cases, with marble diagram tests
  • [ ] If possible, write a asDiagram test case too, for PNG diagram generation purposes
  • [ ] The spec file should have a type definition test at the end of the spec to verify type definition for various use cases
  • [ ] The operator must be documented in JSDoc style in the implementation file, including also the PNG marble diagram image
  • [ ] The operator should be listed in doc/operators.md in a category of operators
  • [ ] The operator should also be documented. See Documentation Guidelines.
  • [ ] It should also be inserted in the operator decision tree file doc/decision-tree-widget/tree.yml
  • [ ] You may need to update MIGRATION.md if the operator differs from the corresponding one in RxJS v4 -->

Description:

Related issue (if exists):

+158 -0

0 comment

3 changed files

pr created time in 2 hours

pull request commentReactiveX/RxPY

A few grammar errors/typos

Coverage Status

Coverage remained the same at 92.904% when pulling c6fed00a64268626714db27f7b24fa75adf56060 on eternaldensity:master into ce12560f9481dbd0d072911e12ff2ed30be328bf on ReactiveX:master.

eternaldensity

comment created time in 2 hours

PR opened ReactiveX/RxPY

A few grammar errors/typos

I initially noticed that length_more_than_5 was referred to as length_more_then_5 in one case, and fixed a couple of other minor issues while I was at it.

+3 -3

0 comment

1 changed file

pr created time in 2 hours

fork mrudangit/rxjs

A reactive programming library for JavaScript

https://rxjs.dev

fork in 2 hours

startedReactiveX/RxGo

started time in 2 hours

fork eternaldensity/RxPY

Reactive Extensions for Python, https://rxpy.rtfd.io

fork in 2 hours

fork Michael199311/RxSwift

Reactive Programming in Swift

fork in 3 hours

PR opened ReactiveX/rxjs

fix(closure): Annotate next() for ReplaySubject

Closure thinks next() is UnusableType instead of (value: T) => void, adding an @override annotation when overriding the method fixes this issue

+1 -0

0 comment

1 changed file

pr created time in 4 hours

startedReactiveX/RxGo

started time in 4 hours

startedReactiveX/rxjs

started time in 5 hours

issue commentReactiveX/RxSwift

RxTest referencing to invalid libswiftXCTest.dylib

I checked Quick and Nimble Podspec and they actually do have LIBRARY_SEARCH_PATHS. No problem with those. @freak4pc can we add this to the podspec? What do you think? I can open a PR myself and check if it works if you are busy.

gringoireDM

comment created time in 6 hours

startedReactiveX/rxdart

started time in 6 hours

Pull request review commentReactiveX/rxdart

Extension Methods phase 1

+import 'dart:async';++import 'package:rxdart/streams.dart';+import 'package:rxdart/transformers.dart';++import 'observables/connectable_observable.dart';+import 'observables/replay_observable.dart';+import 'observables/value_observable.dart';++extension ObservableExtensions<T> on Stream<T> {

All extensions that can be moved out have been. Only remaining extensions on this class are sort of "Stragglers" that have no home.

brianegan

comment created time in 7 hours

pull request commentReactiveX/rxdart

Extension Methods phase 1

Codecov Report

Merging #349 into master will decrease coverage by 1.11%. The diff coverage is 94.44%.

@@            Coverage Diff            @@
##           master    #349      +/-   ##
=========================================
- Coverage   93.51%   92.4%   -1.12%     
=========================================
  Files          63      60       -3     
  Lines        2145    2041     -104     
=========================================
- Hits         2006    1886     -120     
- Misses        139     155      +16
brianegan

comment created time in 7 hours

push eventReactiveX/rxdart

Brian Egan

commit sha 8fd2dfa19297d54078a3984363567f1000f262f7

Move all extension methods next to the appropriate StreamTransformer

view details

push time in 7 hours

startedReactiveX/RxSwift

started time in 7 hours

PR closed ReactiveX/RxGo

travis.yml to manage dependencies using Go modules changes required enhancement version 2

#183

+5 -4

13 comments

1 changed file

exfly

pr closed time in 7 hours

pull request commentReactiveX/RxGo

travis.yml to manage dependencies using Go modules

Implemented in v2 branch

exfly

comment created time in 7 hours

delete branch ReactiveX/RxGo

delete branch : worker

delete time in 7 hours

Pull request review commentReactiveX/rxdart

Extension Methods phase 1

+import 'dart:async';++import 'package:rxdart/streams.dart';+import 'package:rxdart/transformers.dart';++import 'observables/connectable_observable.dart';+import 'observables/replay_observable.dart';+import 'observables/value_observable.dart';++extension ObservableExtensions<T> on Stream<T> {

After looking at this extension, I'm actually thinking it might be better to move each of these extensions next to the StreamTransformer classes themselves.

brianegan

comment created time in 7 hours

push eventReactiveX/RxGo

teivah

commit sha d243e1ce508beb9f29d7d62b630e9148ba687422

Reused CPU pool

view details

teivah

commit sha ebe8b4cdbbf4acec568c866fa37540aeeb024e3f

Gofmt

view details

teivah

commit sha cef609ce3787a7931b7752d498cf4e3216ef9cc1

Build

view details

teivah

commit sha e6e58c2fa9cad94bd75ad96f50a43c4b9f077159

Build

view details

teivah

commit sha 2648197b1b80fc8d546dc0c52ce462e68014a625

Build

view details

teivah

commit sha c954e947bee2d3e3a61f5af5f8af2b09a6195956

Remove test with CPU pool

view details

teivah

commit sha f34ebcfc219b2303f981f71c6ff1886c8e4848e3

Missing dep

view details

teivah

commit sha daad2abd7f3191999334fa4b964f76c391e646b2

Context management

view details

teivah

commit sha 9ddf8bcd329d24a633c95b19abc3097624b59f42

Remove test

view details

Teiva Harsanyi

commit sha 684201f7fb585b470a680eafc7d9db6948531b24

Merge pull request #211 from ReactiveX/worker Worker pool

view details

push time in 7 hours

PR merged ReactiveX/RxGo

Worker pool
+94 -32

1 comment

9 changed files

teivah

pr closed time in 7 hours

push eventReactiveX/RxGo

teivah

commit sha 9ddf8bcd329d24a633c95b19abc3097624b59f42

Remove test

view details

push time in 7 hours

push eventReactiveX/rxdart

Brian Egan

commit sha aef151b4e9023bcde48e6b538064a19b2b5af8b4

Extension Methods phase 1 - Introduce ObservableExtensions - Move all Rx operators from Observable to ObservableExtensions - Remove all "wrapper" methods from Observable - Default to Stream Implementations - Keep constructors on Observable class - Remove Exported Futures & Tests - AsObservable Future no longer provides utility - Min and Max are easily inlined

view details

push time in 7 hours

fork io7m/RxJava

RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.

fork in 7 hours

PR opened ReactiveX/rxdart

Extension Methods phase 1

Summary

  • Introduce ObservableExtensions
  • Move all Rx operators from Observable to ObservableExtensions
  • Remove all "wrapper" methods from Observable
    • Default to Stream Implementations
  • Keep constructors on Observable class (for now?)
  • Remove Exported Futures & Tests
    • AsObservable Future no longer provides utility, since all streams will have Rx methods
    • Min and Max are easily inlined

Discussion

I'd love to hear feedback on this change -- good or bad! This PR will result in some breaking changes, but I've tried to make them as painless as possible for this first phase. If these changes are too drastic, please let me know and we can discuss!

Rationale

In practice, this PR should make it much easier to use Rx transformations, since they will be available to all streams by importing rxdart.

import 'package:rxdart/rxdart.dart';

// Uses the `max` extension method
// Prints 3
Stream.fromIterable([1, 2, 3]).max().then(print); 

// Uses the `onErrorReturn` extenion method
// Prints "Recovery Value"
Stream<String>.error(Exception()).onErrorReturn("Recovery Value").listen(print); 

Reasoning

RxDart is built upon Stream primitives. All operators are implemented as StreamTransformer classes, such as ScanStreamTransformer. All constructors are implement as regular Stream classes, such as RangeStream.

The Observable class itself is simply a wrapper around a Stream that makes use of these primitives to add additional methods to the Stream it wraps. This includes the scan method, or the Observable.range constructor.

With the advent of Dart 2.6, we can take advantage of Static Extension Methods to add the rx transformation methods onto the Stream class, without requiring end-users to wrap their Streams in an Observable!

This means we can remove almost all methods that proxy up to the Stream class, and move the Rx operators to an extension.

Breaking Changes

  • All methods that previously returned an Observable<T> now return a plain Stream<T>
  • All Future implementations removed. They were also wrappers around futures that allow you to convert them into Observables. No longer needed in this brave new world.
+1544 -2299

0 comment

23 changed files

pr created time in 7 hours

push eventReactiveX/RxGo

teivah

commit sha daad2abd7f3191999334fa4b964f76c391e646b2

Context management

view details

push time in 7 hours

push eventReactiveX/RxGo

teivah

commit sha f34ebcfc219b2303f981f71c6ff1886c8e4848e3

Missing dep

view details

push time in 7 hours

push eventReactiveX/RxGo

teivah

commit sha c954e947bee2d3e3a61f5af5f8af2b09a6195956

Remove test with CPU pool

view details

push time in 8 hours

create barnchReactiveX/rxdart

branch : extension-methods-phase1

created branch time in 8 hours

push eventReactiveX/RxGo

teivah

commit sha 2648197b1b80fc8d546dc0c52ce462e68014a625

Build

view details

push time in 8 hours

push eventReactiveX/RxGo

teivah

commit sha e6e58c2fa9cad94bd75ad96f50a43c4b9f077159

Build

view details

push time in 8 hours

push eventReactiveX/RxGo

teivah

commit sha cef609ce3787a7931b7752d498cf4e3216ef9cc1

Build

view details

push time in 8 hours

issue commentReactiveX/rxjs

Migrate to eslint

I would like to take it up. :)

kwonoj

comment created time in 8 hours

issue commentReactiveX/RxJava

Question: Why a running computation thread got interrupted while window is finished

If it can be fixed, both 2.x and 3.x will receive the fix.

zubchenok

comment created time in 8 hours

issue commentReactiveX/RxJava

Question: Why a running computation thread got interrupted while window is finished

Could you fix it for 2.x too?

zubchenok

comment created time in 8 hours

issue commentReactiveX/RxJava

NPE in SpscLinkedArrayQueue.clear due to concurrent invocation

As far as I can tell, the chain for the second stack trace is:

FlowableProcessor
  .map { ... }
  .onBackpressureBuffer()
  .compose { it.observeOn(...) }
  .map { ... }
  .observeOn(...)
  .map { ... }
  .distinctUntilChanged()
  .concatMapMaybe { ... }
  .firstOrError()

which is a lot simpler.

In both cases, the FlowableProcessor is subscribed to FlowableProcessor.onBackpressureBuffer().scan { ... }

akarnokd

comment created time in 9 hours

fork j/rxjs

A reactive programming library for JavaScript

https://rxjs.dev

fork in 9 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

Thanks. Posted #6673 to track this issue specifically.

boris-petrov

comment created time in 9 hours

issue openedReactiveX/RxJava

NPE in SpscLinkedArrayQueue.clear due to concurrent invocation

Reported in https://github.com/ReactiveX/RxJava/issues/5927#issuecomment-542792421

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 138(SpscLinkedArrayQueue.java:138)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.cancel + 154(FlowableOnBackpressureBuffer.java:154)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber.cancel + 157(BasicFuseableConditionalSubscriber.java:157)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableElementAtSingle$ElementAtSubscriber.onNext + 85(FlowableElementAtSingle.java:85)
       at io.reactivex.internal.operators.flowable.FlowableDistinctUntilChanged$DistinctUntilChangedSubscriber.tryOnNext + 101(FlowableDistinctUntilChanged.java:101)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapConditionalSubscriber.tryOnNext + 128(FlowableMap.java:128)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync + 649(FlowableObserveOn.java:649)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)

We just upgraded our project from 1.x, and did not see these errors in testing, but are seeing them in production. We're working to figure out the exact cause, and will provide more information as we have it.

Here are some additional stack traces, in case you notice any pattern:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.newBufferPoll + 155(SpscLinkedArrayQueue.java:155)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 145(SpscLinkedArrayQueue.java:145)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.cancel + 154(FlowableOnBackpressureBuffer.java:154)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber.cancel + 157(BasicFuseableConditionalSubscriber.java:157)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.cancel + 168(FlowableConcatMapMaybe.java:168)
       at io.reactivex.internal.operators.flowable.FlowableElementAtSingle$ElementAtSubscriber.onNext + 85(FlowableElementAtSingle.java:85)
       at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain + 284(FlowableConcatMapMaybe.java:284)
       at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.onNext + 137(FlowableConcatMapMaybe.java:137)
       at io.reactivex.internal.operators.flowable.FlowableDistinctUntilChanged$DistinctUntilChangedSubscriber.tryOnNext + 101(FlowableDistinctUntilChanged.java:101)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapConditionalSubscriber.tryOnNext + 128(FlowableMap.java:128)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync + 649(FlowableObserveOn.java:649)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.newBufferPoll + 155(SpscLinkedArrayQueue.java:155)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 145(SpscLinkedArrayQueue.java:145)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.clear + 264(FlowableOnBackpressureBuffer.java:264)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.clear + 236(FlowableObserveOn.java:236)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated + 188(FlowableObserveOn.java:188)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync + 399(FlowableObserveOn.java:399)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)
       at io.reactivex.internal.schedulers.ScheduledRunnable.run + 66(ScheduledRunnable.java:66)
       at io.reactivex.internal.schedulers.ScheduledRunnable.call + 57(ScheduledRunnable.java:57)
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 138(SpscLinkedArrayQueue.java:138)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.cancel + 154(FlowableOnBackpressureBuffer.java:154)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableSkipWhile$SkipWhileSubscriber.cancel + 93(FlowableSkipWhile.java:93)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableElementAtSingle$ElementAtSubscriber.onNext + 85(FlowableElementAtSingle.java:85)
       at io.reactivex.internal.operators.flowable.FlowableFilter$FilterSubscriber.tryOnNext + 74(FlowableFilter.java:74)
       at io.reactivex.internal.operators.flowable.FlowableFilter$FilterSubscriber.onNext + 52(FlowableFilter.java:52)
       at io.reactivex.internal.operators.flowable.FlowableSkipWhile$SkipWhileSubscriber.onNext + 56(FlowableSkipWhile.java:56)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapSubscriber.onNext + 68(FlowableMap.java:68)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync + 407(FlowableObserveOn.java:407)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)

The full chain for the last stack trace is:

Single.just(...)
  .delaySubscription(
    Completable.amb(
      listOf(
        Completable.timer(...),
        FlowableProcessor
          .map { ... }
          .onBackpressureBuffer()
          .compose { it.observeOn(...) }
          .map { ... }
          .observeOn(...)
          .map { ... }
          .skipWhile { ... }
          .filter { ... }
          .firstOrErrror()
          .ignoreElement()
      )
    )
      .toObservable<Any>()
  )
  .subscribeOn(...)

created time in 9 hours

issue commentReactiveX/RxJava

Question: Why a running computation thread got interrupted while window is finished

This is a shortcoming of the window operator that cancels the timer before terminating, which interrupts the long running code in doOnNext.

A workaround would be to move the computation to yet another thread with observeOn so that the interrupt won't reach it.

I'll look into the termination and timer cancellation ordering to avoid such confusing interrupts.

zubchenok

comment created time in 9 hours

startedReactiveX/rxjs

started time in 9 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

I can attempt this, but it will take time to collect that data.

boris-petrov

comment created time in 9 hours

issue commentReactiveX/RxSwift

RxTest referencing to invalid libswiftXCTest.dylib

I checked that adding LIBRARY_SEARCH_PATHS alone without switching to Swift 5 did not help!

gringoireDM

comment created time in 9 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

Thanks. I have some suspicion I have to verify. In the meantime, could you see if you put hide() after onBackpressureBuffer() the crashes stop happening?

boris-petrov

comment created time in 9 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

The full chain for the last stack trace is:

Single.just(...)
  .delaySubscription(
    Completable.amb(
      listOf(
        Completable.timer(...),
        FlowableProcessor
          .map { ... }
          .onBackpressureBuffer()
          .compose { it.observeOn(...) }
          .map { ... }
          .observeOn(...)
          .map { ... }
          .skipWhile { ... }
          .filter { ... }
          .firstOrErrror()
          .ignoreElement()
      )
    )
      .toObservable<Any>()
  )
  .subscribeOn(...)
boris-petrov

comment created time in 9 hours

issue openedReactiveX/RxJava

Question: Why a running computation thread got interrupted while window is finished

Why an active computation thread got interrupted while window is finished?

        Observable
            .intervalRange(0, 2, 0, 1, TimeUnit.SECONDS)
            .window(1, TimeUnit.SECONDS)
            .doOnNext(i -> {
                long start = System.currentTimeMillis();
                while (System.currentTimeMillis() < start+1500) {
                }
                if (Thread.interrupted()) {
                    System.out.println("WTF? Thread is interrupted!");
                }
            })
            .ignoreElements()
            .blockingAwait();

Is it a bug?

created time in 9 hours

issue commentReactiveX/RxSwift

RxTest referencing to invalid libswiftXCTest.dylib

I solved the same issue in my project by switching everything to Swift 5 and adding a line of code in the podspec that requires XCTest.

Before:

  s.frameworks = 'XCTest', 'XCTAutomationSupport'
  
  s.xcconfig = {
    'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks"',
    'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks"'
  }

After:

  s.frameworks = 'XCTest', 'XCTAutomationSupport'
  
  s.xcconfig = {
    'LIBRARY_SEARCH_PATHS' => '$(TOOLCHAIN_DIR)/usr/lib/swift-$(SWIFT_VERSION)/$(PLATFORM_NAME) $(inherited)',
    'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks"',
    'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "$(PLATFORM_DIR)/Developer/Library/PrivateFrameworks"'
  }

I hope this can help.

gringoireDM

comment created time in 9 hours

startedReactiveX/rxjs

started time in 9 hours

startedReactiveX/rxdart

started time in 9 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

It crashes when it tries to clear the buffer of onBackpressureBuffer upon receiving cancellation. However, this particular crash would only happen when clear is invoked concurrently, which shouldn't be possible. Any more indications on the operator chain would be helpful because the stacktrace does not indicate the full chain.

boris-petrov

comment created time in 10 hours

startedReactiveX/rxjs

started time in 10 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

We just upgraded our project from 1.x, and did not see these errors in testing, but are seeing them in production. We're working to figure out the exact cause, and will provide more information as we have it.

Here are some additional stack traces, in case you notice any pattern:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.newBufferPoll + 155(SpscLinkedArrayQueue.java:155)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 145(SpscLinkedArrayQueue.java:145)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.cancel + 154(FlowableOnBackpressureBuffer.java:154)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber.cancel + 157(BasicFuseableConditionalSubscriber.java:157)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.cancel + 168(FlowableConcatMapMaybe.java:168)
       at io.reactivex.internal.operators.flowable.FlowableElementAtSingle$ElementAtSubscriber.onNext + 85(FlowableElementAtSingle.java:85)
       at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain + 284(FlowableConcatMapMaybe.java:284)
       at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.onNext + 137(FlowableConcatMapMaybe.java:137)
       at io.reactivex.internal.operators.flowable.FlowableDistinctUntilChanged$DistinctUntilChangedSubscriber.tryOnNext + 101(FlowableDistinctUntilChanged.java:101)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapConditionalSubscriber.tryOnNext + 128(FlowableMap.java:128)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync + 649(FlowableObserveOn.java:649)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.newBufferPoll + 155(SpscLinkedArrayQueue.java:155)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 145(SpscLinkedArrayQueue.java:145)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.clear + 264(FlowableOnBackpressureBuffer.java:264)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.clear + 236(FlowableObserveOn.java:236)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated + 188(FlowableObserveOn.java:188)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync + 399(FlowableObserveOn.java:399)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)
       at io.reactivex.internal.schedulers.ScheduledRunnable.run + 66(ScheduledRunnable.java:66)
       at io.reactivex.internal.schedulers.ScheduledRunnable.call + 57(ScheduledRunnable.java:57)
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 138(SpscLinkedArrayQueue.java:138)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.cancel + 154(FlowableOnBackpressureBuffer.java:154)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableSkipWhile$SkipWhileSubscriber.cancel + 93(FlowableSkipWhile.java:93)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableElementAtSingle$ElementAtSubscriber.onNext + 85(FlowableElementAtSingle.java:85)
       at io.reactivex.internal.operators.flowable.FlowableFilter$FilterSubscriber.tryOnNext + 74(FlowableFilter.java:74)
       at io.reactivex.internal.operators.flowable.FlowableFilter$FilterSubscriber.onNext + 52(FlowableFilter.java:52)
       at io.reactivex.internal.operators.flowable.FlowableSkipWhile$SkipWhileSubscriber.onNext + 56(FlowableSkipWhile.java:56)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapSubscriber.onNext + 68(FlowableMap.java:68)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync + 407(FlowableObserveOn.java:407)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)
boris-petrov

comment created time in 10 hours

PR opened ReactiveX/rxjs

chore(readme): update npm badge ref to rxjs

Moving away from @reactivex/rxjs.

+1 -1

0 comment

1 changed file

pr created time in 10 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

@DavidDTA could you provide a code sample that reproduces this issue?

boris-petrov

comment created time in 11 hours

issue commentReactiveX/rxjs

Feature Request: startWith that only emits a value after a timeout

Not sure if I understood your requirement correctly, any reason timeout doesn't work? i.e

const start = (o: Observable<any>, due: number, value: any) => 
  o.pipe(timeoutWith(due, o.pipe(startWith(value))));

Regardless above pseudo works for you or not, I don't think this should be variant of startWith and probably appropriate for userland operator. Mostly cause of this operator might not need core's internal access to achieve this behavior.

aeb-sia

comment created time in 11 hours

issue commentReactiveX/RxJava

[2.1.11] NPE in SpscLinkedArrayQueue.lvElement

Hi, we're seeing a similar crash in 2.2.12:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.concurrent.atomic.AtomicReferenceArray.get(int)' on a null object reference
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.lvElement + 251(SpscLinkedArrayQueue.java:251)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.poll + 138(SpscLinkedArrayQueue.java:138)
       at io.reactivex.internal.queue.SpscLinkedArrayQueue.clear + 186(SpscLinkedArrayQueue.java:186)
       at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.cancel + 154(FlowableOnBackpressureBuffer.java:154)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel + 154(FlowableObserveOn.java:154)
       at io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber.cancel + 157(BasicFuseableConditionalSubscriber.java:157)
       at io.reactivex.internal.subscribers.BasicFuseableSubscriber.cancel + 158(BasicFuseableSubscriber.java:158)
       at io.reactivex.internal.operators.flowable.FlowableElementAtSingle$ElementAtSubscriber.onNext + 85(FlowableElementAtSingle.java:85)
       at io.reactivex.internal.operators.flowable.FlowableDistinctUntilChanged$DistinctUntilChangedSubscriber.tryOnNext + 101(FlowableDistinctUntilChanged.java:101)
       at io.reactivex.internal.operators.flowable.FlowableMap$MapConditionalSubscriber.tryOnNext + 128(FlowableMap.java:128)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync + 649(FlowableObserveOn.java:649)
       at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run + 176(FlowableObserveOn.java:176)
boris-petrov

comment created time in 11 hours

issue openedReactiveX/rxjs

Feature Request: startWith that only emits a value after a timeout

Feature Request

Is your feature request related to a problem? Please describe. I need an easy way to define a conditional startWith that only emits if a timeout is reached. The use case is to have a waiting state that is not always triggered.

Describe the solution you'd like This is a working solution:

function startWithAfterTimeout<T, V>(
        o: Observable<T>, timeout: number = 2000, value: V): Observable<T | V> {
    const privateValue = Symbol('Just need a value to compare to');
    return merge(o, of(privateValue).pipe(delay(timeout)))
        .pipe(
            distinctUntilChanged((oldValue, newValue) => 
                !(oldValue === privateValue || newValue !== privateValue)),
            map(v => v === privateValue ? value: v)
        );
}

Describe alternatives you've considered Another way of achieving this would be:

merge(of(value).pipe(delay(timeout), takeUntil(o)), o)

But I'm unsure if this has any side effects. I guess the observable should be at least shared, and I have no idea if there could be any race conditions.

(If this is new operator request) describe reason it should be core operator I'm frankly a little astonished this is not already a core operator and would say

If you have improvements to my current proposal I'd very much appreciate them. I'm ok with this being closed if you think this shouldn't be included in core.

created time in 12 hours

startedReactiveX/rxjs

started time in 12 hours

startedReactiveX/rxjs

started time in 12 hours

startedReactiveX/RxJava

started time in 12 hours

startedReactiveX/RxKotlin

started time in 13 hours

issue commentReactiveX/RxJava

3.0.0-RC3 jars don't export packages via OSGi headers

Ah, yes, this happened to another project I'm vaguely involved with. Thankfully it's easily fixed. I should have a PR by the end of the week.

io7m

comment created time in 13 hours

issue commentReactiveX/RxJava

3.0.0-RC3 jars don't export packages via OSGi headers

Tool: Bnd-4.2.0.201903051501

Gradle stopped supporting the OSGi plugin and this is what the suggested replacement, BND, does. I have no idea how to configure it.

PR welcome.

io7m

comment created time in 13 hours

issue openedReactiveX/RxJava

3.0.0-RC3 jars don't export packages via OSGi headers

Hello!

I've noticed that the 3.0.0-RC* artifacts on Maven Central don't export any packages via their OSGi headers despite actually having full OSGi metadata (note that all of the packages are there as Private-Package declarations):

Manifest-Version: 1.0
Automatic-Module-Name: io.reactivex.rxjava3
Bnd-LastModified: 1568707123117
Bundle-Description: Reactive Extensions for the JVM – a library for 
 composing asynchronous and event-based programs using observable sequ
 ences for the Java VM.
Bundle-DocURL: https://github.com/ReactiveX/RxJava
Bundle-ManifestVersion: 2
Bundle-Name: rxjava
Bundle-SymbolicName: rxjava
Bundle-Vendor: RxJava Contributors
Bundle-Version: 3.0.0.RC3
Created-By: 1.8.0_222 (Private Build)
Eclipse-ExtensibleAPI: true
Import-Package: org.reactivestreams;version="[1.0,2)"
Private-Package: io.reactivex.rxjava3.annotations,io.reactivex.rxjava3
 .core,io.reactivex.rxjava3.disposables,io.reactivex.rxjava3.exception
 s,io.reactivex.rxjava3.flowables,io.reactivex.rxjava3.functions,io.re
 activex.rxjava3.internal.disposables,io.reactivex.rxjava3.internal.fu
 nctions,io.reactivex.rxjava3.internal.fuseable,io.reactivex.rxjava3.i
 nternal.observers,io.reactivex.rxjava3.internal.operators.completable
 ,io.reactivex.rxjava3.internal.operators.flowable,io.reactivex.rxjava
 3.internal.operators.maybe,io.reactivex.rxjava3.internal.operators.mi
 xed,io.reactivex.rxjava3.internal.operators.observable,io.reactivex.r
 xjava3.internal.operators.parallel,io.reactivex.rxjava3.internal.oper
 ators.single,io.reactivex.rxjava3.internal.queue,io.reactivex.rxjava3
 .internal.schedulers,io.reactivex.rxjava3.internal.subscribers,io.rea
 ctivex.rxjava3.internal.subscriptions,io.reactivex.rxjava3.internal.u
 til,io.reactivex.rxjava3.observables,io.reactivex.rxjava3.observers,i
 o.reactivex.rxjava3.parallel,io.reactivex.rxjava3.plugins,io.reactive
 x.rxjava3.processors,io.reactivex.rxjava3.schedulers,io.reactivex.rxj
 ava3.subjects,io.reactivex.rxjava3.subscribers
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"
Tool: Bnd-4.2.0.201903051501

Is there some reason for this?

created time in 13 hours

pull request commentReactiveX/rxjs

fix: use `unknown` type for errors

I recall we had discussion similar to this but can't clearly remember conclusion.

Regardless, I believe this should be breaking changes.

OliverJAsh

comment created time in 13 hours

startedReactiveX/rxjs

started time in 13 hours

startedReactiveX/RxSwift

started time in 14 hours

issue closedReactiveX/rxjs

Breaking change since 6.5.0 - "of" no longer contains value object

Bug Report

Current Behavior "of" does not contain a value object

Reproduction

  • REPL or Repo link: https://stackblitz.com/edit/observable-of-test-breaking-change?file=package.json

Expected behavior "of" contains value object, or change made to remove as part of a new major version change

Environment

  • RxJS version: 6.5.x

Additional context/Screenshots Previously we were using the value object in of for simplifying unit testing. Upgrading to 6.5.x version causes the value object to disappear so all our unit tests now fail. In the reproduction link you can flip between 6.4.0 and 6.5.0 to see it only appearing in 6.4.0.

closed time in 14 hours

Jabark

issue commentReactiveX/rxjs

Breaking change since 6.5.0 - "of" no longer contains value object

Property value is internal and not exposed as public interface in 6.4.0 even. It is not breaking change as this was never public interface consumer intended to use.

Jabark

comment created time in 14 hours

startedReactiveX/rxjs

started time in 14 hours

fork getyourguide/RxSwift

Reactive Programming in Swift

fork in 15 hours

startedReactiveX/RxKotlin

started time in 15 hours

startedReactiveX/RxJava

started time in 15 hours

issue openedReactiveX/rxjs

Breaking change since 6.5.0 - "of" no longer contains value object

Bug Report

Current Behavior "of" does not contain a value object

Reproduction

  • REPL or Repo link: https://stackblitz.com/edit/observable-of-test-breaking-change?file=package.json

Expected behavior "of" contains value object, or change made to remove as part of a new major version change

Environment

  • RxJS version: 6.5.x

Additional context/Screenshots Previously we were using the value object in of for simplifying unit testing. Upgrading to 6.5.x version causes the value object to disappear so all our unit tests now fail. In the reproduction link you can flip between 6.4.0 and 6.5.0 to see it only appearing in 6.4.0.

created time in 15 hours

fork JeffryGonzalez/rxjs

A reactive programming library for JavaScript

https://rxjs.dev

fork in 15 hours

pull request commentReactiveX/RxSwift

Fix a bug that resource count doesn't decrease because of static locks

Maybe always use the custom class (even for no trace resources builds), and let the trace resources logic encapsulated inside it.

class RecursiveLock: NSRecursiveLock {
        override init(flag: Bool = false) {
            # if TRACE_RESOURCES
            if flag {
               _ = Resources.incrementTotal()
            }
            #endif 
            super.init()
        }

       # if TRACE_RESOURCES
        override func lock() {
            super.lock()
            _ = Resources.incrementTotal()
        }
        override func unlock() {
            super.unlock()
            _ = Resources.decrementTotal()
        }
        deinit {
            _ = Resources.decrementTotal()
        }
        #endif
    }

A bit ugly but ... Just an idea :))

devxoul

comment created time in 15 hours

startedReactiveX/RxKotlin

started time in 16 hours

fork Korpen/RxKotlin

RxJava bindings for Kotlin

fork in 16 hours

pull request commentReactiveX/RxSwift

Fix a bug that resource count doesn't decrease because of static locks

@freak4pc That was exactly my first attempt. But if you're not using TRACE_RESOURCES option RecursiveLock is equal to NSRecursiveLock, which means that you cannot pass the parameter to the initializer 😅

devxoul

comment created time in 16 hours

startedReactiveX/rxjs

started time in 16 hours

startedReactiveX/RxJava

started time in 16 hours

fork pcugogo/RxSwift-1

Reactive Programming in Swift

fork in 16 hours

startedReactiveX/RxJava

started time in 16 hours

fork davidmic/rxdart

The Reactive Extensions for Dart

http://reactivex.io

fork in 17 hours

Pull request review commentReactiveX/rxjs

fix: use `unknown` type for errors

 export type InteropObservable<T> = { [Symbol.observable]: () => Subscribable<T>; export interface NextObserver<T> {   closed?: boolean;   next: (value: T) => void;-  error?: (err: any) => void;+  error?: (err: unknown) => void;

There might be other places to update this.

OliverJAsh

comment created time in 17 hours

PR opened ReactiveX/rxjs

fix: use `unknown` type for errors

<!-- Thank you very much for your pull request!

If your PR is the addition of a new operator, please make sure all these boxes are ticked with an x:

  • [ ] Add the operator to Rx
  • [ ] It must have a -spec.ts tests file covering the canonical corner cases, with marble diagram tests
  • [ ] If possible, write a asDiagram test case too, for PNG diagram generation purposes
  • [ ] The spec file should have a type definition test at the end of the spec to verify type definition for various use cases
  • [ ] The operator must be documented in JSDoc style in the implementation file, including also the PNG marble diagram image
  • [ ] The operator should be listed in doc/operators.md in a category of operators
  • [ ] The operator should also be documented. See Documentation Guidelines.
  • [ ] It should also be inserted in the operator decision tree file doc/decision-tree-widget/tree.yml
  • [ ] You may need to update MIGRATION.md if the operator differs from the corresponding one in RxJS v4 -->

Description: Errors can be of any type. unknown is preferable to any, as any completely disables type checking:

declare const myError: any;
myError.some.property.that.does.not.exist // runtime error!
+18 -6

0 comment

3 changed files

pr created time in 17 hours

startedReactiveX/rxjs

started time in 17 hours

startedReactiveX/rxjs

started time in 17 hours

startedReactiveX/rxjs

started time in 18 hours

startedReactiveX/RxJava

started time in 18 hours

startedReactiveX/RxAndroid

started time in 18 hours

startedReactiveX/rxjs

started time in 19 hours

startedReactiveX/rxjs

started time in 19 hours

more