fix 10665 - possible deadlock in stdio (#10680)

* fix 10665 - Possible deadlock reading stdout and stderr #10665

* Add timeout to resolve api

* validation

* surface area

* FSharpqa test
This commit is contained in:
Kevin Ransom (msft) 2020-12-14 12:29:34 -08:00 коммит произвёл nosami
Родитель 586c9febf7
Коммит 1729d11db9
25 изменённых файлов: 458 добавлений и 63 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -140,3 +140,6 @@ _NCrunch_*
nCrunchTemp_*
.idea
/tests/fsharp/core/members/set-only-property/vb.dll
/tests/fsharp/core/members/set-only-property/fs.dll
/tests/fsharp/core/members/set-only-property/cs.dll

Просмотреть файл

@ -7,3 +7,6 @@ loadNugetPackage,"Load Nuget Package"
version,"version"
highestVersion,"with the highest version"
sourceDirectoryDoesntExist,"The source directory '%s' not found"
timedoutResolvingPackages,"Timed out resolving packages, process: '%s' '%s'"
invalidTimeoutValue,"Invalid value for timeout '%s', valid values: none, -1 and integer milliseconds to wait"
missingTimeoutValue,"Missing value for timeout"

Просмотреть файл

@ -5,6 +5,7 @@ open System
open System.Diagnostics
open System.IO
open System.Reflection
open FSDependencyManager
[<AttributeUsage(AttributeTargets.Assembly ||| AttributeTargets.Class , AllowMultiple = false)>]
type DependencyManagerAttribute() = inherit System.Attribute()
@ -153,20 +154,21 @@ module internal Utilities =
else
None
let drainStreamToMemory (stream: StreamReader) =
let mutable list = ResizeArray()
let rec copyLines () =
match stream.ReadLine() with
| null -> ()
| line ->
list.Add line
copyLines ()
copyLines ()
list.ToArray()
let executeBuild pathToExe arguments workingDir =
let executeBuild pathToExe arguments workingDir timeout =
match pathToExe with
| Some path ->
let errorsList = ResizeArray()
let outputList = ResizeArray()
let mutable errorslock = obj
let mutable outputlock = obj
let outputDataReceived (message: string) =
if not (isNull message) then
lock outputlock (fun () -> outputList.Add(message))
let errorDataReceived (message: string) =
if not (isNull message) then
lock errorslock (fun () -> errorsList.Add(message))
let psi = ProcessStartInfo()
psi.FileName <- path
psi.WorkingDirectory <- workingDir
@ -179,23 +181,28 @@ module internal Utilities =
use p = new Process()
p.StartInfo <- psi
p.Start() |> ignore
let stdOut = drainStreamToMemory p.StandardOutput
let stdErr = drainStreamToMemory p.StandardError
p.OutputDataReceived.Add(fun a -> outputDataReceived a.Data)
p.ErrorDataReceived.Add(fun a -> errorDataReceived a.Data)
if p.Start() then
p.BeginOutputReadLine()
p.BeginErrorReadLine()
if not(p.WaitForExit(timeout)) then
// Timed out resolving throw a diagnostic.
raise (new TimeoutException(SR.timedoutResolvingPackages(psi.FileName, psi.Arguments)))
else
()
#if DEBUG
File.WriteAllLines(Path.Combine(workingDir, "StandardOutput.txt"), stdOut)
File.WriteAllLines(Path.Combine(workingDir, "StandardError.txt"), stdErr)
File.WriteAllLines(Path.Combine(workingDir, "StandardOutput.txt"), outputList)
File.WriteAllLines(Path.Combine(workingDir, "StandardError.txt"), errorsList)
#endif
p.WaitForExit()
p.ExitCode = 0, stdOut, stdErr
p.ExitCode = 0, outputList.ToArray(), errorsList.ToArray()
| None -> false, Array.empty, Array.empty
let buildProject projectPath binLogPath =
let buildProject projectPath binLogPath timeout =
let binLoggingArguments =
match binLogPath with
| Some(path) ->
@ -205,6 +212,11 @@ module internal Utilities =
sprintf "/bl:\"%s\"" path
| None -> ""
let timeout =
match timeout with
| Some(timeout) -> timeout
| None -> -1
let arguments prefix =
sprintf "%s -restore %s %c%s%c /nologo /t:InteractivePackageManagement" prefix binLoggingArguments '\"' projectPath '\"'
@ -213,10 +225,10 @@ module internal Utilities =
let success, stdOut, stdErr =
if not (isRunningOnCoreClr) then
// The Desktop build uses "msbuild" to build
executeBuild msbuildExePath (arguments "-v:quiet") workingDir
executeBuild msbuildExePath (arguments "-v:quiet") workingDir timeout
else
// The coreclr uses "dotnet msbuild" to build
executeBuild dotnetHostPath (arguments "msbuild -v:quiet") workingDir
executeBuild dotnetHostPath (arguments "msbuild -v:quiet") workingDir timeout
let outputFile = projectPath + ".resolvedReferences.paths"
let resolutionsFile = if success && File.Exists(outputFile) then Some outputFile else None

Просмотреть файл

@ -51,7 +51,7 @@ module FSharpDependencyManager =
| _ -> ()
}
let parsePackageReferenceOption scriptExt (setBinLogPath: string option option -> unit) (line: string) =
let parsePackageReferenceOption scriptExt (setBinLogPath: string option option -> unit) (setTimeout: int option -> unit) (line: string) =
let validatePackageName package packageName =
if String.Compare(packageName, package, StringComparison.OrdinalIgnoreCase) = 0 then
raise (ArgumentException(SR.cantReferenceSystemPackage(packageName)))
@ -80,6 +80,16 @@ module FSharpDependencyManager =
| Some "restoresources", Some v -> Some { current with RestoreSources = concat current.RestoreSources v } |> parsePackageReferenceOption' rest implicitArgumentCount
| Some "restoresources", None -> raise (ArgumentException(SR.requiresAValue("RestoreSources")))
| Some "script", Some v -> Some { current with Script = v } |> parsePackageReferenceOption' rest implicitArgumentCount
| Some "timeout", None -> raise (ArgumentException(SR.missingTimeoutValue()))
| Some "timeout", value ->
match value with
| Some v when v.GetType() = typeof<string> ->
let parsed, value = Int32.TryParse(v)
if parsed && value >= 0 then setTimeout (Some (Int32.Parse v))
elif v = "none" then setTimeout (Some -1)
else raise (ArgumentException(SR.invalidTimeoutValue(v)))
| _ -> setTimeout None // auto-generated logging location
parsePackageReferenceOption' rest implicitArgumentCount packageReference
| Some "bl", value ->
match value with
| Some v when v.ToLowerInvariant() = "true" -> setBinLogPath (Some None) // auto-generated logging location
@ -97,6 +107,9 @@ module FSharpDependencyManager =
// to reference a package named 'bl' they still have the 'Include=bl' syntax as a fallback.
setBinLogPath (Some None) // auto-generated logging location
parsePackageReferenceOption' rest implicitArgumentCount packageReference
| "timeout" ->
// bare timeout is invalid
raise (ArgumentException(SR.missingTimeoutValue()))
| _ ->
match implicitArgumentCount with
| 0 -> addInclude v
@ -109,21 +122,23 @@ module FSharpDependencyManager =
let parsePackageReference scriptExt (lines: string list) =
let mutable binLogPath = None
let mutable timeout = None
lines
|> List.choose (fun line -> parsePackageReferenceOption scriptExt (fun p -> binLogPath <- p) line)
|> List.choose (fun line -> parsePackageReferenceOption scriptExt (fun p -> binLogPath <- p) (fun t -> timeout <- t) line)
|> List.distinct
|> (fun l -> l, binLogPath)
|> (fun l -> l, binLogPath, timeout)
let parsePackageDirective scriptExt (lines: (string * string) list) =
let mutable binLogPath = None
let mutable timeout = None
lines
|> List.map(fun (directive, line) ->
match directive with
| "i" -> sprintf "RestoreSources=%s" line
| _ -> line)
|> List.choose (fun line -> parsePackageReferenceOption scriptExt (fun p -> binLogPath <- p) line)
|> List.choose (fun line -> parsePackageReferenceOption scriptExt (fun p -> binLogPath <- p) (fun t -> timeout <- t) line)
|> List.distinct
|> (fun l -> l, binLogPath)
|> (fun l -> l, binLogPath, timeout)
/// The results of ResolveDependencies
type ResolveDependenciesResult (success: bool, stdOut: string array, stdError: string array, resolutions: string seq, sourceFiles: string seq, roots: string seq) =
@ -193,13 +208,13 @@ type FSharpDependencyManager (outputDir:string option) =
sw.WriteLine(body)
with | _ -> ()
let prepareDependencyResolutionFiles (scriptExt: string, packageManagerTextLines: (string * string) seq, targetFrameworkMoniker: string, runtimeIdentifier: string): PackageBuildResolutionResult =
let prepareDependencyResolutionFiles (scriptExt: string, packageManagerTextLines: (string * string) seq, targetFrameworkMoniker: string, runtimeIdentifier: string, timeout: int): PackageBuildResolutionResult =
let scriptExt =
match scriptExt with
| ".csx" -> csxExt
| _ -> fsxExt
let packageReferences, binLogPath =
let packageReferences, binLogPath, package_timeout =
packageManagerTextLines
|> List.ofSeq
|> FSharpDependencyManager.parsePackageDirective scriptExt
@ -213,7 +228,6 @@ type FSharpDependencyManager (outputDir:string option) =
let projectPath = Path.Combine(scriptsPath, "Project.fsproj")
// Generate project files
let generateAndBuildProjectArtifacts =
let writeFile path body =
if not (generatedScripts.ContainsKey(body.GetHashCode().ToString())) then
@ -225,8 +239,12 @@ type FSharpDependencyManager (outputDir:string option) =
.Replace("$(PACKAGEREFERENCES)", packageReferenceText)
.Replace("$(SCRIPTEXTENSION)", scriptExt)
let timeout =
match package_timeout with
| Some _ -> package_timeout
| None -> Some timeout
writeFile projectPath generateProjBody
buildProject projectPath binLogPath
buildProject projectPath binLogPath timeout
generateAndBuildProjectArtifacts
@ -242,14 +260,14 @@ type FSharpDependencyManager (outputDir:string option) =
sprintf """ #r "nuget:FSharp.Data";; // %s 'FSharp.Data' %s""" (SR.loadNugetPackage()) (SR.highestVersion())
|]
member this.ResolveDependencies(scriptExt: string, packageManagerTextLines: (string * string) seq, targetFrameworkMoniker: string, runtimeIdentifier: string) : obj =
member this.ResolveDependencies(scriptExt: string, packageManagerTextLines: (string * string) seq, targetFrameworkMoniker: string, runtimeIdentifier: string, timeout: int) : obj =
let poundRprefix =
match scriptExt with
| ".csx" -> "#r \""
| _ -> "#r @\""
let generateAndBuildProjectArtifacts =
let resolutionResult = prepareDependencyResolutionFiles (scriptExt, packageManagerTextLines, targetFrameworkMoniker, runtimeIdentifier)
let resolutionResult = prepareDependencyResolutionFiles (scriptExt, packageManagerTextLines, targetFrameworkMoniker, runtimeIdentifier, timeout)
match resolutionResult.resolutionsFile with
| Some file ->
let resolutions = getResolutionsFromFile file

Просмотреть файл

@ -4,8 +4,8 @@ namespace FSharp.DependencyManager.Nuget
module internal FSharpDependencyManager =
val formatPackageReference: PackageReference -> seq<string>
val parsePackageReference: scriptExt: string -> string list -> PackageReference list * string option option
val parsePackageDirective: scriptExt: string -> (string * string) list -> PackageReference list * string option option
val parsePackageReference: scriptExt: string -> string list -> PackageReference list * string option option * int option
val parsePackageDirective: scriptExt: string -> (string * string) list -> PackageReference list * string option option * int option
/// The results of ResolveDependencies
[<Class>]
@ -49,4 +49,4 @@ type FSharpDependencyManager =
member HelpMessages:string[]
member ResolveDependencies: scriptExt: string * packageManagerTextLines: (string * string) seq * targetFrameworkMoniker: string * runtimeIdentifier: string -> obj
member ResolveDependencies: scriptExt: string * packageManagerTextLines: (string * string) seq * targetFrameworkMoniker: string * runtimeIdentifier: string * timeout: int-> obj

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">s nejvyšší verzí</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Načíst balíček NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Nepoužito</target>
@ -32,6 +42,11 @@
<target state="translated">Zdrojový adresář {0} se nenašel.</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Nepovedlo se použít implicitní počet argumentů {0}.</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">mit der höchsten Version</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">NuGet-Paket laden</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Nicht verwendet</target>
@ -32,6 +42,11 @@
<target state="translated">Das Quellverzeichnis "{0}" wurde nicht gefunden.</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Die Zahl für das implizierte Argument ({0}) kann nicht angewendet werden.</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">con la última versión</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Cargar paquete NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">No se usa</target>
@ -32,6 +42,11 @@
<target state="translated">No se encuentra el directorio de origen "{0}".</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">No se puede aplicar el número de argumento implícito {0}.</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">avec la version la plus récente</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Charger le package NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Non utilisé</target>
@ -32,6 +42,11 @@
<target state="translated">Le répertoire source '{0}' est introuvable</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Impossible d'appliquer le numéro d'argument implicite {0}</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">con la versione massima</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Carica pacchetto NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Non usato</target>
@ -32,6 +42,11 @@
<target state="translated">La directory di origine '{0}' non è stata trovata</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Non è possibile applicare il numero di argomento implicito {0}</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">最新バージョン</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">NuGet パッケージの読み込み</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">未使用</target>
@ -32,6 +42,11 @@
<target state="translated">ソース ディレクトリ '{0}' が見つかりません</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">暗黙的な引数番号 {0} を適用できません</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">최상위 버전으로</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">NuGet 패키지 로드</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">사용 안 함</target>
@ -32,6 +42,11 @@
<target state="translated">소스 디렉터리 '{0}'을(를) 찾을 수 없음</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">암시적 인수 번호 {0}을(를) 적용할 수 없습니다.</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">z najwyższą wersją</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Załaduj pakiet NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Nieużywane</target>
@ -32,6 +42,11 @@
<target state="translated">Nie znaleziono katalogu źródłowego „{0}”</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Nie można zastosować niejawnego argumentu o numerze {0}</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">com a versão mais recente</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Carregar Pacote NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Não usado</target>
@ -32,6 +42,11 @@
<target state="translated">O diretório de origem '{0}' não foi localizado</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Não é possível aplicar o número do argumento implícito {0}</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">с наивысшей версией</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">Загрузить пакет NuGet</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Не используется</target>
@ -32,6 +42,11 @@
<target state="translated">Исходный каталог "{0}" не найден</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Не удалось применить неявный аргумент с номером {0}</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">en yüksek sürümle</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">NuGet Paketini Yükle</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">Kullanılmıyor</target>
@ -32,6 +42,11 @@
<target state="translated">'{0}' kaynak dizini bulunamadı</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">Örtük bağımsız değişken sayısı ({0}) uygulanamıyor</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">具有最高版本</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">加载 Nuget 包</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">未使用</target>
@ -32,6 +42,11 @@
<target state="translated">找不到源目录“{0}”</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">无法应用隐式参数号 {0}</target>

Просмотреть файл

@ -12,11 +12,21 @@
<target state="translated">具有最高版本</target>
<note />
</trans-unit>
<trans-unit id="invalidTimeoutValue">
<source>Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</source>
<target state="new">Invalid value for timeout '{0}', valid values: none, -1 and integer milliseconds to wait</target>
<note />
</trans-unit>
<trans-unit id="loadNugetPackage">
<source>Load Nuget Package</source>
<target state="translated">載入 Nuget 套件</target>
<note />
</trans-unit>
<trans-unit id="missingTimeoutValue">
<source>Missing value for timeout</source>
<target state="new">Missing value for timeout</target>
<note />
</trans-unit>
<trans-unit id="notUsed">
<source>Not used</source>
<target state="translated">未使用</target>
@ -32,6 +42,11 @@
<target state="translated">找不到來源目錄 '{0}'</target>
<note />
</trans-unit>
<trans-unit id="timedoutResolvingPackages">
<source>Timed out resolving packages, process: '{0}' '{1}'</source>
<target state="new">Timed out resolving packages, process: '{0}' '{1}'</target>
<note />
</trans-unit>
<trans-unit id="unableToApplyImplicitArgument">
<source>Unable to apply implicit argument number {0}</source>
<target state="translated">無法套用隱含引數號碼 {0}</target>

Просмотреть файл

@ -1,4 +1,4 @@
# Microsoft.DotNet.DependencyManager resource strings
3216,packageManagerUnknown,"Package manager key '%s' was not registered in %s. Currently registered: %s"
3217,packageManagerError,"%s"
3247,couldNotLoadDependencyManagerExtension,"The dependency manager extension %s could not be loaded. Message: %s"
3400,packageManagerUnknown,"Package manager key '%s' was not registered in %s. Currently registered: %s"
3401,packageManagerError,"%s"
3402,couldNotLoadDependencyManagerExtension,"The dependency manager extension %s could not be loaded. Message: %s"

Просмотреть файл

@ -122,7 +122,7 @@ type IDependencyManagerProvider =
abstract Name: string
abstract Key: string
abstract HelpMessages: string[]
abstract ResolveDependencies: scriptDir: string * mainScriptName: string * scriptName: string * scriptExt: string * packageManagerTextLines: (string * string) seq * tfm: string * rid: string -> IResolveDependenciesResult
abstract ResolveDependencies: scriptDir: string * mainScriptName: string * scriptName: string * scriptExt: string * packageManagerTextLines: (string * string) seq * tfm: string * rid: string * timeout: int-> IResolveDependenciesResult
type ReflectionDependencyManagerProvider(theType: Type,
nameProperty: PropertyInfo,
@ -130,6 +130,7 @@ type ReflectionDependencyManagerProvider(theType: Type,
helpMessagesProperty: PropertyInfo option,
resolveDeps: MethodInfo option,
resolveDepsEx: MethodInfo option,
resolveDepsExWithTimeout: MethodInfo option,
outputDir: string option) =
let instance = Activator.CreateInstance(theType, [| outputDir :> obj |])
let nameProperty = nameProperty.GetValue >> string
@ -152,11 +153,13 @@ type ReflectionDependencyManagerProvider(theType: Type,
| Some _, Some nameProperty, Some keyProperty, None ->
let resolveMethod = getInstanceMethod<bool * string list * string list> theType [| typeof<string>; typeof<string>; typeof<string>; typeof<string seq>; typeof<string> |] resolveDependenciesMethodName
let resolveMethodEx = getInstanceMethod<bool * string list * string list> theType [| typeof<string>; typeof<(string * string) seq>; typeof<string>; typeof<string> |] resolveDependenciesMethodName
Some (fun () -> new ReflectionDependencyManagerProvider(theType, nameProperty, keyProperty, None, resolveMethod, resolveMethodEx, outputDir) :> IDependencyManagerProvider)
let resolveMethodExWithTimeout = getInstanceMethod<bool * string list * string list> theType [| typeof<string>; typeof<(string * string) seq>; typeof<string>; typeof<string>; typeof<int> |] resolveDependenciesMethodName
Some (fun () -> new ReflectionDependencyManagerProvider(theType, nameProperty, keyProperty, None, resolveMethod, resolveMethodEx, resolveMethodExWithTimeout, outputDir) :> IDependencyManagerProvider)
| Some _, Some nameProperty, Some keyProperty, Some helpMessagesProperty ->
let resolveMethod = getInstanceMethod<bool * string list * string list> theType [| typeof<string>; typeof<string>; typeof<string>; typeof<string seq>; typeof<string> |] resolveDependenciesMethodName
let resolveMethodEx = getInstanceMethod<bool * string list * string list> theType [| typeof<string>; typeof<(string * string) seq>; typeof<string>; typeof<string> |] resolveDependenciesMethodName
Some (fun () -> new ReflectionDependencyManagerProvider(theType, nameProperty, keyProperty, Some helpMessagesProperty, resolveMethod, resolveMethodEx, outputDir) :> IDependencyManagerProvider)
let resolveMethodExWithTimeout = getInstanceMethod<bool * string list * string list> theType [| typeof<string>; typeof<(string * string) seq>; typeof<string>; typeof<string>; typeof<int>; |] resolveDependenciesMethodName
Some (fun () -> new ReflectionDependencyManagerProvider(theType, nameProperty, keyProperty, Some helpMessagesProperty, resolveMethod, resolveMethodEx, resolveMethodExWithTimeout, outputDir) :> IDependencyManagerProvider)
static member MakeResultFromObject(result: obj) = {
new IResolveDependenciesResult with
@ -231,14 +234,16 @@ type ReflectionDependencyManagerProvider(theType: Type,
member _.HelpMessages = instance |> helpMessagesProperty
/// Resolve the dependencies for the given arguments
member this.ResolveDependencies(scriptDir, mainScriptName, scriptName, scriptExt, packageManagerTextLines, tfm, rid): IResolveDependenciesResult =
member this.ResolveDependencies(scriptDir, mainScriptName, scriptName, scriptExt, packageManagerTextLines, tfm, rid, timeout): IResolveDependenciesResult =
// The ResolveDependencies method, has two signatures, the original signaature in the variable resolveDeps and the updated signature resolveDepsEx
// the resolve method can return values in two different tuples:
// (bool * string list * string list * string list)
// (bool * string list * string list)
// We use reflection to get the correct method and to determine what we got back.
let method, arguments =
if resolveDepsEx.IsSome then
if resolveDepsExWithTimeout.IsSome then
resolveDepsExWithTimeout, [| box scriptExt; box packageManagerTextLines; box tfm; box rid; box timeout |]
elif resolveDepsEx.IsSome then
resolveDepsEx, [| box scriptExt; box packageManagerTextLines; box tfm; box rid |]
elif resolveDeps.IsSome then
resolveDeps, [| box scriptDir
@ -407,7 +412,8 @@ type DependencyProvider (assemblyProbingPaths: AssemblyResolutionProbe, nativePr
[<Optional;DefaultParameterValue(null:string)>]executionRid: string,
[<Optional;DefaultParameterValue("")>]implicitIncludeDir: string,
[<Optional;DefaultParameterValue("")>]mainScriptName: string,
[<Optional;DefaultParameterValue("")>]fileName: string): IResolveDependenciesResult =
[<Optional;DefaultParameterValue("")>]fileName: string,
[<Optional;DefaultParameterValue(-1)>]timeout: int): IResolveDependenciesResult =
let key = (packageManager.Key, scriptExt, Seq.toArray packageManagerTextLines, executionTfm, executionRid, implicitIncludeDir, mainScriptName, fileName)
@ -419,7 +425,7 @@ type DependencyProvider (assemblyProbingPaths: AssemblyResolutionProbe, nativePr
RidHelpers.platformRid
else
executionRid
Ok (packageManager.ResolveDependencies(implicitIncludeDir, mainScriptName, fileName, scriptExt, packageManagerTextLines, executionTfm, executionRid))
Ok (packageManager.ResolveDependencies(implicitIncludeDir, mainScriptName, fileName, scriptExt, packageManagerTextLines, executionTfm, executionRid, timeout))
with e ->
let e = stripTieWrapper e

Просмотреть файл

@ -55,7 +55,7 @@ type IDependencyManagerProvider =
abstract HelpMessages: string[]
/// Resolve the dependencies, for the given set of arguments, go find the .dll references, scripts and additional include values.
abstract ResolveDependencies: scriptDir: string * mainScriptName: string * scriptName: string * scriptExt: string * packageManagerTextLines: (string * string) seq * tfm: string * rid: string -> IResolveDependenciesResult
abstract ResolveDependencies: scriptDir: string * mainScriptName: string * scriptName: string * scriptExt: string * packageManagerTextLines: (string * string) seq * tfm: string * rid: string * timeout: int -> IResolveDependenciesResult
/// Todo describe this API
[<RequireQualifiedAccess>]
@ -90,7 +90,7 @@ type DependencyProvider =
member CreatePackageManagerUnknownError: string seq * string * string * ResolvingErrorReport -> int * string
/// Resolve reference for a list of package manager lines
member Resolve : packageManager: IDependencyManagerProvider * scriptExt: string * packageManagerTextLines: (string * string) seq * reportError: ResolvingErrorReport * executionTfm: string * [<Optional;DefaultParameterValue(null:string)>]executionRid: string * [<Optional;DefaultParameterValue("")>]implicitIncludeDir: string * [<Optional;DefaultParameterValue("")>]mainScriptName: string * [<Optional;DefaultParameterValue("")>]fileName: string -> IResolveDependenciesResult
member Resolve : packageManager: IDependencyManagerProvider * scriptExt: string * packageManagerTextLines: (string * string) seq * reportError: ResolvingErrorReport * executionTfm: string * [<Optional;DefaultParameterValue(null:string)>]executionRid: string * [<Optional;DefaultParameterValue("")>]implicitIncludeDir: string * [<Optional;DefaultParameterValue("")>]mainScriptName: string * [<Optional;DefaultParameterValue("")>]fileName: string * [<Optional;DefaultParameterValue(-1)>]timeout: int -> IResolveDependenciesResult
/// Fetch a dependencymanager that supports a specific key
member TryFindDependencyManagerByKey: compilerTools: string seq * outputDir: string * reportError: ResolvingErrorReport * key: string -> IDependencyManagerProvider

Просмотреть файл

@ -801,3 +801,75 @@ x |> Seq.iter(fun r ->
output.OutputProduced.Add (fun line -> verifyOutput line)
let opt = script.Eval(text) |> getValue
Assert.True(sawExpectedOutput.WaitOne(TimeSpan.FromSeconds(5.0)), sprintf "Expected to see error sentinel value written\nexpected:%A\nactual:%A" expected lines)
[<Fact>]
member __.``Verify that timeout --- times out and fails``() =
let nativeProbingRoots () = Seq.empty<string>
let mutable foundCorrectError = false
let mutable foundWrongError = false
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let reportError =
let report errorType code message =
match errorType with
| ErrorReportType.Error ->
if code = 3401 then foundCorrectError <- true
else foundWrongError <- true
| ErrorReportType.Warning -> printfn "PackageManagementWarning %d : %s" code message
ResolvingErrorReport (report)
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"|], reportError, "netcoreapp3.1", timeout=0) // Fail in 0 milliseconds
Assert.Equal(false, result.Success)
Assert.Equal(foundCorrectError, true)
Assert.Equal(foundWrongError, false)
()
[<Fact>]
member __.``Verify that script based timeout overrides api based - timeout on script``() =
let nativeProbingRoots () = Seq.empty<string>
let mutable foundCorrectError = false
let mutable foundWrongError = false
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let reportError =
let report errorType code message =
match errorType with
| ErrorReportType.Error ->
if code = 3401 then foundCorrectError <- true
else foundWrongError <- true
| ErrorReportType.Warning -> printfn "PackageManagementWarning %d : %s" code message
ResolvingErrorReport (report)
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"; "r", "timeout=0"|], reportError, "netcoreapp3.1", null, "", "", "", -1) // Wait forever
Assert.Equal(false, result.Success)
Assert.Equal(foundCorrectError, true)
Assert.Equal(foundWrongError, false)
()
[<Fact>]
member __.``Verify that script based timeout overrides api based - timeout on api , forever on script``() =
let nativeProbingRoots () = Seq.empty<string>
let mutable foundCorrectError = false
let mutable foundWrongError = false
use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots))
let reportError =
let report errorType code message =
match errorType with
| ErrorReportType.Error ->
if code = 3401 then foundCorrectError <- true
else foundWrongError <- true
| ErrorReportType.Warning -> printfn "PackageManagementWarning %d : %s" code message
ResolvingErrorReport (report)
let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget")
let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data"; "r", "timeout=none"|], reportError, "netcoreapp3.1", null, "", "", "", 0) // Wait forever
Assert.Equal(true, result.Success)
Assert.Equal(foundCorrectError, false)
Assert.Equal(foundWrongError, false)
()

Просмотреть файл

@ -2,6 +2,8 @@
namespace FSharp.DependencyManager.UnitTests
open System
open System.Linq
open FSharp.DependencyManager.Nuget
@ -10,16 +12,16 @@ open Xunit
type DependencyManagerLineParserTests() =
let parseBinLogPath text =
let _, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" [text]
let _, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" [text]
binLogPath
let parseSingleReference text =
let packageReferences, _ = FSharpDependencyManager.parsePackageReference ".fsx" [text]
let packageReferences, _, _ = FSharpDependencyManager.parsePackageReference ".fsx" [text]
packageReferences.Single()
[<Fact>]
member __.``Binary logging defaults to disabled``() =
let _, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" []
let _, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" []
Assert.Equal(None, binLogPath)
[<Fact>]
@ -39,32 +41,32 @@ type DependencyManagerLineParserTests() =
[<Fact>]
member __.``Bare binary log argument isn't parsed as a package name: before``() =
let packageReferences, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" ["bl, MyPackage"]
let packageReferences, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" ["bl, MyPackage"]
Assert.Equal("MyPackage", packageReferences.Single().Include)
Assert.Equal(Some (None: string option), binLogPath)
[<Fact>]
member __.``Bare binary log argument isn't parsed as a package name: middle``() =
let packageReferences, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" ["MyPackage, bl, 1.2.3.4"]
let packageReferences, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" ["MyPackage, bl, 1.2.3.4"]
Assert.Equal("MyPackage", packageReferences.Single().Include)
Assert.Equal("1.2.3.4", packageReferences.Single().Version)
Assert.Equal(Some (None: string option), binLogPath)
[<Fact>]
member __.``Bare binary log argument isn't parsed as a package name: after``() =
let packageReferences, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" ["MyPackage, bl"]
let packageReferences, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" ["MyPackage, bl"]
Assert.Equal("MyPackage", packageReferences.Single().Include)
Assert.Equal(Some (None: string option), binLogPath)
[<Fact>]
member __.``Package named 'bl' can be explicitly referenced``() =
let packageReferences, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" ["Include=bl"]
let packageReferences, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" ["Include=bl"]
Assert.Equal("bl", packageReferences.Single().Include)
Assert.Equal(None, binLogPath)
[<Fact>]
member __.``Package named 'bl' can be explicitly referenced with binary logging``() =
let packageReferences, binLogPath = FSharpDependencyManager.parsePackageReference ".fsx" ["Include=bl,bl"]
let packageReferences, binLogPath, _ = FSharpDependencyManager.parsePackageReference ".fsx" ["Include=bl,bl"]
Assert.Equal("bl", packageReferences.Single().Include)
Assert.Equal(Some (None: string option), binLogPath)
@ -106,9 +108,93 @@ type DependencyManagerLineParserTests() =
[<Fact>]
member __.``Include strings that look different but parse the same are reduced to a single item``() =
let prs, _ =
let prs, _, _ =
[ "MyPackage, Version=1.2.3.4"
"Include=MyPackage, Version=1.2.3.4" ]
|> FSharpDependencyManager.parsePackageReference ".fsx"
let pr = prs.Single()
Assert.Equal("MyPackage", pr.Include)
[<Fact>]
member __.``Timeout none is -1``() =
let _, _, timeout =
[ "timeout=none" ]
|> FSharpDependencyManager.parsePackageReference ".fsx"
Assert.Equal(timeout, Some -1)
[<Fact>]
member __.``Timeout 1000 is 1000``() =
let _, _, timeout =
[ "timeout=1000" ]
|> FSharpDependencyManager.parsePackageReference ".fsx"
Assert.Equal(timeout, Some 1000)
[<Fact>]
member __.``Timeout 0 is 0``() =
let _, _, timeout =
[ "timeout=0" ]
|> FSharpDependencyManager.parsePackageReference ".fsx"
Assert.Equal(timeout, Some 0)
[<Fact>]
member __.``Timeout for many values is the last specified ascending``() =
let _, _, timeout =
[ "timeout=none"
"timeout=1"
"timeout=10"
"timeout=100"
]
|> FSharpDependencyManager.parsePackageReference ".fsx"
Assert.Equal(timeout, Some 100)
[<Fact>]
member __.``Timeout for many values is the last specified descending``() =
let _, _, timeout =
[ "timeout=10000"
"timeout=1000"
"timeout=100"
"timeout=10"
]
|> FSharpDependencyManager.parsePackageReference ".fsx"
Assert.Equal(timeout, Some 10)
[<Fact>]
member __.``Timeout invalid : timeout``() =
try
[ "timeout" ]
|> FSharpDependencyManager.parsePackageReference ".fsx" |> ignore
Assert.True(false, "ArgumentException expected") //Assert.Fail
with
| :? ArgumentException -> ()
| _ -> Assert.True(false, "ArgumentException expected") //Assert.Fail
[<Fact>]
member __.``Timeout invalid timeout=``() =
try
[ "timeout=" ]
|> FSharpDependencyManager.parsePackageReference ".fsx" |> ignore
Assert.True(false, "ArgumentException expected") //Assert.Fail
with
| :? ArgumentException -> ()
| _ -> Assert.True(false, "ArgumentException expected") //Assert.Fail
[<Fact>]
member __.``Timeout invalid timeout=nonesuch``() =
try
[ "timeout=nonesuch" ]
|> FSharpDependencyManager.parsePackageReference ".fsx" |> ignore
Assert.True(false, "ArgumentException expected") //Assert.Fail
with
| :? ArgumentException -> ()
| _ -> Assert.True(false, "ArgumentException expected") //Assert.Fail
[<Fact>]
member __.``Timeout invalid timeout=-20``() =
try
[ "timeout=-20" ]
|> FSharpDependencyManager.parsePackageReference ".fsx" |> ignore
Assert.True(false, "ArgumentException expected") //Assert.Fail
with
| :? ArgumentException -> ()
| _ -> Assert.True(false, "ArgumentException expected") //Assert.Fail

Просмотреть файл

@ -42415,7 +42415,7 @@ Microsoft.DotNet.DependencyManager.AssemblyResolutionProbe: System.IAsyncResult
Microsoft.DotNet.DependencyManager.AssemblyResolutionProbe: Void .ctor(System.Object, IntPtr)
Microsoft.DotNet.DependencyManager.AssemblyResolveHandler: Void .ctor(Microsoft.DotNet.DependencyManager.AssemblyResolutionProbe)
Microsoft.DotNet.DependencyManager.DependencyProvider: Microsoft.DotNet.DependencyManager.IDependencyManagerProvider TryFindDependencyManagerByKey(System.Collections.Generic.IEnumerable`1[System.String], System.String, Microsoft.DotNet.DependencyManager.ResolvingErrorReport, System.String)
Microsoft.DotNet.DependencyManager.DependencyProvider: Microsoft.DotNet.DependencyManager.IResolveDependenciesResult Resolve(Microsoft.DotNet.DependencyManager.IDependencyManagerProvider, System.String, System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.String,System.String]], Microsoft.DotNet.DependencyManager.ResolvingErrorReport, System.String, System.String, System.String, System.String, System.String)
Microsoft.DotNet.DependencyManager.DependencyProvider: Microsoft.DotNet.DependencyManager.IResolveDependenciesResult Resolve(Microsoft.DotNet.DependencyManager.IDependencyManagerProvider, System.String, System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.String,System.String]], Microsoft.DotNet.DependencyManager.ResolvingErrorReport, System.String, System.String, System.String, System.String, System.String, Int32)
Microsoft.DotNet.DependencyManager.DependencyProvider: System.String[] GetRegisteredDependencyManagerHelpText(System.Collections.Generic.IEnumerable`1[System.String], System.String, Microsoft.DotNet.DependencyManager.ResolvingErrorReport)
Microsoft.DotNet.DependencyManager.DependencyProvider: System.Tuple`2[System.Int32,System.String] CreatePackageManagerUnknownError(System.Collections.Generic.IEnumerable`1[System.String], System.String, System.String, Microsoft.DotNet.DependencyManager.ResolvingErrorReport)
Microsoft.DotNet.DependencyManager.DependencyProvider: System.Tuple`2[System.String,Microsoft.DotNet.DependencyManager.IDependencyManagerProvider] TryFindDependencyManagerInPath(System.Collections.Generic.IEnumerable`1[System.String], System.String, Microsoft.DotNet.DependencyManager.ResolvingErrorReport, System.String)
@ -42444,7 +42444,7 @@ Microsoft.DotNet.DependencyManager.ErrorReportType: Microsoft.DotNet.DependencyM
Microsoft.DotNet.DependencyManager.ErrorReportType: Microsoft.DotNet.DependencyManager.ErrorReportType get_Warning()
Microsoft.DotNet.DependencyManager.ErrorReportType: Microsoft.DotNet.DependencyManager.ErrorReportType+Tags
Microsoft.DotNet.DependencyManager.ErrorReportType: System.String ToString()
Microsoft.DotNet.DependencyManager.IDependencyManagerProvider: Microsoft.DotNet.DependencyManager.IResolveDependenciesResult ResolveDependencies(System.String, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.String,System.String]], System.String, System.String)
Microsoft.DotNet.DependencyManager.IDependencyManagerProvider: Microsoft.DotNet.DependencyManager.IResolveDependenciesResult ResolveDependencies(System.String, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.String,System.String]], System.String, System.String, Int32)
Microsoft.DotNet.DependencyManager.IDependencyManagerProvider: System.String Key
Microsoft.DotNet.DependencyManager.IDependencyManagerProvider: System.String Name
Microsoft.DotNet.DependencyManager.IDependencyManagerProvider: System.String get_Key()

Просмотреть файл

@ -1,5 +1,5 @@
//<Expects status="Error" span="(4,1)" id="FS3216">Package manager key 'unk' was not registered</Expects>
//<Expects status="Error" span="(4,1)" id="FS3217">Processing of a script fragment has stopped because an exception has been raised</Expects>
//<Expects status="Error" span="(4,1)" id="FS3400">Package manager key 'unk' was not registered</Expects>
//<Expects status="Error" span="(4,1)" id="FS3401">Processing of a script fragment has stopped because an exception has been raised</Expects>
#r "unk: blubblub"