From 1cc416b75663110eb3011a397e1e367d26c7047f Mon Sep 17 00:00:00 2001 From: Evgeny Grebenyuk Date: Thu, 2 Nov 2017 14:28:54 +0100 Subject: [PATCH] Fix typos: degration -> degradation --- src/Paket.Core/Dependencies/NuGet.fs | 10 ++++----- src/Paket.Core/Dependencies/NuGetCache.fs | 26 +++++++++++------------ src/Paket.Core/Dependencies/NuGetV2.fs | 2 +- src/Paket.Core/Dependencies/NuGetV3.fs | 18 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Paket.Core/Dependencies/NuGet.fs b/src/Paket.Core/Dependencies/NuGet.fs index db50a8908f..a082bb887d 100644 --- a/src/Paket.Core/Dependencies/NuGet.fs +++ b/src/Paket.Core/Dependencies/NuGet.fs @@ -301,7 +301,7 @@ let rec private getPackageDetails alternativeProjectRoot root force (parameters: return! tryV3 nugetSource force with | exn -> - eprintfn "Possible Performance degration, V3 was not working: %s" exn.Message + eprintfn "Possible Performance degradation, V3 was not working: %s" exn.Message if verbose then printfn "Error while using V3 API: %O" exn @@ -622,19 +622,19 @@ let DownloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverride:bool let normalizedNupkgName = NuGetCache.GetPackageFileName packageName version let configResolved = config.Resolve root groupName packageName version includeVersionInPath let targetFileName = - if not isLocalOverride then + if not isLocalOverride then NuGetCache.GetTargetUserNupkg packageName version else match configResolved.Path with | Some p -> Path.Combine(p, nupkgName) | None -> failwithf "paket.local in combination with storage:none is not supported" - if isLocalOverride && not force then + if isLocalOverride && not force then failwithf "internal error: when isLocalOverride is specified then force needs to be specified as well" let targetFile = FileInfo targetFileName let licenseFileName = getLicenseFile packageName version - if force then + if force then match configResolved.Path with | Some p -> if verbose then @@ -746,7 +746,7 @@ let DownloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverride:bool let credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password)) request.Headers.[HttpRequestHeader.Authorization] <- String.Format("Basic {0}", credentials) | Some(Credentials(username, password, AuthType.NTLM)) -> - let cred = NetworkCredential(username,password) + let cred = NetworkCredential(username,password) request.Credentials <- cred.GetCredential(downloadUri, "NTLM") else request.UseDefaultCredentials <- true diff --git a/src/Paket.Core/Dependencies/NuGetCache.fs b/src/Paket.Core/Dependencies/NuGetCache.fs index 63c0b474bb..784218eaf1 100644 --- a/src/Paket.Core/Dependencies/NuGetCache.fs +++ b/src/Paket.Core/Dependencies/NuGetCache.fs @@ -65,10 +65,10 @@ type NuGetRequestGetVersions = async { try return! r.DoRequest() - with e -> + with e -> return FailedVersionRequest { Url = r.Url; Error = System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture e } } - + // An unparsed file in the NuGet package -> still need to inspect the path for further information. After parsing an entry will be part of a "LibFolder" for example. type UnparsedPackageFile = @@ -79,7 +79,7 @@ type UnparsedPackageFile = module NuGetConfig = open System.Text - + let writeNuGetConfig directory sources = let start = """ @@ -103,7 +103,7 @@ module NuGetConfig = else if File.ReadAllText(fileName) <> text then File.WriteAllText(fileName,text) - + type FrameworkRestrictionsCache = string type NuGetPackageCache = @@ -125,7 +125,7 @@ type NuGetPackageCache = SerializedDependencies = l |> List.map (fun (n,v, restrictions) -> - let restrictionString = + let restrictionString = match restrictions with | FrameworkRestrictions.AutoDetectFramework -> "AUTO" | FrameworkRestrictions.ExplicitRestriction re -> re.ToString() @@ -172,7 +172,7 @@ let tryGetDetailsFromCache force nugetURL (packageName:PackageName) (version:Sem if not force && cacheFile.Exists then try let json = File.ReadAllText(cacheFile.FullName) - + try let cacheResult = let cachedObject = JsonConvert.DeserializeObject json @@ -205,7 +205,7 @@ let tryGetDetailsFromCache force nugetURL (packageName:PackageName) (version:Sem let getDetailsFromCacheOr force nugetURL (packageName:PackageName) (version:SemVerInfo) (get : unit -> ODataSearchResult Async) : ODataSearchResult Async = let cacheFile, oldFiles = getCacheFiles NuGetPackageCache.CurrentCacheVersion nugetURL packageName version - for f in oldFiles do + for f in oldFiles do File.Delete f let get() = async { @@ -239,7 +239,7 @@ let fixDatesInArchive fileName = | _ -> e.LastWriteTime <- maxTime with | exn -> traceWarnfn "Could not fix timestamps in %s. Error: %s" fileName exn.Message - + let fixArchive fileName = if isMonoRuntime then @@ -256,8 +256,8 @@ let inline isExtracted (directory:DirectoryInfo) (packageName:PackageName) (vers if not fi.Exists then false else if not directory.Exists then false else directory.EnumerateFileSystemInfos() - |> Seq.exists (fun f -> - (not (String.equalsIgnoreCase f.FullName fi.FullName)) && + |> Seq.exists (fun f -> + (not (String.equalsIgnoreCase f.FullName fi.FullName)) && (not (String.equalsIgnoreCase f.FullName licenseFile))) let IsPackageVersionExtracted(config:ResolvedPackagesFolder, packageName:PackageName, version:SemVerInfo) = @@ -377,7 +377,7 @@ let ExtractPackage(fileName:string, targetFolder, packageName:PackageName, versi let text = if detailed then sprintf "%s In rare cases a firewall might have blocked the download. Please look into the file and see if it contains text with further information." Environment.NewLine else "" let path = try Path.GetFullPath fileName with :? PathTooLongException -> sprintf "%s (!too long!)" fileName raise (Exception(sprintf "Error during extraction of %s.%s%s" path Environment.NewLine text, exn)) - + cleanup directory if verbose then verbosefn "%O %O unzipped to %s" packageName version targetFolder @@ -506,7 +506,7 @@ let tryAndBlacklistUrl doBlackList doWarn (source:NugetSource) (tryAgain : 'a -> let cached = if doBlackList then tryUrlOrBlacklist (fun () -> async { return! f url.InstanceUrl }) (tryAgain >> not) (source, url.UrlId) - else + else async { let! result = f url.InstanceUrl return (tryAgain result |> not, result) @@ -523,7 +523,7 @@ let tryAndBlacklistUrl doBlackList doWarn (source:NugetSource) (tryAgain : 'a -> let! (isOk, res) = task |> Async.AwaitTask if not isOk then if doWarn then - eprintfn "Possible Performance degration, blacklist '%s'" url.InstanceUrl + eprintfn "Possible Performance degradation, blacklist '%s'" url.InstanceUrl return Choice2Of3 res else return Choice1Of3 res diff --git a/src/Paket.Core/Dependencies/NuGetV2.fs b/src/Paket.Core/Dependencies/NuGetV2.fs index 2d29487b3a..510b45c204 100644 --- a/src/Paket.Core/Dependencies/NuGetV2.fs +++ b/src/Paket.Core/Dependencies/NuGetV2.fs @@ -98,7 +98,7 @@ let tryGetAllVersionsFromNugetODataWithFilter (auth, nugetURL, package:PackageNa match tryGetAllVersionsFromNugetODataWithFilterWarnings.TryGetValue nugetURL with | true, true -> () | _, _ -> - eprintfn "Possible Performance degration, could not retrieve '%s', ignoring further warnings for this source" url + eprintfn "Possible Performance degradation, could not retrieve '%s', ignoring further warnings for this source" url tryGetAllVersionsFromNugetODataWithFilterWarnings.TryAdd(nugetURL, true) |> ignore if verbose then printfn "Error while retrieving data from '%s': %O" url exn diff --git a/src/Paket.Core/Dependencies/NuGetV3.fs b/src/Paket.Core/Dependencies/NuGetV3.fs index a7f3e181dc..f199be8e21 100644 --- a/src/Paket.Core/Dependencies/NuGetV3.fs +++ b/src/Paket.Core/Dependencies/NuGetV3.fs @@ -312,7 +312,7 @@ type PackageIndex = let private getPackageIndexRaw (source : NugetV3Source) (packageName:PackageName) = async { let! registrationUrl = getNuGetV3Resource source PackageIndex - let url = registrationUrl.Replace("{id-lower}", packageName.ToString().ToLower()) + let url = registrationUrl.Replace("{id-lower}", packageName.ToString().ToLower()) let! rawData = safeGetFromUrl (source.Authentication |> Option.map toCredentials, url, acceptJson) return match rawData with @@ -367,7 +367,7 @@ let getRelevantPage (source:NugetV3Source) (index:PackageIndex) (version:SemVerI |> Seq.toList match packages with | [ package ] -> return Some package - | [] -> return None + | [] -> return None | h :: _ -> // Can happen in theory when multiple versions differ only in casing... traceWarnfn "Multiple package versions matched with '%O' on page '%s'" version page.Id @@ -409,7 +409,7 @@ let getPackageDetails (source:NugetV3Source) (packageName:PackageName) (version: | None -> return EmptyResult | Some relevantPage -> let catalogData = relevantPage.PackageDetails - let dependencyGroups, dependencies = + let dependencyGroups, dependencies = if catalogData.DependencyGroups = null then [], [] else @@ -422,7 +422,7 @@ let getPackageDetails (source:NugetV3Source) (packageName:PackageName) (version: catalogData.DependencyGroups |> Seq.map (fun group -> detect group.TargetFramework) |> Seq.toList, catalogData.DependencyGroups - |> Seq.map(fun group -> + |> Seq.map(fun group -> if group.Dependencies = null then Seq.empty else @@ -447,7 +447,7 @@ let getPackageDetails (source:NugetV3Source) (packageName:PackageName) (version: for warning in warnings do Logging.traceWarnfn "%s" (warning.Format packageName version) - return + return { SerializedDependencies = [] PackageName = packageName.ToString() SourceUrl = source.Url @@ -462,8 +462,8 @@ let getPackageDetails (source:NugetV3Source) (packageName:PackageName) (version: let loadFromCacheOrGetDetails (force:bool) (cacheFileName:string) - (source:NugetV3Source) - (packageName:PackageName) + (source:NugetV3Source) + (packageName:PackageName) (version:SemVerInfo) = async { if not force && File.Exists cacheFileName then @@ -477,9 +477,9 @@ let loadFromCacheOrGetDetails (force:bool) return false,ODataSearchResult.Match cachedObject with exn -> if verboseWarnings then - eprintfn "Possible Performance degration, could not retrieve '%O' from cache: %O" packageName exn + eprintfn "Possible Performance degradation, could not retrieve '%O' from cache: %O" packageName exn else - eprintfn "Possible Performance degration, could not retrieve '%O' from cache: %s" packageName exn.Message + eprintfn "Possible Performance degradation, could not retrieve '%O' from cache: %s" packageName exn.Message let! details = getPackageDetails source packageName version return true,details else