Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: Ambiguity between ReactiveUI.Primitives and System.Reactive extension methods

Aperta
#154 9 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Inizia riproducendo la chiamata segnalata con ReactiveUI.Primitives e System.Reactive nello scope, quindi esamina SubscribeExtensions e ObservableExtensions per identificare le firme sovrapposte. Conferma la risoluzione scelta con la discussione dell’issue e verifica che l’esempio SaveCommand.ThrownExceptions.Subscribe venga compilato senza un errore di ambiguità.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Prerequisites
  • I have searched open and closed issues for duplicates.
  • I am using the latest stable release.
Describe the bug 🐞

Recreating this because I think there really might be an issue. Because ObservableExtensions is in System this clash will be triggered by "normal" use of global usings for System and ReactiveUI.Primitives.

I'm working on adoption of ReactiveUI 24, and have turned up this error, I think due to referencing both ReactiveUI 24 and DynamicData (which is pulling in System.Reactive):

The call is ambiguous between the following methods or properties: 'ReactiveUI.Primitives.SubscribeExtensions.extension<System.Exception>(System.IObservable<System.Exception>).Subscribe(System.Action<System.Exception>)' and 'System.ObservableExtensions.Subscribe(System.IObservable, System.Action)'

I can work around this by explicitly calling SubscribeExtensions.Subscribe(), however any thoughts on how best at deal with this?

Steps to reproduce

Code along the lines of:
this.SaveCommand.ThrownExceptions.Subscribe(e => activity.AddItem(e.ToString()));

With:
Both ReactiveUI 24 and System.Reactive referenced
Both SubscribeExtensions and ObservableExtensions are in scope

Reproduction repository

No response

Expected behavior

No ambiguity.

Screenshots 🖼️

No response

IDE

Visual Studio 2026

.NET version

.NET 10

Target framework(s)

net10.0

Operating system

Windows

OS version

No response

Device

No response

ReactiveUI version

21.1.0

Additional information ℹ️

ReactiveUI.Primitives 7.1.1

Lingua principale
C#
Stelle
15
Fork
3
Merge medio
4h 33m
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reactiveui/Primitives

Tutte le issue di reactiveui/Primitives

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.