提交 01dc5083 编写于 作者: D Don Syme 提交者: latkin

cleanup referenceresolution.fs/fsi

ReferenceResolution.fs/fsi has long been messy in a way that obscured what
it does. This is some code cleanup (no change in functionality) to remove
some of the obscurity. This came from reviewing the code with Robin Neatherway.

closes http://visualfsharp.codeplex.com/SourceControl/network/forks/dsyme/cleanup/contribution/7671

commit dbd480e5f58418782bcc0f0dde54a5bc8bfe346f
Author: Don Syme <dsyme@microsoft.com>
Date:   Mon Nov 10 16:21:12 2014 +0000

    put net10 and net11 back

commit ac83e77a8d6a9fe93dab5afa904761feec27be08
Author: Don Syme <dsyme@microsoft.com>
Date:   Mon Nov 10 16:05:52 2014 +0000

    cleanup ReferenceResolution.fs
上级 51ff4c57
......@@ -2634,7 +2634,7 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
| MSBuildResolver.RuntimeLike ->
[System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()]
| _ ->
let frameworkRoot = MSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectory
let frameworkRoot = MSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectoryOnWindows
let frameworkRootVersion = Path.Combine(frameworkRoot,tcConfig.targetFrameworkVersionMajorMinor)
[frameworkRootVersion]
with e ->
......
此差异已折叠。
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Viz
/// This type exists to have a concrete 'Target' type for a DebuggerVisualizerAttribute.
/// Ideally it would be out in its own assembly, but then the compiler would need to take a dependency on that assembly, so instead we
/// pragmatically just shove this into the compiler assembly itself.
type internal Visualizable =
new : obj -> Visualizable
member Data : obj
/// assuming this assembly is already in the debuggee process, then Viz.Visualiable.Make(foo) in the Watch window will make a visualizer for foo
static member Make : obj -> Visualizable
namespace Microsoft.FSharp.Compiler
......@@ -18,6 +8,7 @@ module internal MSBuildResolver =
exception ResolutionFailure
val SupportedNetFrameworkVersions : Set<string>
val HighestInstalledNetFrameworkVersionMajorMinor : unit -> int * string
/// Describes the location where the reference was found.
......@@ -30,7 +21,7 @@ module internal MSBuildResolver =
| Path of string
| Unknown
/// Whether the resolve should follow compile-time rules or runtime rules.
/// Indicates whether the resolve should follow compile-time rules or runtime rules.
type ResolutionEnvironment =
| CompileTimeLike
| RuntimeLike // Don't allow stubbed-out reference assemblies
......@@ -39,48 +30,45 @@ module internal MSBuildResolver =
#if SILVERLIGHT
#else
val DotNetFrameworkReferenceAssembliesRootDirectory : string
/// Get the Reference Assemblies directory for the .NET Framework on Window
val DotNetFrameworkReferenceAssembliesRootDirectoryOnWindows : string
/// Information about a resolved file.
type ResolvedFile = {
/// Item specification
itemSpec:string
/// Location that the assembly was resolved from
resolvedFrom:ResolvedFrom
/// The long fusion name of the assembly
fusionName:string
/// The version of the assembly (like 4.0.0.0)
version:string
/// The name of the redist the assembly was found in
redist:string
/// Round-tripped baggage string
baggage:string
type ResolvedFile =
{ /// Item specification
itemSpec:string
/// Location that the assembly was resolved from
resolvedFrom:ResolvedFrom
/// The long fusion name of the assembly
fusionName:string
/// The version of the assembly (like 4.0.0.0)
version:string
/// The name of the redist the assembly was found in
redist:string
/// Round-tripped baggage string
baggage:string
}
/// Reference resolution results. All paths are fully qualified.
type ResolutionResults = {
/// Paths to primary references
resolvedFiles:ResolvedFile array
/// Paths to dependencies
referenceDependencyPaths:string array
/// Paths to related files (like .xml and .pdb)
relatedPaths:string array
/// Paths to satellite assemblies used for localization.
referenceSatellitePaths:string array
/// Additional files required to support multi-file assemblies.
referenceScatterPaths:string array
/// Paths to files that reference resolution recommend be copied to the local directory
referenceCopyLocalPaths:string array
/// Binding redirects that reference resolution recommends for the app.config file.
suggestedBindingRedirects:string array
}
type ResolutionResults =
{ /// Paths to primary references
resolvedFiles:ResolvedFile[]
/// Paths to dependencies
referenceDependencyPaths:string[]
/// Paths to related files (like .xml and .pdb)
relatedPaths:string[]
/// Paths to satellite assemblies used for localization.
referenceSatellitePaths:string[]
/// Additional files required to support multi-file assemblies.
referenceScatterPaths:string[]
/// Paths to files that reference resolution recommend be copied to the local directory
referenceCopyLocalPaths:string[]
/// Binding redirects that reference resolution recommends for the app.config file.
suggestedBindingRedirects:string[] }
/// Callback for errors and warnings.
type ErrorWarningCallbackSig =
((*code:*)string->(*message*)string->unit)
val Resolve :
/// Perform assembly resolution on the given references
val Resolve:
resolutionEnvironment: ResolutionEnvironment *
references:(string*(*baggage*)string)[] *
targetFrameworkVersion:string *
......@@ -94,6 +82,7 @@ module internal MSBuildResolver =
assemblyFoldersSuffix:string *
assemblyFoldersConditions:string *
logmessage:(string->unit) *
logwarning:ErrorWarningCallbackSig *
logerror:ErrorWarningCallbackSig -> ResolutionResults
logwarning:(string->string->unit) *
logerror:(string->string->unit)
-> ResolutionResults
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册