Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 41 additions & 58 deletions src/fsharp/CompileOps.fs

Large diffs are not rendered by default.

22 changes: 7 additions & 15 deletions src/fsharp/CompileOps.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ open Microsoft.FSharp.Compiler.Tast
open Microsoft.FSharp.Compiler.Tastops
open Microsoft.FSharp.Compiler.Lib
open Microsoft.FSharp.Compiler.Infos
open Microsoft.FSharp.Compiler.MSBuildResolver
open Microsoft.FSharp.Compiler.ReferenceResolver
open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Core.CompilerServices
#if EXTENSIONTYPING
Expand Down Expand Up @@ -183,12 +183,8 @@ type AssemblyResolution =
originalReference : AssemblyReference
/// Path to the resolvedFile
resolvedPath : string
/// Search path used to find this spot.
resolvedFrom : ResolvedFrom
/// The qualified name of the assembly
fusionName : string
/// Name of the redist, if any, that the assembly was found in.
redist : string
/// Create the tooltip texxt for the assembly reference
prepareToolTip : unit -> string
/// Whether or not this is an installed system assembly (for example, System.dll)
sysdir : bool
// Lazily populated ilAssemblyRef for this reference.
Expand Down Expand Up @@ -241,7 +237,7 @@ type TcConfigBuilder =
mutable implicitOpens: string list
mutable useFsiAuxLib: bool
mutable framework: bool
mutable resolutionEnvironment : Microsoft.FSharp.Compiler.MSBuildResolver.ResolutionEnvironment
mutable resolutionEnvironment : ReferenceResolver.ResolutionEnvironment
mutable implicitlyResolveAssemblies : bool
mutable addVersionSpecificFrameworkReferences : bool
/// Set if the user has explicitly turned indentation-aware syntax on/off
Expand All @@ -268,9 +264,6 @@ type TcConfigBuilder =
mutable checkOverflow:bool
mutable showReferenceResolutions:bool
mutable outputFile : string option
mutable resolutionFrameworkRegistryBase : string
mutable resolutionAssemblyFoldersSuffix : string
mutable resolutionAssemblyFoldersConditions : string
mutable platform : ILPlatform option
mutable prefer32Bit : bool
mutable useSimpleResolution : bool
Expand Down Expand Up @@ -314,6 +307,7 @@ type TcConfigBuilder =
mutable win32manifest : string
mutable includewin32manifest : bool
mutable linkResources : string list
mutable referenceResolver: ReferenceResolver.Resolver
mutable showFullPaths : bool
mutable errorStyle : ErrorStyle
mutable utf8output : bool
Expand Down Expand Up @@ -365,6 +359,7 @@ type TcConfigBuilder =
}

static member CreateNew :
referenceResolver: ReferenceResolver.Resolver *
defaultFSharpBinariesDir: string *
optimizeForMemory: bool *
implicitIncludeDir: string *
Expand Down Expand Up @@ -422,9 +417,6 @@ type TcConfig =
member checkOverflow:bool
member showReferenceResolutions:bool
member outputFile : string option
member resolutionFrameworkRegistryBase : string
member resolutionAssemblyFoldersSuffix : string
member resolutionAssemblyFoldersConditions : string
member platform : ILPlatform option
member prefer32Bit : bool
member useSimpleResolution : bool
Expand Down Expand Up @@ -776,7 +768,7 @@ type LoadClosure =
RootWarnings : PhasedError list }

// Used from service.fs, when editing a script file
static member ComputeClosureOfSourceText : filename: string * source: string * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) -> LoadClosure
static member ComputeClosureOfSourceText : referenceResolver: ReferenceResolver.Resolver * filename: string * source: string * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) -> LoadClosure

/// Used from fsi.fs and fsc.fs, for #load and command line. The resulting references are then added to a TcConfig.
static member ComputeClosureOfSourceFiles : tcConfig:TcConfig * (string * range) list * implicitDefines:CodeContext * useDefaultScriptingReferences : bool * lexResourceManager : Lexhelp.LexResourceManager -> LoadClosure
6 changes: 3 additions & 3 deletions src/fsharp/CompileOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,9 @@ let internalFlags (tcConfigB:TcConfigBuilder) =
CompilerOption("implicitresolution", tagNone, OptionUnit (fun _ -> tcConfigB.implicitlyResolveAssemblies <- true), Some(InternalCommandLineOption("--implicitresolution", rangeCmdArgs)), None)

CompilerOption("resolutions", tagNone, OptionUnit (fun () -> tcConfigB.showReferenceResolutions <- true), Some(InternalCommandLineOption("", rangeCmdArgs)), None) // "Display assembly reference resolution information")
CompilerOption("resolutionframeworkregistrybase", tagString, OptionString (fun s -> tcConfigB.resolutionFrameworkRegistryBase<-s), Some(InternalCommandLineOption("", rangeCmdArgs)), None) // "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\[SOFTWARE\Microsoft\.NETFramework]\v2.0.50727\AssemblyFoldersEx")
CompilerOption("resolutionassemblyfoldersuffix", tagString, OptionString (fun s -> tcConfigB.resolutionAssemblyFoldersSuffix<-s), Some(InternalCommandLineOption("resolutionassemblyfoldersuffix", rangeCmdArgs)), None) // "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\[AssemblyFoldersEx]")
CompilerOption("resolutionassemblyfoldersconditions", tagString, OptionString (fun s -> tcConfigB.resolutionAssemblyFoldersConditions <- ","+s), Some(InternalCommandLineOption("resolutionassemblyfoldersconditions", rangeCmdArgs)), None) // "Additional reference resolution conditions. For example \"OSVersion=5.1.2600.0,PlatformID=id")
CompilerOption("resolutionframeworkregistrybase", tagString, OptionString (fun _ -> ()), Some(InternalCommandLineOption("", rangeCmdArgs)), None) // "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\[SOFTWARE\Microsoft\.NETFramework]\v2.0.50727\AssemblyFoldersEx")
CompilerOption("resolutionassemblyfoldersuffix", tagString, OptionString (fun _ -> ()), Some(InternalCommandLineOption("resolutionassemblyfoldersuffix", rangeCmdArgs)), None) // "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\[AssemblyFoldersEx]")
CompilerOption("resolutionassemblyfoldersconditions", tagString, OptionString (fun _ -> ()), Some(InternalCommandLineOption("resolutionassemblyfoldersconditions", rangeCmdArgs)), None) // "Additional reference resolution conditions. For example \"OSVersion=5.1.2600.0,PlatformID=id")
CompilerOption("msbuildresolution", tagNone, OptionUnit (fun () -> tcConfigB.useSimpleResolution<-false), Some(InternalCommandLineOption("msbuildresolution", rangeCmdArgs)), None) // "Resolve assembly references using MSBuild resolution rules rather than directory based (Default=true except when running fsc.exe under mono)")
CompilerOption("alwayscallvirt",tagNone,OptionSwitch(callVirtSwitch tcConfigB),Some(InternalCommandLineOption("alwayscallvirt",rangeCmdArgs)), None)
CompilerOption("nodebugdata",tagNone, OptionUnit (fun () -> tcConfigB.noDebugData<-true),Some(InternalCommandLineOption("--nodebugdata",rangeCmdArgs)), None)
Expand Down
10 changes: 5 additions & 5 deletions src/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,8 @@
<Compile Include="..\..\absil\bytes.fs">
<Link>bytes.fs</Link>
</Compile>
<Compile Include="..\ReferenceResolution.fsi">
<Link>ReferenceResolution.fsi</Link>
</Compile>
<Compile Include="..\ReferenceResolution.fs">
<Link>ReferenceResolution.fs</Link>
<Compile Include="..\ReferenceResolver.fs">
<Link>ReferenceResolver.fs</Link>
</Compile>
<Compile Include="..\..\absil\il.fsi">
<Link>il.fsi</Link>
Expand Down Expand Up @@ -449,6 +446,9 @@
<Compile Include="..\fsc.fs">
<Link>fsc.fs</Link>
</Compile>
<Compile Include="..\MSBuildReferenceResolver.fs">
<Link>MSBuildReferenceResolver.fs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib" />
Expand Down
14 changes: 4 additions & 10 deletions src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,8 @@
<Compile Include="..\ErrorResolutionHints.fs">
<Link>ErrorLogging\ErrorResolutionHints.fs</Link>
</Compile>
<Compile Include="..\ReferenceResolution.fsi">
<Link>ReferenceResolution\ReferenceResolution.fsi</Link>
</Compile>
<Compile Include="..\ReferenceResolution.fs">
<Link>ReferenceResolution\ReferenceResolution.fs</Link>
<Compile Include="..\ReferenceResolver.fs">
<Link>ReferenceResolution\ReferenceResolver.fs</Link>
</Compile>
<FsLex Include="..\..\absil\illex.fsl">
<OtherFlags>--lexlib Internal.Utilities.Text.Lexing</OtherFlags>
Expand Down Expand Up @@ -489,11 +486,8 @@
<Compile Include="..\fsc.fs">
<Link>Driver\fsc.fs</Link>
</Compile>
<Compile Include="..\vs\IncrementalBuild.fsi">
<Link>Driver\IncrementalBuild.fsi</Link>
</Compile>
<Compile Include="..\vs\IncrementalBuild.fs">
<Link>Driver\IncrementalBuild.fs</Link>
<Compile Include="..\MSBuildReferenceResolver.fs">
<Link>MSBuildReferenceResolver.fs</Link>
</Compile>
<Compile Include="InternalsVisibleTo.fs" Condition="'$(TargetFramework)' != 'coreclr'">
<Link>InternalsVisibleTo.fs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,8 @@
<Compile Include="..\ErrorResolutionHints.fs">
<Link>ErrorLogging\ErrorResolutionHints.fs</Link>
</Compile>
<Compile Include="..\ReferenceResolution.fsi">
<Link>ReferenceResolution\ReferenceResolution.fsi</Link>
</Compile>
<Compile Include="..\ReferenceResolution.fs">
<Link>ReferenceResolution\ReferenceResolution.fs</Link>
<Compile Include="..\ReferenceResolver.fs">
<Link>ReferenceResolution\ReferenceResolver.fs</Link>
</Compile>
<FsLex Include="..\..\absil\illex.fsl">
<OtherFlags>--lexlib Internal.Utilities.Text.Lexing</OtherFlags>
Expand Down Expand Up @@ -544,6 +541,9 @@
<Compile Include="..\vs\ServiceUntypedParse.fs">
<Link>Service/ServiceUntypedParse.fs</Link>
</Compile>
<Compile Include="..\MSBuildReferenceResolver.fs">
<Link>Service/MSBuildReferenceResolver.fs</Link>
</Compile>
<Compile Include="..\vs\service.fsi">
<Link>Service/service.fsi</Link>
</Compile>
Expand Down
Loading