lempiji / rx

Reactive Extensions for D Programming Language
MIT License
53 stars 8 forks source link

RX fails with DMD 2.089 #39

Closed Robert-M-Muench closed 4 years ago

Robert-M-Muench commented 4 years ago
rx 0.11.0: building configuration "default"...
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\atomic.d(293,64): Error: template core.internal.atomic.atomicCompareExchangeStrongNoResult cannot deduce function from argument types !(cast(MemoryOrder)5, cast(MemoryOrder)5)(Disposable*, Disposable, Disposable), candidates are:
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\internal\atomic.d(479,6):        atomicCompareExchangeStrongNoResult(MemoryOrder succ = MemoryOrder.seq, MemoryOrder fail = MemoryOrder.seq, T)(T* dest, const T compare, T value)
  with succ = succ,
       fail = fail,
       T = rx.disposable.Disposable
  must satisfy the following constraint:
       CanCAS!T
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\atomic.d(313,28): Error: template instance core.atomic.cas!(cast(MemoryOrder)5, cast(MemoryOrder)5, Disposable, Disposable, Disposable) error instantiating
C:\Users\robby\AppData\Local\dub\packages\rx-0.11.0\rx\source\rx\disposable.d(342,17):        instantiated from here: cas!(cast(MemoryOrder)5, cast(MemoryOrder)5, Disposable, shared(Disposable), shared(Disposable))
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\atomic.d(293,64): Error: template core.internal.atomic.atomicCompareExchangeStrongNoResult cannot deduce function from argument types !(cast(MemoryOrder)5, cast(MemoryOrder)5)(Disposable*, Disposable, Disposable), candidates are:
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\internal\atomic.d(479,6):        atomicCompareExchangeStrongNoResult(MemoryOrder succ = MemoryOrder.seq, MemoryOrder fail = MemoryOrder.seq, T)(T* dest, const T compare, T value)
  with succ = succ,
       fail = fail,
       T = rx.disposable.Disposable
  must satisfy the following constraint:
       CanCAS!T
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\atomic.d(313,28): Error: template instance core.atomic.cas!(cast(MemoryOrder)5, cast(MemoryOrder)5, Disposable, Disposable, Cancelable) error instantiating
C:\Users\robby\AppData\Local\dub\packages\rx-0.11.0\rx\source\rx\util.d(47,16):        instantiated from here: cas!(cast(MemoryOrder)5, cast(MemoryOrder)5, Disposable, shared(Disposable), shared(Cancelable))
C:\Users\robby\AppData\Local\dub\packages\rx-0.11.0\rx\source\rx\disposable.d(359,47):        instantiated from here: exchange!(Disposable, shared(Cancelable))
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\atomic.d(99,46): Error: template core.internal.atomic.atomicLoad cannot deduce function from argument types !(cast(MemoryOrder)5)(shared(Disposable)*), candidates are:
C:\D\dmd2\windows\bin\..\..\src\druntime\import\core\internal\atomic.d(50,10):        atomicLoad(MemoryOrder order = MemoryOrder.seq, T)(inout(T)* src)
  with order = ms,
       T = shared(Disposable)
  must satisfy the following constraint:
       CanCAS!T
C:\Users\robby\AppData\Local\dub\packages\rx-0.11.0\rx\source\rx\util.d(48,22): Error: template instance core.atomic.atomicLoad!(cast(MemoryOrder)5, Disposable) error instantiating
C:\Users\robby\AppData\Local\dub\packages\rx-0.11.0\rx\source\rx\disposable.d(359,47):        instantiated from here: exchange!(Disposable, shared(Cancelable))
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
lempiji commented 4 years ago

It is caused by Regression in core.atomic. Since we are making a pull request, please wait a little longer for the compiler to fix it.

https://github.com/dlang/druntime/pull/2853

Robert-M-Muench commented 4 years ago

Ok. Going back to 088 and see if this works.

Robert-M-Muench commented 4 years ago

Doesn't help, need to switch to go back to RX 0.10.1 release.

lempiji commented 4 years ago

It was fixed in 2.090.0-beta. Please let me know if you have any other problems.:smiley:

Robert-M-Muench commented 4 years ago

IMO it was fixed in 2.089.1 see: https://dlang.org/changelog/2.089.1.html