You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
* trim API surface area
* move Range and Pos types to FSharp.Compiler
* undo uppercae range/pos
* move Range and Pos types to FSHarp.Compiler.SourceCodeServices since they are part of the FCS API
* fix baselines
* release notes
* FIX BUILD
* fix test
* fix test
* fix test
* fix test
* fix build
* fix build
* fix build
* PrettyNaming moved to SourceCodeServices
* ISourceText moved to SourceCodeServices
* update docs
* update docs
* fix build
* fix build
* move Range, Pos to FSharp.Compiler.Text
* fix test
* fix build
Co-authored-by: Don Syme <donsyme@fastmail.com>
Copy file name to clipboardExpand all lines: docs/compiler-guide.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,10 @@ The following are the key phases and high-level logical operations of the F# com
72
72
73
73
*_Parsing_. Accepts a token stream and produces an AST per the grammar in the F# Language Specification.
74
74
75
-
*_Resolving references_. See [ReferenceResolver.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/ReferenceResolver.fs) for the abstract definition of compiler reference resolution. See [LegacyMSBuildReferenceResolver.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/LegacyMSBuildReferenceResolver.fs) for reference resolution used by the .NET Framework F# compiler when running on .NET Framework. See [SimulatedMSBuildReferenceResolver.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/SimulatedMSBuildReferenceResolver.fs) when not using the .NET Framework F# compiler. See [Microsoft.DotNet.DependencyManager](https://github.com/dotnet/fsharp/tree/master/src/fsharp/Microsoft.DotNet.DependencyManager) for reference resolution and package management used in `fsi`.
75
+
*_Resolving references_. For .NET SDK generally references are resolved explicitly by external tooling.
76
+
There is a legacy aspect to this if references use old .NET Framework references including for
77
+
scripting. See [ReferenceResolver.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/ReferenceResolver.fs) for the abstract definition of compiler reference resolution. See [LegacyMSBuildReferenceResolver.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/LegacyMSBuildReferenceResolver.fs) for reference resolution used by the .NET Framework F# compiler when running on .NET Framework. See [SimulatedMSBuildReferenceResolver.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/SimulatedMSBuildReferenceResolver.fs) when not using the .NET Framework F# compiler.
78
+
See [Microsoft.DotNet.DependencyManager](https://github.com/dotnet/fsharp/tree/master/src/fsharp/Microsoft.DotNet.DependencyManager) for reference resolution and package management used in `fsi`.
76
79
77
80
*_Importing referenced .NET binaries_, see [import.fsi](https://github.com/dotnet/fsharp/blob/master/src/fsharp/import.fsi)/[import.fs](https://github.com/dotnet/fsharp/blob/master/src/fsharp/import.fs). Accepts file references and produces a Typed Tree node for each referenced assembly, including information about its type definitions (and type forwarders if any).
78
81
@@ -556,6 +559,24 @@ decide not to bother continuing with the computation (it drops it on the floor)
556
559
557
560
The second can be interrupted via having `isResultObsolete` to the F# Compiler Service API return true.
558
561
562
+
### The F# Compiler Service Public Surface Area
563
+
564
+
The "intended" FCS API is the parts under the namespaces
Copy file name to clipboardExpand all lines: docs/fcs/corelib.fsx
+20-26Lines changed: 20 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,25 @@
4
4
Compiler Services: Notes on FSharp.Core.dll
5
5
=================================================
6
6
7
+
Versions of FSharp.Core involved in the operation of FSharp.Compiler.Service
8
+
---------------------------------------------
9
+
10
+
There are three versions of FSharp.Core relevant to the operation of FSharp.Compiler.Service:
11
+
12
+
1. **The FSharp.Compiler.Service.dll static reference to FSharp.Core** - The FCS DLL and nuget have a static minbound dependency on FSharp.Core.
13
+
14
+
This is just a normal .NET dependency like any other, it expresses the minimum surface area of FSharp.Core that the implementation of FSharp.Compiler.Service (and any components that depend on it) needs. It could be a reference to a reference assembly if we supported that. In theory this could be very low and all is cool - if we could implement FCS in terms of FSharp.Core 2.0.0.0 then that could be the minbound (indeed in theory we could implement FCS pretty almost without any use of FSharp.Core functionality at all, though obviously we don't)
15
+
16
+
In practice this is 0-2 versions behind latest FSharp.Core.
17
+
18
+
2. **The runtime reference to FSharp.Core in a tool, application or test suite that includes FSharp.Compiler.Service** - This is the actual version of FSharp.Core used when, say, fsc.exe or devenv.exe or fsi.exe or fsdocs.exe runs.
19
+
20
+
This must be at least as high as (1) and is usually the very latest FSharp.Core available (in or out of repo tree). This is important to the operation of the FCS-based tool because it is used for execution of scripts, and the default compilation reference for scripts. If scripts are going to use a particular language feature then this must be sufficient to support the language feature
21
+
22
+
3. **The FSharp.Core reference in a compilation or analysis being processed by FSharp.Compiler.Service**.
23
+
24
+
This can be anything - 2.0.0.0, 4.0.0.0 or 5.0.0 or whatever. For script compilation and execution is is the same as (2). It must be sufficient to support language features used in the compilation.
25
+
7
26
Shipping an FSharp.Core with your application
8
27
---------------------------------------------
9
28
@@ -13,32 +32,6 @@ include a copy of FSharp.Core.dll as part of your application.
13
32
For example, if you build a ``HostedCompiler.exe``, you will normally place an FSharp.Core.dll (say 4.3.1.0) alongside
14
33
your ``HostedCompiler.exe``.
15
34
16
-
Binding redirects for your application
17
-
--------------------------------------
18
-
19
-
The FSharp.Compiler.Service.dll component depends on FSharp.Core 4.4.0.0. Normally your application will target
20
-
a later version of FSharp.Core, and you may need a [binding redirect](https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions) to ensure
21
-
that other versions of FSharp.Core forward to the final version of FSharp.Core.dll your application uses.
22
-
Binding redirect files are normally generated automatically by build tools. If not, you can use one like this
23
-
(if your tool is called ``HostedCompiler.exe``, the binding redirect file is called ``HostedCompiler.exe.config``)
24
-
25
-
Some other dependencies may also need to be reconciled and forwarded.
0 commit comments