Skip to content

Commit

Permalink
Be more careful with what you wish for
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Aug 26, 2016
1 parent d447078 commit dd616d8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### 3.17.0-alpha006 - 25.08.2016
#### 3.17.0-alpha007 - 25.08.2016
* Notified about missing libs will only be shown on direct packages (too many false positives)
* BUGFIX: Resolving .net standard depedencies for net46 - https://github.com/fsprojects/Paket/issues/1883
* BUGFIX: Change project file condition handling to be case-insensitive - https://github.com/fsprojects/Paket/pull/1890
Expand Down
6 changes: 6 additions & 0 deletions integrationtests/Paket.IntegrationTests/InstallSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ let ``#1883 install FSharp.Core from Chessie``() =
let newLockFile = install "i001883-chessie"
newLockFile.Groups.[GroupName "main"].Resolution.[PackageName "FSharp.Core"].Version |> shouldEqual (SemVer.Parse "4.0.0.1")


[<Test>]
let ``#1883 should not install .NET Standard``() =
let newLockFile = install "i001883-machine"
newLockFile.Groups.[GroupName "main"].Resolution |> Map.containsKey (PackageName "System.Reflection") |> shouldEqual false


[<Test>]
let ``#1815 duplicate fsharp core reference when using netstandard1.6``() =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source http://www.nuget.org/api/v2
framework >= net45
nuget Machine.Specifications 0.11
14 changes: 7 additions & 7 deletions src/Paket.Core/Requirements.fs
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ let hasDotNetFramework =
| FrameworkRestriction.AtLeast(DotNetFramework(_)) -> true
| _ -> false))

let optimizeDependencies packages =
let grouped = packages |> List.groupBy (fun (n,v,_) -> n,v)
let optimizeDependencies originalDependencies =
let grouped = originalDependencies |> List.groupBy (fun (n,v,_) -> n,v)

let expanded =
[for (n,vr,r:FrameworkRestriction list) in packages do
[for (n,vr,r:FrameworkRestriction list) in originalDependencies do
for r' in r do
yield n,vr,r']
|> List.groupBy (fun (_,_,r) -> r)
Expand Down Expand Up @@ -235,18 +235,18 @@ let optimizeDependencies packages =
|> Option.map fst

let emptyRestrictions =
[for (n,vr,r:FrameworkRestriction list) in packages do
[for (n,vr,r:FrameworkRestriction list) in originalDependencies do
if r = [] then
yield n,vr]
|> Set.ofList

let allRestrictions =
[for (n,vr,r:FrameworkRestriction list) in packages do
[for (n,vr,r:FrameworkRestriction list) in originalDependencies do
yield r]
|> Set.ofList

let restrictionsPerPackage =
packages
originalDependencies
|> List.groupBy (fun (n,vr,r) -> n,vr)
|> List.map (fun ((n,vr),rs) ->
n,vr,
Expand Down Expand Up @@ -350,7 +350,7 @@ let optimizeDependencies packages =
newRestictions
else
let newRestictions =
if hasDotNetFramework newRestictions then
if hasDotNetFramework originalDependencies then
newRestictions
else
newRestictions
Expand Down

0 comments on commit dd616d8

Please sign in to comment.