This repository was archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 313
Expand file tree
/
Copy pathReferenceResolver.fs
More file actions
56 lines (47 loc) · 2.57 KB
/
ReferenceResolver.fs
File metadata and controls
56 lines (47 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace Microsoft.FSharp.Compiler
module public ReferenceResolver =
exception internal ResolutionFailure
[<RequireQualifiedAccess>]
type ResolutionEnvironment =
/// Indicates a script or source being edited or compiled. Uses reference assemblies (not implementation assemblies).
| EditingOrCompilation of isEditing: bool
/// Indicates a script or source being dynamically compiled and executed. Uses implementation assemblies.
| CompilationAndEvaluation
type ResolvedFile =
{ /// Item specification.
itemSpec:string
/// Prepare textual information about where the assembly was resolved from, used for tooltip output
prepareToolTip: string * string -> string
/// Round-tripped baggage
baggage:string
}
override this.ToString() = sprintf "ResolvedFile(%s)" this.itemSpec
[<AllowNullLiteral>]
type Resolver =
/// Get the "v4.5.1"-style moniker for the highest installed .NET Framework version.
/// This is the value passed back to Resolve if no explicit "mscorlib" has been given.
///
/// Note: If an explicit "mscorlib" is given, then --noframework is being used, and the whole ReferenceResolver logic is essentially
/// unused. However in the future an option may be added to allow an explicit specification of
/// a .NET Framework version to use for scripts.
abstract HighestInstalledNetFrameworkVersion : unit -> string
/// Get the Reference Assemblies directory for the .NET Framework (on Windows)
/// This is added to the default resolution path for
/// design-time compilations.
abstract DotNetFrameworkReferenceAssembliesRootDirectory : string
/// Perform assembly resolution on the given references under the given conditions
abstract Resolve :
resolutionEnvironment: ResolutionEnvironment *
// The actual reference paths or assembly name text, plus baggage
references:(string (* baggage *) * string)[] *
// e.g. v4.5.1
targetFrameworkVersion:string *
targetFrameworkDirectories:string list *
targetProcessorArchitecture:string *
fsharpCoreDir:string *
explicitIncludeDirs:string list *
implicitIncludeDir:string *
logMessage:(string->unit) *
logDiagnostic:(bool -> string -> string -> unit)
-> ResolvedFile[]