diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 71c76f5ae6..dc4a72f1ba 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 2.39.4 - 28.12.2015 +* BUGFIX: Call OnCompleted in Observable.flatten - https://github.com/fsprojects/Paket/pull/1330 + #### 2.39.3 - 28.12.2015 * BUGFIX: Allow to restore packages from private feeds - https://github.com/fsprojects/Paket/issues/1326 diff --git a/paket.dependencies b/paket.dependencies index 57ca54aabf..8beebaa10c 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -3,7 +3,6 @@ source https://nuget.org/api/v2 nuget Newtonsoft.Json redirects: force nuget Argu nuget FSharp.Core redirects: force -nuget FSharp.Control.Reactive nuget Chessie github fsharp/FAKE src/app/FakeLib/Globbing/Globbing.fs diff --git a/paket.lock b/paket.lock index 32f1f23865..e7258f0a26 100644 --- a/paket.lock +++ b/paket.lock @@ -4,19 +4,8 @@ NUGET Argu (1.1.3) Chessie (0.2.2) FSharp.Core - FSharp.Control.Reactive (3.2.0) - FSharp.Core (>= 3.1.2) - Rx-Core (>= 2.2.5) - Rx-Interfaces (>= 2.2.5) - Rx-Linq (>= 2.2.5) FSharp.Core (4.0.0.1) - redirects: force Newtonsoft.Json (7.0.1) - redirects: force - Rx-Core (2.2.5) - Rx-Interfaces (>= 2.2.5) - Rx-Interfaces (2.2.5) - Rx-Linq (2.2.5) - Rx-Core (>= 2.2.5) - Rx-Interfaces (>= 2.2.5) GITHUB remote: fsharp/FAKE specs: diff --git a/src/Paket.Core/Paket.Core.fsproj b/src/Paket.Core/Paket.Core.fsproj index 6345feb4db..cc8bf9567c 100644 --- a/src/Paket.Core/Paket.Core.fsproj +++ b/src/Paket.Core/Paket.Core.fsproj @@ -161,17 +161,6 @@ - - - - - ..\..\packages\FSharp.Control.Reactive\lib\net40\FSharp.Control.Reactive.dll - True - True - - - - @@ -293,280 +282,4 @@ - - - - - ..\..\packages\Rx-Core\lib\windows8\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\net40\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\net45\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\sl5\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\windowsphone71\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\windowsphone8\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\portable-windows8+net45+wp8\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\portable-win81+wpa81\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\portable-net40+sl5+win8+wp8\System.Reactive.Core.dll - True - True - - - - - - - ..\..\packages\Rx-Core\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Core.dll - True - True - - - - - - - - - ..\..\packages\Rx-Interfaces\lib\windows8\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\net40\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\net45\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\sl5\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\windowsphone71\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\windowsphone8\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\portable-windows8+net45+wp8\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\portable-win81+wpa81\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\portable-net40+sl5+win8+wp8\System.Reactive.Interfaces.dll - True - True - - - - - - - ..\..\packages\Rx-Interfaces\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Interfaces.dll - True - True - - - - - - - - - ..\..\packages\Rx-Linq\lib\windows8\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\net40\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\net45\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\sl5\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\windowsphone71\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\windowsphone8\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\portable-windows8+net45+wp8\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\portable-win81+wpa81\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\portable-net40+sl5+win8+wp8\System.Reactive.Linq.dll - True - True - - - - - - - ..\..\packages\Rx-Linq\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Linq.dll - True - True - - - - \ No newline at end of file diff --git a/src/Paket.Core/PublicAPI.fs b/src/Paket.Core/PublicAPI.fs index fa1e408662..032fd35856 100644 --- a/src/Paket.Core/PublicAPI.fs +++ b/src/Paket.Core/PublicAPI.fs @@ -7,7 +7,6 @@ open Paket.PackageSources open System open System.IO open Chessie.ErrorHandling -open FSharp.Control.Reactive /// Paket API which is optimized for F# Interactive use. type Dependencies(dependenciesFileName: string) = @@ -457,7 +456,7 @@ type Dependencies(dependenciesFileName: string) = |> Seq.map (fun url -> NuGetV3.FindPackages(None, url, searchTerm, maxResults) |> Observable.ofAsyncWithToken cancellationToken) - |> Observable.mergeSeq + |> Seq.reduce Observable.merge |> Observable.flatten |> Observable.distinct diff --git a/src/Paket.Core/Utils.fs b/src/Paket.Core/Utils.fs index 56b4ab6a1a..58d9700fe1 100644 --- a/src/Paket.Core/Utils.fs +++ b/src/Paket.Core/Utils.fs @@ -7,7 +7,6 @@ open System.IO open System.Net open System.Xml open System.Text -open FSharp.Control.Reactive open Paket open Paket.Logging open Chessie.ErrorHandling @@ -517,10 +516,25 @@ module ObservableExtensions = { new IDisposable with member __.Dispose() = () } } - let flatten (a: IObservable<#seq<'a>>): IObservable<'a> = - a - |> Observable.map Observable.ofSeq - |> Observable.mergeInner + let flatten (input: IObservable<#seq<'a>>): IObservable<'a> = + { new IObservable<'a> with + member __.Subscribe obs = + let cts = new CancellationTokenSource() + let sub = + input.Subscribe + ({ new IObserver<#seq<'a>> with + member x.OnNext(values) = values |> Seq.iter obs.OnNext + member x.OnCompleted() = + cts.Cancel() + obs.OnCompleted() + member x.OnError(e) = + cts.Cancel() + obs.OnError(e) }) + + { new IDisposable with + member __.Dispose() = + sub.Dispose() + cts.Cancel() }} let distinct (a: IObservable<'a>): IObservable<'a> = let seen = HashSet() diff --git a/src/Paket.Core/paket.references b/src/Paket.Core/paket.references index 7368c23028..dd0e9b3b77 100644 --- a/src/Paket.Core/paket.references +++ b/src/Paket.Core/paket.references @@ -1,6 +1,5 @@ Newtonsoft.Json FSharp.Core -FSharp.Control.Reactive Chessie File:Globbing.fs . File:AssemblyReader.fs . \ No newline at end of file