Skip to content

Commit f8d0ac2

Browse files
committed
merge
2 parents 0d9388f + e063dd2 commit f8d0ac2

File tree

718 files changed

+8934
-7392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

718 files changed

+8934
-7392
lines changed

.gitignore

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,21 @@ BenchmarkDotNet.Artifacts/
1111
# (These aren't generally useful to commit directly; if anything, they should be applied.)
1212
scripts/*.patch
1313
/src/*.userprefs
14-
/src/fsharp/FSStrings.resources
15-
/src/fsharp/FSharp.Build/*.resx
16-
/src/fsharp/fsi/*.resx
17-
/src/fsharp/FSharp.Compiler.Interactive.Settings/*.resx
18-
/src/fsharp/FSharp.Compiler.Server.Shared/*.resx
19-
/src/fsharp/fsi/Fsi.sln
20-
/src/fsharp/FSharp.Build/*.resources
21-
/src/fsharp/FSharp.Compiler.Service/*.resx
22-
/src/fsharp/FSharp.Compiler.Service/*.resources
23-
/src/fsharp/FSharp.Compiler.Service/*.sln
24-
/src/fsharp/FSharp.Compiler.Service/*.userprefs
25-
/src/fsharp/FSharp.Compiler.Service/StandardOutput.txt
26-
/src/fsharp/FSharp.Compiler.Service/StandardError.txt
14+
/src/Compiler/FSStrings.resources
15+
/src/FSharp.Build/*.resx
16+
/src/fsi/*.resx
17+
/src/FSharp.Compiler.Interactive.Settings/*.resx
18+
/src/FSharp.Compiler.Server.Shared/*.resx
19+
/src/fsi/Fsi.sln
20+
/src/FSharp.Build/*.resources
21+
/src/Compiler/*.resx
22+
/src/Compiler/*.resources
23+
/src/Compiler/*.sln
24+
/src/Compiler/*.userprefs
25+
/src/Compiler/StandardOutput.txt
26+
/src/Compiler/StandardError.txt
2727
/src/*.log
28-
/src/fsharp/FSharp.LanguageService.Compiler/illex.*
29-
/src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
30-
/src/fsharp/FSharp.LanguageService.Compiler/lex.*
31-
/src/fsharp/FSharp.LanguageService.Compiler/pars.*
32-
/src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
33-
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
34-
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
35-
/src/fsharp/*/Properties/launchSettings.json
28+
/src/*/Properties/launchSettings.json
3629
/vsintegration/src/unittests/Unittests.fsi
3730
/tests/*FSharp_Failures.env
3831
/tests/*FSharp_Failures.lst

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// "preLaunchTask": "Build (Debug)",
1919
// If you have changed target frameworks, make sure to update the program path.
2020
"program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net5.0/fsi.dll",
21-
"cwd": "${workspaceFolder}/src/fsharp",
21+
"cwd": "${workspaceFolder}/src",
2222
"console": "integratedTerminal",
2323
"stopAtEntry": false,
2424
"justMyCode": false,

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@
4545
"MD025": {
4646
"front_matter_title": ""
4747
}
48-
}
48+
},
49+
"editor.inlayHints.enabled": "offUnlessPressed"
4950
}

DEVGUIDE.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This document details more advanced options for developing in this codebase. It is not quite necessary to follow it, but it is likely that you'll find something you'll need from here.
44

5+
## Documentation
6+
7+
The compiler is documented in [docs](docs/index.md). This is essential reading.
8+
59
## Recommended workflow
610

711
We recommend the following overall workflow when developing for this repository:
@@ -122,9 +126,7 @@ Running any of the above will build the latest changes and run tests against the
122126
If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running
123127

124128
```shell
125-
pushd src\fsharp\FSharp.Compiler.Service
126-
msbuild FSharp.Compiler.Service.fsproj /t:UpdateXlf
127-
popd
129+
dotnet build src\Compiler /t:UpdateXlf
128130
```
129131

130132
This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually.
@@ -152,13 +154,13 @@ export TEST_UPDATE_BSL=1
152154
Some of the code in this repository is formatted automatically by [Fantomas](https://github.com/fsprojects/fantomas). To format all files use:
153155

154156
```cmd
155-
dotnet fantomas src/fsharp -r
157+
dotnet fantomas src -r
156158
```
157159

158160
The formatting is checked automatically by CI:
159161

160162
```cmd
161-
dotnet fantomas src/fsharp -r --check
163+
dotnet fantomas src -r --check
162164
```
163165

164166
At the time of writing only a subset of signature files (`*.fsi`) are formatted. See the settings in `.fantomasignore` and `.editorconfig`.
@@ -239,6 +241,7 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.
239241
### Example benchmark setup using [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet)
240242

241243
1. Perform a clean build of the compiler and FCS from source (as described in this document, build can be done with `-noVisualStudio` in case if FCS/FSharp.Core is being benchmarked/profiled).
244+
242245
2. Create a benchmark project (in this example, the project will be created in `tests\benchmarks\`).
243246

244247
```shell
@@ -251,13 +254,13 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.
251254
```shell
252255
cd FcsBench
253256
dotnet add package BenchmarkDotNet
254-
dotnet add reference ..\..\..\src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
257+
dotnet add reference ..\..\..\src\Compiler\FSharp.Compiler.Service.fsproj
255258
```
256259

257260
4. Additionally, if you want to test changes to the FSharp.Core
258261

259262
```shell
260-
dotnet add reference ..\..\..\src\fsharp\FSharp.Core\FSharp.Core.fsproj
263+
dotnet add reference ..\..\..\src\FSharp.Core\FSharp.Core.fsproj
261264
```
262265

263266
> as well as the following property have to be added to `FcsBench.fsproj`:
@@ -287,7 +290,7 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.
287290
{
288291
SourceFiles = [|"CheckExpressions.fs"|]
289292
ConditionalDefines = []
290-
ErrorSeverityOptions = FSharpDiagnosticOptions.Default
293+
DiagnosticOptions = FSharpDiagnosticOptions.Default
291294
LangVersionText = "default"
292295
IsInteractive = false
293296
LightSyntax = None
@@ -304,7 +307,7 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.
304307
305308
match sourceOpt with
306309
| None ->
307-
sourceOpt <- Some <| SourceText.ofString(File.ReadAllText("""C:\Users\vlza\code\fsharp\src\fsharp\CheckExpressions.fs"""))
310+
sourceOpt <- Some <| SourceText.ofString(File.ReadAllText("""C:\Users\vlza\code\fsharp\src\Compiler\Checking\CheckExpressions.fs"""))
308311
| _ -> ()
309312
310313

FSharp.sln

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.1.32113.165
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Server.Shared", "src\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
6+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Server.Shared", "src\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
77
EndProject
8-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
8+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}"
1111
EndProject
12-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
12+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build", "src\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
1313
EndProject
14-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsc", "src\fsharp\fsc\fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
14+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsc", "src\fsc\fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
1515
EndProject
16-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Interactive.Settings", "src\fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}"
16+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Interactive.Settings", "src\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}"
1717
EndProject
18-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsi", "src\fsharp\fsi\fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
18+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsi", "src\fsi\fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
1919
EndProject
20-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiAnyCpu", "src\fsharp\fsiAnyCpu\fsiAnyCpu.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
20+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiAnyCpu", "src\fsiAnyCpu\fsiAnyCpu.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
2121
ProjectSection(ProjectDependencies) = postProject
2222
{649FA588-F02E-457C-9FCF-87E46407481E} = {649FA588-F02E-457C-9FCF-87E46407481E}
2323
EndProjectSection
@@ -43,15 +43,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{
4343
EndProject
4444
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{53C0DAAD-158C-4658-8EC7-D7341530239F}"
4545
EndProject
46-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.DependencyManager.Nuget", "src\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{8B7BF62E-7D8C-4928-BE40-4E392A9EE851}"
46+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.DependencyManager.Nuget", "src\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{8B7BF62E-7D8C-4928-BE40-4E392A9EE851}"
4747
EndProject
4848
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private.Scripting.UnitTests", "tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj", "{4FEDF286-0252-4EBC-9E75-879CCA3B85DC}"
4949
EndProject
5050
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.ComponentTests", "tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{FAC5A3BF-C0D6-437A-868A-E962AA00B418}"
5151
EndProject
5252
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{DDFD06DC-D7F2-417F-9177-107764EEBCD8}"
5353
EndProject
54-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj", "{9B4CF83C-C215-4EA0-9F8B-B5A77090F634}"
54+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "src\Compiler\FSharp.Compiler.Service.fsproj", "{9B4CF83C-C215-4EA0-9F8B-B5A77090F634}"
5555
EndProject
5656
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Benchmarks", "Benchmarks", "{CE70D631-C5DC-417E-9CDA-B16097BEF1AC}"
5757
EndProject
@@ -80,7 +80,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{4E4F41D9-8
8080
docs\memory-usage.md = docs\memory-usage.md
8181
docs\optimizations.md = docs\optimizations.md
8282
docs\overview.md = docs\overview.md
83-
docs\public-fcs-api.md = docs\public-fcs-api.md
83+
docs\fsi-emit.md = docs\fsi-emit.md
84+
docs\debug-emit.md = docs\debug-emit.md
8485
EndProjectSection
8586
EndProject
8687
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fcs", "fcs", "{B86EBFF1-E03E-4FAE-89BF-60A4CAE2BC78}"
@@ -100,7 +101,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fcs", "fcs", "{B86EBFF1-E03
100101
docs\fcs\untypedtree.fsx = docs\fcs\untypedtree.fsx
101102
EndProjectSection
102103
EndProject
103-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fsharp\fscAnyCpu\fscAnyCpu.fsproj", "{8ACA60C2-7266-425A-B641-A2946396B7D1}"
104+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fscAnyCpu\fscAnyCpu.fsproj", "{8ACA60C2-7266-425A-B641-A2946396B7D1}"
104105
EndProject
105106
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\PEVerify\PEVerify.csproj", "{358821CB-4D63-4157-9EFF-65C06EBD4E36}"
106107
EndProject

FSharpBuild.Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<StrongNameKeyId>Microsoft</StrongNameKeyId>
5050
</PropertyGroup>
5151
<PropertyGroup Condition="'$(MonoPackaging)' == 'true'">
52-
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\test.snk</AssemblyOriginatorKeyFile>
52+
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\test.snk</AssemblyOriginatorKeyFile>
5353
<DelaySign>false</DelaySign>
5454
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
5555
</PropertyGroup>

Microsoft.FSharp.Compiler.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.1.32113.165
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler", "src\fsharp\Microsoft.FSharp.Compiler\Microsoft.FSharp.Compiler.csproj", "{BBEDE3FA-6E2C-4C53-8B61-FBB545CD4FFC}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler", "src\Microsoft.FSharp.Compiler\Microsoft.FSharp.Compiler.csproj", "{BBEDE3FA-6E2C-4C53-8B61-FBB545CD4FFC}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ After it's finished, open `FSharp.sln` in your editor of choice.
3434

3535
### Documentation for contributors
3636

37+
* The [Compiler Documentation](docs/index.md) is essential reading for any larger contributions to the F# compiler codebase and contains links to learning videos, architecture diagrams and other resources.
38+
39+
* The same docs are also published as the [The F# Compiler Guide](https://fsharp.github.io/fsharp-compiler-docs/). It also contains the public searchable docs for FSharp.Compiler.Service component.
40+
3741
* See [DEVGUIDE.md](DEVGUIDE.md) for more details on configurations for building the codebase. In practice, you only really need to run `build.cmd`/`build.sh`.
3842

3943
* See [TESTGUIDE.md](TESTGUIDE.md) for information about the various test suites in this codebase and how to run them individually.
4044

41-
* [The F# Documentation](https://docs.microsoft.com/en-us/dotnet/fsharp/) is the primary documentation for F#. The source for the content is [here](https://github.com/dotnet/docs/tree/main/docs/fsharp).
45+
### Documentation for F# community
4246

43-
* [The F# Compiler Guide](https://fsharp.github.io/fsharp-compiler-docs/) is essential reading for any larger contributions to the F# compiler codebase and contains links to learning videos, architecture diagrams and other resources. It also contains the public searchable docs for FSharp.Compiler.Service (or equivalent of Roslyn). The source for the content is [in this repo under `docs/`](docs/) and the site is built automatically by [this small repo](https://github.com/fsharp/fsharp-compiler-docs).
47+
* [The F# Documentation](https://docs.microsoft.com/dotnet/fsharp/) is the primary documentation for F#. The source for the content is [here](https://github.com/dotnet/docs/tree/main/docs/fsharp).
4448

4549
* [The F# Language Design Process](https://github.com/fsharp/fslang-design/) is the fundamental design process for the language, from [suggestions](https://github.com/fsharp/fslang-suggestions) to completed RFCs. There are also [tooling RFCs](https://github.com/fsharp/fslang-design/tree/main/tooling) for some topics where cross-community co-operation and visibility is most useful.
4650

0 commit comments

Comments
 (0)