Skip to content

Commit

Permalink
Filter excluded dependencies in template files - fixes #1208
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Nov 10, 2015
1 parent 166f792 commit b2ac843
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.23.2 - 10.11.2015
* BUGFIX: Filter excluded dependencies in template files - https://github.com/fsprojects/Paket/issues/1208

#### 2.23.1 - 10.11.2015
* Framework dependencies were handled too strict - https://github.com/fsprojects/Paket/issues/1206

Expand Down
8 changes: 5 additions & 3 deletions src/Paket.Core/NupkgWriter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ let nuspecDoc (info:CompleteInfo) =
dep.SetAttributeValue(XName.Get "version", requirement.FormatInNuGetSyntax())
dep

let buildDependenciesNode dependencyList =
let buildDependenciesNode excludedDependencies dependencyList =
if List.isEmpty dependencyList then () else
let d = XElement(ns + "dependencies")
dependencyList |> List.iter (buildDependencyNode >> d.Add)
dependencyList
|> List.filter (fun d -> Set.contains (fst d) excludedDependencies |> not)
|> List.iter (buildDependencyNode >> d.Add)
metadataNode.Add d

let buildReferenceNode (fileName) =
Expand Down Expand Up @@ -126,7 +128,7 @@ let nuspecDoc (info:CompleteInfo) =

optional.References |> buildReferencesNode
optional.FrameworkAssemblyReferences |> buildFrameworkReferencesNode
optional.Dependencies |> buildDependenciesNode
optional.Dependencies |> buildDependenciesNode optional.ExcludedDependencies
XDocument(declaration, box root)

let corePropsPath = sprintf "package/services/metadata/core-properties/%s.psmdcp" corePropsId
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/PackageProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open Paket.PackageMetaData
open Chessie.ErrorHandling

let private merge buildConfig version projectFile templateFile =
let withVersion =
let withVersion =
match version with
| None -> templateFile
| Some v -> templateFile |> TemplateFile.setVersion v
Expand Down
4 changes: 2 additions & 2 deletions src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
<StartArguments>update group Build</StartArguments>
<StartArguments>pack output D:\code\paketbug\output</StartArguments>
<StartArguments>install</StartArguments>
<StartArguments>update</StartArguments>
<StartArguments>pack output "D:\code\PaketBox\publish"</StartArguments>
<StartAction>Project</StartAction>
<StartProgram>paket.exe</StartProgram>
<StartWorkingDirectory>c:\code\Paketkopie</StartWorkingDirectory>
<StartWorkingDirectory>C:\Temp\paket_test\</StartWorkingDirectory>
<StartWorkingDirectory>d:\code\paketkopie</StartWorkingDirectory>
<StartWorkingDirectory>d:\code\paketbug</StartWorkingDirectory>
<StartWorkingDirectory>d:\code\paketrepro</StartWorkingDirectory>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001197-too-strict-frameworks\temp\</StartWorkingDirectory>
<StartWorkingDirectory>D:\code\PaketBox\</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down

0 comments on commit b2ac843

Please sign in to comment.