<commit_before>﻿/// Contains NuGet support.
module Paket.NuGetCache

open System
open System.IO
open System.Net
open Newtonsoft.Json
open System.IO.Compression
open System.Xml
open System.Text.RegularExpressions
open Paket.Logging
open System.Text

open Paket.Domain
open Paket.Utils
open Paket.Xml
open Paket.PackageSources
open Paket.Requirements
open FSharp.Polyfill
open System.Runtime.ExceptionServices

open Paket.Utils
open Paket.Domain
open Paket.Requirements
open Paket.Logging

open System.IO
open Chessie.ErrorHandling

open Newtonsoft.Json
open System

type NuGetResponseGetVersionsSuccess = string []
type NuGetResponseGetVersionsFailure =
    { Url : string; Error : ExceptionDispatchInfo }
    static member ofTuple (url,err) =
        { Url = url; Error = err }
type NuGetResponseGetVersions =
    | SuccessVersionResponse of NuGetResponseGetVersionsSuccess
    | ProtocolNotCached
    | FailedVersionRequest of NuGetResponseGetVersionsFailure
    member x.Versions =
        match x with
        | SuccessVersionResponse l -> l
        | ProtocolNotCached -> [||]
        | FailedVersionRequest _ -> [||]
    member x.IsSuccess =
        match x with
        | SuccessVersionResponse _ -> true
        | ProtocolNotCached -> false
        | FailedVersionRequest _ -> false
type NuGetResponseGetVersionsSimple = SafeWebResult<NuGetResponseGetVersionsSuccess><commit_msg>NuGetCache: show *which* path is too long, if _FileInfo_ fails<commit_after>﻿/// Contains NuGet support.
module Paket.NuGetCache

open System
open System.IO
open System.Net
open Newtonsoft.Json
open System.IO.Compression
open System.Xml
open System.Text.RegularExpressions
open Paket.Logging
open System.Text

open Paket.Domain
open Paket.Utils
open Paket.Xml
open Paket.PackageSources
open Paket.Requirements
open FSharp.Polyfill
open System.Runtime.ExceptionServices

open Paket.Utils
open Paket.Domain
open Paket.Requirements
open Paket.Logging

open System.IO
open Chessie.ErrorHandling

open Newtonsoft.Json
open System


// show the path that was too long
let FileInfo(str) =
    try
        FileInfo(str)
    with
      :? PathTooLongException as exn -> raise (PathTooLongException("Path too long: " + str, exn))

type NuGetResponseGetVersionsSuccess = string []
type NuGetResponseGetVersionsFailure =
    { Url : string; Error : ExceptionDispatchInfo }
    static member ofTuple (url,err) =
        { Url = url; Error = err }
type NuGetResponseGetVersions =
    | SuccessVersionResponse of NuGetResponseGetVersionsSuccess
    | ProtocolNotCached
    | FailedVersionRequest of NuGetResponseGetVersionsFailure
    member x.Versions =
        match x with
        | SuccessVersionResponse l -> l
        | ProtocolNotCached -> [||]
        | FailedVersionRequest _ -> [||]
    member x.IsSuccess =
        match x with
        | SuccessVersionResponse _ -> true
        | ProtocolNotCached -> false
        | FailedVersionRequest _ -> false
type NuGetResponseGetVersionsSimple = SafeWebResult<NuGetResponseGetVersionsSuccess>
{'fraction_non_alphanumeric': 0.06697612732095491, 'fraction_numerical': 0.0, 'mean_word_length': 3.7888888888888888, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5204906', 'n_tokens_mistral': 873, 'n_tokens_neox': 856, 'n_words': 237}