Skip to content

Commit

Permalink
Don't touch deps from locally packages - fixes #1703
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed May 26, 2016
1 parent 073c9e3 commit 27fa378
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 8 deletions.
4 changes: 4 additions & 0 deletions integrationtests/Paket.IntegrationTests/UpdatePackageSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ let ``#1520 update with pinned dependency succeeds``() =
let ``#1534 resolves Selenium.Support``() =
update "i001534-selenium" |> ignore

[<Test>]
let ``#1703 resolves locally``() =
update "i001703-local" |> ignore


[<Test>]
let ``#1635 should tell about auth issue``() =
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source my-package-source
framework: net45
nuget Microsoft.AspNet.Mvc
nuget RazorEngine
5 changes: 1 addition & 4 deletions src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,11 @@ let getDetailsFromLocalNuGetPackage isCache root localNuGetPath (packageName:Pac
let nuspec = Nuspec.Load fileName

File.Delete(fileName)
let dependencies =
nuspec.Dependencies
|> List.map (fun (a,b,c) -> a,b, getRestrictionList c)

return
{ PackageName = nuspec.OfficialName
DownloadUrl = packageName.ToString()
Dependencies = Requirements.optimizeDependencies dependencies
Dependencies = nuspec.Dependencies
SourceUrl = di.FullName
CacheVersion = NuGetPackageCache.CurrentCacheVersion
LicenseUrl = nuspec.LicenseUrl
Expand Down
4 changes: 2 additions & 2 deletions src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<StartWorkingDirectory>D:\code\PaketKopie</StartWorkingDirectory>
<StartArguments>update -f</StartArguments>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001117-aws\temp</StartWorkingDirectory>
<StartArguments>update --keep-major</StartArguments>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001701-keep-major\temp</StartWorkingDirectory>
<StartArguments>update</StartArguments>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001703-local\temp</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
Expand Down
9 changes: 9 additions & 0 deletions tests/Paket.Tests/Nuspec/NuspecSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ let ``can detect framework assemblies for Microsoft.Net.Http``() =
FrameworkRestrictions =
FrameworkRestrictionList [FrameworkRestriction.Exactly(DotNetFramework(FrameworkVersion.V4_5))] }]

[<Test>]
let ``can detect deps assemblies for RazorEngine``() =
Nuspec.Load("Nuspec/RazorEngine.nuspec").Dependencies
|> shouldEqual
[PackageName "Microsoft.AspNet.Razor",DependenciesFileParser.parseVersionRequirement("= 2.0.30506.0"),
FrameworkRestrictionList [FrameworkRestriction.Exactly (DotNetFramework(FrameworkVersion.V4_Client))]
PackageName "Microsoft.AspNet.Razor",DependenciesFileParser.parseVersionRequirement(">= 3.0.0"),
FrameworkRestrictionList [FrameworkRestriction.AtLeast(DotNetFramework(FrameworkVersion.V4_5))]]

[<Test>]
let ``can detect framework assemblies for FluentAssertions``() =
Nuspec.Load("Nuspec/FluentAssertions.nuspec").FrameworkAssemblyReferences
Expand Down
27 changes: 27 additions & 0 deletions tests/Paket.Tests/Nuspec/RazorEngine.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>RazorEngine</id>
<version>3.7.3</version>
<title>RazorEngine</title>
<authors>Matthew Abbott, Ben Dornis, Matthias Dittrich</authors>
<owners>Matthew Abbott, Ben Dornis, Matthias Dittrich</owners>
<licenseUrl>https://github.com/Antaris/RazorEngine/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/Antaris/RazorEngine</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>RazorEngine - A Templating Engine based on the Razor parser.</description>
<summary>Simple templating using Razor syntax.</summary>
<releaseNotes>Template Run performance optimizations (https://github.com/Antaris/RazorEngine/pull/328)
Update to Razor4-beta7 (https://github.com/Antaris/RazorEngine/pull/319)</releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>C# razor template engine programming</tags>
<dependencies>
<group targetFramework=".NETFramework4.0">
<dependency id="Microsoft.AspNet.Razor" version="[2.0.30506.0]" />
</group>
<group targetFramework=".NETFramework4.5">
<dependency id="Microsoft.AspNet.Razor" version="3.0.0" />
</group>
</dependencies>
</metadata>
</package>
7 changes: 5 additions & 2 deletions tests/Paket.Tests/Paket.Tests.fsproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -115,10 +115,13 @@
</Content>
<Content Include="Nuspec\Fantomas.nuspec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</Content>
<Content Include="Nuspec\Microsoft.Net.Http.nuspec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Nuspec\RazorEngine.nuspec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Nuspec\FsXaml.Wpf.nuspec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down

0 comments on commit 27fa378

Please sign in to comment.