Skip to content

Commit

Permalink
Treat runtime dependencies as transitive deps - fixes #2334
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed May 13, 2017
1 parent 6e08462 commit cd501c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* DEPRECATED: `FixNuspec` function is now obsolete, use `FixNuspecs` instead
* PERFORMANCE: Improved performance for some edge case - https://github.com/fsprojects/Paket/pull/2299
* BUGFIX: Improved C++ support
* BUGFIX: Treat runtime dependencies as transitive deps - https://github.com/fsprojects/Paket/issues/2334
* BUGFIX: Sort dependencies on obj/references files - https://github.com/fsprojects/Paket/issues/2310
* BUGFIX: Support .NET moniker ">= monoandroid" - https://github.com/fsprojects/Paket/issues/2246
* BUGFIX: Better dependencies file parser errors
Expand Down
15 changes: 13 additions & 2 deletions src/Paket.Core/PaketConfigFiles/LockFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -649,13 +649,24 @@ type LockFile (fileName:string, groups: Map<GroupName,LockFileGroup>) =
d.Value.Dependencies
|> Seq.map (fun (n,_,_) -> n))
|> Set.ofSeq

let runtimeDeps =
group.Resolution
|> Seq.choose (fun d ->
if d.Value.IsRuntimeDependency then
Some d.Value.Name
else
None)
|> Set.ofSeq

let fromSourceFiles =
group.RemoteFiles
|> Seq.collect (fun d -> d.Dependencies |> Seq.map fst)
|> Set.ofSeq

Set.union fromNuGets fromSourceFiles

fromSourceFiles
|> Set.union fromNuGets
|> Set.union runtimeDeps

match groups.TryFind groupName with
| None -> Set.empty
Expand Down

0 comments on commit cd501c8

Please sign in to comment.