Skip to content

Commit

Permalink
Merge branch 'master' into v3
Browse files Browse the repository at this point in the history
Conflicts:
	RELEASE_NOTES.md
	src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
	src/Paket.Core/AssemblyInfo.fs
	src/Paket.PowerShell/AssemblyInfo.fs
	src/Paket/AssemblyInfo.fs
  • Loading branch information
forki committed Feb 18, 2016
2 parents eb074c9 + 5c69b5a commit 0c7828c
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 20 deletions.
5 changes: 4 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#### 3.0.0-alpha050 - 15.02.2016
#### 3.0.0-alpha051 - 18.02.2016
* Allow to reference git repositories - http://fsprojects.github.io/Paket/git-dependencies.html
* Allow to run build commands on git repositories - http://fsprojects.github.io/Paket/git-dependencies.html#Running-a-build-in-git-repositories
* Allow to use git repositories as NuGet source - http://fsprojects.github.io/Paket/git-dependencies.html#Using-Git-repositories-as-NuGet-source

#### 2.50.11 - 18.02.2016
* BUGFIX: fixed group transitive dependency checking - https://github.com/fsprojects/Paket/pull/1479

#### 2.50.10 - 15.02.2016
* USABILITY: Touch project files when paket.lock changed in order to support incremental builds with MsBuild - https://github.com/fsprojects/Paket/issues/1471
* REVERT: 3fcac1dfd944ea2d32e5198923d3601b3cbf203c - https://github.com/fsprojects/Paket/issues/1472
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[assembly: AssemblyDescriptionAttribute("A package dependency manager for .NET with support for NuGet packages and GitHub repositories.")]
[assembly: AssemblyVersionAttribute("3.0.0")]
[assembly: AssemblyFileVersionAttribute("3.0.0")]
[assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha050")]
[assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha051")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "3.0.0";
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ open System.Reflection
[<assembly: AssemblyDescriptionAttribute("A package dependency manager for .NET with support for NuGet packages and GitHub repositories.")>]
[<assembly: AssemblyVersionAttribute("3.0.0")>]
[<assembly: AssemblyFileVersionAttribute("3.0.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha050")>]
[<assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha051")>]
do ()

module internal AssemblyVersionInformation =
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/Domain.fs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type PackageFilter =
| PackageFilter filter -> filter

/// Represents a normalized group name
[<System.Diagnostics.DebuggerDisplay("{Item}")>]
[<System.Diagnostics.DebuggerDisplay("{Item2}")>]
[<CustomEquality;CustomComparison>]
type GroupName =
| GroupName of string * string
Expand Down
34 changes: 20 additions & 14 deletions src/Paket.Core/LockFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -508,20 +508,26 @@ type LockFile(fileName:string,groups: Map<GroupName,LockFileGroup>) =
| None -> None

member this.GetTransitiveDependencies(groupName) =
let group = groups.[groupName]
let fromNuGets =
group.Resolution
|> Seq.map (fun d -> d.Value.Dependencies |> Seq.map (fun (n,_,_) -> n))
|> Seq.concat
|> Set.ofSeq

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

Set.union fromNuGets fromSourceFiles
let collectDependenciesForGroup group =
let fromNuGets =
group.Resolution
|> Seq.map (fun d -> d.Value.Dependencies |> Seq.map (fun (n,_,_) -> n))
|> Seq.concat
|> Set.ofSeq

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

Set.union fromNuGets fromSourceFiles

let group = groups.TryFind groupName
match group with
| None -> Set.empty
| Some group -> collectDependenciesForGroup group


member this.GetTopLevelDependencies(groupName) =
match groups |> Map.tryFind groupName with
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.PowerShell/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ open System.Reflection
[<assembly: AssemblyDescriptionAttribute("A package dependency manager for .NET with support for NuGet packages and GitHub repositories.")>]
[<assembly: AssemblyVersionAttribute("3.0.0")>]
[<assembly: AssemblyFileVersionAttribute("3.0.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha050")>]
[<assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha051")>]
do ()

module internal AssemblyVersionInformation =
Expand Down
2 changes: 1 addition & 1 deletion src/Paket/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ open System.Reflection
[<assembly: AssemblyDescriptionAttribute("A package dependency manager for .NET with support for NuGet packages and GitHub repositories.")>]
[<assembly: AssemblyVersionAttribute("3.0.0")>]
[<assembly: AssemblyFileVersionAttribute("3.0.0")>]
[<assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha050")>]
[<assembly: AssemblyInformationalVersionAttribute("3.0.0-alpha051")>]
do ()

module internal AssemblyVersionInformation =
Expand Down
28 changes: 28 additions & 0 deletions tests/Paket.Tests/UpdateProcessSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,4 +1101,32 @@ let ``SelectiveUpdate with SemVerUpdateMode.Minor updates package from a specifi
result
|> Seq.sortBy gfst
|> shouldEqual expected

[<Test>]
let ``adding new group to lockfile should not crash``() =
let update deps lock = selectiveUpdate true noSha1 (VersionsFromGraph graph) (PackageDetailsFromGraph graph) lock deps UpdateMode.Install SemVerUpdateMode.NoRestriction

let initialDepsText =
"""source http://www.nuget.org/api/v2
nuget Castle.Core-log4net ~> 3.2"""
let emptyLock = LockFile.Parse("test", [||])

let addGroupDepsText =
initialDepsText + """
group build
source http://www.nuget.org/api/v2
nuget FAKE"""
let deps = DependenciesFile.FromCode(initialDepsText)

let installlock,_ = update deps emptyLock
installlock.Groups.Count |> shouldEqual 1

let deps' = DependenciesFile.FromCode(addGroupDepsText)
let updatelock,_ = update deps' installlock

updatelock.Groups.Count |> shouldEqual 2

let group = updatelock.Groups.TryFind (GroupName "build")
group |> shouldNotEqual None
group.Value.Resolution.ContainsKey (PackageName "FAKE") |> shouldEqual true

0 comments on commit 0c7828c

Please sign in to comment.