Skip to content

Commit

Permalink
Merge upstream master/5.172.2 from fsprojects/Paket
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-svub authored Jun 15, 2018
2 parents f279a80 + 2bec065 commit 90d4927
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 27 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### 5.172.2 - 2018-06-11
* BUGFIX: Report only transitive settings changes - https://github.com/fsprojects/Paket/issues/3218

#### 5.172.1 - 2018-06-10
* PERFORMANCE: Add support for dotnet SDK fallback folder - https://github.com/fsprojects/Paket/pull/3242

#### 5.171.0 - 2018-06-07
* PERFORMANCE: Improved binding redirects performance by removing mono.cecil - https://github.com/fsprojects/Paket/pull/3239
* BUGFIX: paket template semver support fixes - https://github.com/fsprojects/Paket/pull/3230
Expand Down
2 changes: 1 addition & 1 deletion docs/content/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ committed to source control:
a [`paket.references` file](references-files.html) that specifies which of the
dependencies are installed in the project. Each of these files should be
committed to source control.
* All [`paket.template`](template-files.html). Tf a project is supposed to be
* All [`paket.template`](template-files.html). If a project is supposed to be
deployed as a NuGet project it will have a
[`paket.template` file](template-files.html) that specifies package metadata.
Each of these files should be committed to source control.
Expand Down
12 changes: 6 additions & 6 deletions src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
[assembly: AssemblyTitleAttribute("Paket.Bootstrapper")]
[assembly: AssemblyProductAttribute("Paket")]
[assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")]
[assembly: AssemblyVersionAttribute("5.171.0")]
[assembly: AssemblyFileVersionAttribute("5.171.0")]
[assembly: AssemblyInformationalVersionAttribute("5.171.0")]
[assembly: AssemblyVersionAttribute("5.172.2")]
[assembly: AssemblyFileVersionAttribute("5.172.2")]
[assembly: AssemblyInformationalVersionAttribute("5.172.2")]
namespace System {
internal static class AssemblyVersionInformation {
internal const System.String AssemblyTitle = "Paket.Bootstrapper";
internal const System.String AssemblyProduct = "Paket";
internal const System.String AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories.";
internal const System.String AssemblyVersion = "5.171.0";
internal const System.String AssemblyFileVersion = "5.171.0";
internal const System.String AssemblyInformationalVersion = "5.171.0";
internal const System.String AssemblyVersion = "5.172.2";
internal const System.String AssemblyFileVersion = "5.172.2";
internal const System.String AssemblyInformationalVersion = "5.172.2";
}
}
12 changes: 6 additions & 6 deletions src/Paket.Core/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("Paket")>]
[<assembly: AssemblyCompanyAttribute("Paket team")>]
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("5.171.0")>]
[<assembly: AssemblyFileVersionAttribute("5.171.0")>]
[<assembly: AssemblyInformationalVersionAttribute("5.171.0")>]
[<assembly: AssemblyVersionAttribute("5.172.2")>]
[<assembly: AssemblyFileVersionAttribute("5.172.2")>]
[<assembly: AssemblyInformationalVersionAttribute("5.172.2")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "Paket.Core"
let [<Literal>] AssemblyProduct = "Paket"
let [<Literal>] AssemblyCompany = "Paket team"
let [<Literal>] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."
let [<Literal>] AssemblyVersion = "5.171.0"
let [<Literal>] AssemblyFileVersion = "5.171.0"
let [<Literal>] AssemblyInformationalVersion = "5.171.0"
let [<Literal>] AssemblyVersion = "5.172.2"
let [<Literal>] AssemblyFileVersion = "5.172.2"
let [<Literal>] AssemblyInformationalVersion = "5.172.2"
15 changes: 14 additions & 1 deletion src/Paket.Core/Dependencies/NuGet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,22 @@ let private downloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverr
| _ -> getFromCache rest
| [] -> false

let getFromFallbackFolder () =
match NuGetCache.TryGetFallbackNupkg packageName version with
| Some fileName ->
verbosefn "Copying %O %O from SDK cache" packageName version
use __ = Profile.startCategory Profile.Category.FileIO
ensureDir targetFileName
File.Copy(fileName,targetFileName,true)
true
| None -> false

let rec download authenticated attempt =
async {
if not force && targetFile.Exists && targetFile.Length > 0L then
if verbose then
verbosefn "%O %O already downloaded." packageName version
elif not force && getFromCache caches then
elif getFromFallbackFolder () || (not force && getFromCache caches) then
()
else
match source with
Expand Down Expand Up @@ -985,11 +995,14 @@ let private downloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverr
otherConfig.Path |> Option.iter SymlinkUtils.delete

let! extractedUserFolder = ExtractPackageToUserFolder(targetFile.FullName, packageName, version, kind)

let! files = NuGetCache.CopyFromCache(otherConfig, targetFile.FullName, licenseFileName, packageName, version, force, detailed)

let finalFolder =
match files with
| Some f -> f
| None -> extractedUserFolder

return targetFileName,finalFolder
}

Expand Down
15 changes: 15 additions & 0 deletions src/Paket.Core/Dependencies/NuGetCache.fs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,21 @@ let GetTargetUserNupkg (packageName:PackageName) (version:SemVerInfo) =
let GetTargetUserToolsFolder (packageName:PackageName) (version:SemVerInfo) =
DirectoryInfo(Path.Combine(Constants.UserNuGetPackagesFolder,".tools",packageName.CompareString,version.Normalize())).FullName

let TryGetFallbackFolder () =
let dotnet = if isUnix then "dotnet" else "dotnet.exe"
ProcessHelper.tryFindFileOnPath dotnet |> Option.bind (fun fileName ->
let dotnetDir = Path.GetDirectoryName fileName
let fallbackDir = Path.Combine (dotnetDir, "sdk", "NuGetFallbackFolder")
if Directory.Exists fallbackDir then Some fallbackDir else None)

let TryGetFallbackNupkg (packageName:PackageName) (version:SemVerInfo) =
match TryGetFallbackFolder() with
| Some folder ->
let normalizedNupkgName = GetPackageFileName packageName version
let fallbackFile = Path.Combine(folder, packageName.CompareString, version.Normalize(), normalizedNupkgName) |> FileInfo
if fallbackFile.Exists && fallbackFile.Length > 0L then Some fallbackFile.FullName else None
| None -> None

/// Extracts the given package to the user folder
let rec ExtractPackageToUserFolder(fileName:string, packageName:PackageName, version:SemVerInfo, kind:PackageResolver.ResolvedPackageKind) =
async {
Expand Down
16 changes: 10 additions & 6 deletions src/Paket.Core/Installation/DependencyChangeDetection.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open Paket.PackageResolver
type DependencyChangeType =
/// The restrictions changed
| RestrictionsChanged
/// The settigns of the package changed
/// The settings of the package changed
| SettingsChanged
/// The Version in the LockFile doesn't match the spec in the dependencies file.
| VersionNotValid
Expand All @@ -24,12 +24,16 @@ let findNuGetChangesInDependenciesFile(dependenciesFile:DependenciesFile,lockFil
if newRequirement.Settings <> originalPackage.Settings then
if newRequirement.Settings = { originalPackage.Resolved.Settings with FrameworkRestrictions = AutoDetectFramework } then
[]
elif newRequirement.Settings.FrameworkRestrictions <> originalPackage.Settings.FrameworkRestrictions then
else
let isTransitive = transitives |> Seq.contains originalPackage.Name
if not isTransitive then
[RestrictionsChanged]
else []
else [SettingsChanged]
if isTransitive then
[]
else
if newRequirement.Settings.FrameworkRestrictions <> originalPackage.Settings.FrameworkRestrictions then
[RestrictionsChanged]
else
[SettingsChanged]

else []

let requirementOk =
Expand Down
12 changes: 6 additions & 6 deletions src/Paket/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("Paket")>]
[<assembly: AssemblyCompanyAttribute("Paket team")>]
[<assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")>]
[<assembly: AssemblyVersionAttribute("5.171.0")>]
[<assembly: AssemblyFileVersionAttribute("5.171.0")>]
[<assembly: AssemblyInformationalVersionAttribute("5.171.0")>]
[<assembly: AssemblyVersionAttribute("5.172.2")>]
[<assembly: AssemblyFileVersionAttribute("5.172.2")>]
[<assembly: AssemblyInformationalVersionAttribute("5.172.2")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "Paket"
let [<Literal>] AssemblyProduct = "Paket"
let [<Literal>] AssemblyCompany = "Paket team"
let [<Literal>] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."
let [<Literal>] AssemblyVersion = "5.171.0"
let [<Literal>] AssemblyFileVersion = "5.171.0"
let [<Literal>] AssemblyInformationalVersion = "5.171.0"
let [<Literal>] AssemblyVersion = "5.172.2"
let [<Literal>] AssemblyFileVersion = "5.172.2"
let [<Literal>] AssemblyInformationalVersion = "5.172.2"
2 changes: 1 addition & 1 deletion src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<StartWorkingDirectory>C:\temp\paket-conflict\paket.conflict.app</StartWorkingDirectory>
<StartWorkingDirectory>D:\temp\i3032</StartWorkingDirectory>
<StartWorkingDirectory>C:\code\Paket\integrationtests\scenarios\i003062-external-lock\before</StartWorkingDirectory>
<StartWorkingDirectory>E:\Projects\Fulma</StartWorkingDirectory>
<StartWorkingDirectory>C:\code\logary</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
Expand Down

0 comments on commit 90d4927

Please sign in to comment.