Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f80302c
cleanup
dsyme May 7, 2022
28fd320
Merge branch 'main' of https://github.com/dotnet/fsharp into ft10
dsyme May 7, 2022
607a019
split files
dsyme May 8, 2022
0d620c6
rename
dsyme May 8, 2022
eaab9da
split infos.fs and SymbolHelpres.fs
dsyme May 8, 2022
0cfaa22
split infos.fs and SymbolHelpres.fs
dsyme May 8, 2022
5b7b058
fix code formating
dsyme May 8, 2022
8aa08b5
rename autobox --> LowerLocalMutables
dsyme May 8, 2022
6e99f00
adjust names
dsyme May 8, 2022
da15261
block --> ImmutableArray
dsyme May 8, 2022
48594bd
format
dsyme May 8, 2022
e0d1b4f
merge
dsyme May 8, 2022
090083d
Error --> SRDiagnostic
dsyme May 8, 2022
781ee94
Error --> SRDiagnostic
dsyme May 8, 2022
e7a2006
this -> _
dsyme May 8, 2022
b229ea9
rename and cleanup
dsyme May 9, 2022
6a07e06
rename Diagnostic --> FormattedDiagnostic
dsyme May 9, 2022
01df788
format sigs
dsyme May 9, 2022
94b9a61
format sigs
dsyme May 9, 2022
a944111
organise files in src/fsharp
dsyme May 9, 2022
1ae201d
organise files in src/fsharp
dsyme May 9, 2022
c8b6137
fix build
dsyme May 9, 2022
9beedf0
Merge branch 'ft10' into ft11
dsyme May 9, 2022
f2bef6c
fix build
dsyme May 9, 2022
6c6f9e8
fix build
dsyme May 9, 2022
2259bfe
Merge branch 'ft10' into ft11
dsyme May 9, 2022
4a3be8d
merge
dsyme May 9, 2022
625a730
merge
dsyme May 9, 2022
b3e5ad7
move more files
dsyme May 9, 2022
3ea5a60
move more files
dsyme May 9, 2022
b0709e2
move more files
dsyme May 9, 2022
832a324
move more files
dsyme May 9, 2022
1ae55e9
fix build
dsyme May 9, 2022
f150982
file reorg
dsyme May 9, 2022
e253fbf
finish moves
dsyme May 9, 2022
2ba4799
fix links in docs
dsyme May 9, 2022
b5788da
code format
dsyme May 9, 2022
441d4b4
fix build
dsyme May 9, 2022
56aa081
save xlf, InteractiveSession/ --> Interactive/
dsyme May 9, 2022
19ed08b
moved xlf
dsyme May 9, 2022
bd8de94
cleanup .gitignore
dsyme May 9, 2022
a31b41d
fixed Linux build
dsyme May 9, 2022
7ceadbf
cleanup docs
dsyme May 9, 2022
2e4e6ef
cleanup docs
dsyme May 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 14 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,21 @@ BenchmarkDotNet.Artifacts/
# (These aren't generally useful to commit directly; if anything, they should be applied.)
scripts/*.patch
/src/*.userprefs
/src/fsharp/FSStrings.resources
/src/fsharp/FSharp.Build/*.resx
/src/fsharp/fsi/*.resx
/src/fsharp/FSharp.Compiler.Interactive.Settings/*.resx
/src/fsharp/FSharp.Compiler.Server.Shared/*.resx
/src/fsharp/fsi/Fsi.sln
/src/fsharp/FSharp.Build/*.resources
/src/fsharp/FSharp.Compiler.Service/*.resx
/src/fsharp/FSharp.Compiler.Service/*.resources
/src/fsharp/FSharp.Compiler.Service/*.sln
/src/fsharp/FSharp.Compiler.Service/*.userprefs
/src/fsharp/FSharp.Compiler.Service/StandardOutput.txt
/src/fsharp/FSharp.Compiler.Service/StandardError.txt
/src/Compiler/FSStrings.resources
/src/FSharp.Build/*.resx
/src/fsi/*.resx
/src/FSharp.Compiler.Interactive.Settings/*.resx
/src/FSharp.Compiler.Server.Shared/*.resx
/src/fsi/Fsi.sln
/src/FSharp.Build/*.resources
/src/Compiler/*.resx
/src/Compiler/*.resources
/src/Compiler/*.sln
/src/Compiler/*.userprefs
/src/Compiler/StandardOutput.txt
/src/Compiler/StandardError.txt
/src/*.log
/src/fsharp/FSharp.LanguageService.Compiler/illex.*
/src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
/src/fsharp/FSharp.LanguageService.Compiler/lex.*
/src/fsharp/FSharp.LanguageService.Compiler/pars.*
/src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
/src/fsharp/*/Properties/launchSettings.json
/src/*/Properties/launchSettings.json
/vsintegration/src/unittests/Unittests.fsi
/tests/*FSharp_Failures.env
/tests/*FSharp_Failures.lst
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// "preLaunchTask": "Build (Debug)",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net5.0/fsi.dll",
"cwd": "${workspaceFolder}/src/fsharp",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal",
"stopAtEntry": false,
"justMyCode": false,
Expand Down
19 changes: 11 additions & 8 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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.

## Documentation

The compiler is documented in [docs](docs/index.md). This is essential reading.

## Recommended workflow

We recommend the following overall workflow when developing for this repository:
Expand Down Expand Up @@ -122,9 +126,7 @@ Running any of the above will build the latest changes and run tests against the
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

```shell
pushd src\fsharp\FSharp.Compiler.Service
msbuild FSharp.Compiler.Service.fsproj /t:UpdateXlf
popd
dotnet build src\Compiler /t:UpdateXlf
```

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

```cmd
dotnet fantomas src/fsharp -r
dotnet fantomas src -r
```

The formatting is checked automatically by CI:

```cmd
dotnet fantomas src/fsharp -r --check
dotnet fantomas src -r --check
```

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

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).

2. Create a benchmark project (in this example, the project will be created in `tests\benchmarks\`).

```shell
Expand All @@ -251,13 +254,13 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.
```shell
cd FcsBench
dotnet add package BenchmarkDotNet
dotnet add reference ..\..\..\src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
dotnet add reference ..\..\..\src\Compiler\FSharp.Compiler.Service.fsproj
```

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

```shell
dotnet add reference ..\..\..\src\fsharp\FSharp.Core\FSharp.Core.fsproj
dotnet add reference ..\..\..\src\FSharp.Core\FSharp.Core.fsproj
```

> as well as the following property have to be added to `FcsBench.fsproj`:
Expand Down Expand Up @@ -304,7 +307,7 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.

match sourceOpt with
| None ->
sourceOpt <- Some <| SourceText.ofString(File.ReadAllText("""C:\Users\vlza\code\fsharp\src\fsharp\CheckExpressions.fs"""))
sourceOpt <- Some <| SourceText.ofString(File.ReadAllText("""C:\Users\vlza\code\fsharp\src\Compiler\Checking\CheckExpressions.fs"""))
| _ -> ()


Expand Down
23 changes: 12 additions & 11 deletions FSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
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}"
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}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build", "src\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsc", "src\fsharp\fsc\fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsc", "src\fsc\fsc.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
EndProject
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}"
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}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsi", "src\fsharp\fsi\fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsi", "src\fsi\fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiAnyCpu", "src\fsharp\fsiAnyCpu\fsiAnyCpu.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsiAnyCpu", "src\fsiAnyCpu\fsiAnyCpu.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}"
ProjectSection(ProjectDependencies) = postProject
{649FA588-F02E-457C-9FCF-87E46407481E} = {649FA588-F02E-457C-9FCF-87E46407481E}
EndProjectSection
Expand All @@ -43,15 +43,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{53C0DAAD-158C-4658-8EC7-D7341530239F}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.DependencyManager.Nuget", "src\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{8B7BF62E-7D8C-4928-BE40-4E392A9EE851}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.DependencyManager.Nuget", "src\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{8B7BF62E-7D8C-4928-BE40-4E392A9EE851}"
EndProject
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}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.ComponentTests", "tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{FAC5A3BF-C0D6-437A-868A-E962AA00B418}"
EndProject
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}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "src\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj", "{9B4CF83C-C215-4EA0-9F8B-B5A77090F634}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "src\Compiler\FSharp.Compiler.Service.fsproj", "{9B4CF83C-C215-4EA0-9F8B-B5A77090F634}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Benchmarks", "Benchmarks", "{CE70D631-C5DC-417E-9CDA-B16097BEF1AC}"
EndProject
Expand Down Expand Up @@ -80,7 +80,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{4E4F41D9-8
docs\memory-usage.md = docs\memory-usage.md
docs\optimizations.md = docs\optimizations.md
docs\overview.md = docs\overview.md
docs\public-fcs-api.md = docs\public-fcs-api.md
docs\fsi-emit.md = docs\fsi-emit.md
docs\debug-emit.md = docs\debug-emit.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fcs", "fcs", "{B86EBFF1-E03E-4FAE-89BF-60A4CAE2BC78}"
Expand All @@ -100,7 +101,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fcs", "fcs", "{B86EBFF1-E03
docs\fcs\untypedtree.fsx = docs\fcs\untypedtree.fsx
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fsharp\fscAnyCpu\fscAnyCpu.fsproj", "{8ACA60C2-7266-425A-B641-A2946396B7D1}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fscAnyCpu\fscAnyCpu.fsproj", "{8ACA60C2-7266-425A-B641-A2946396B7D1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\PEVerify\PEVerify.csproj", "{358821CB-4D63-4157-9EFF-65C06EBD4E36}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<StrongNameKeyId>Microsoft</StrongNameKeyId>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoPackaging)' == 'true'">
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\test.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\test.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.FSharp.Compiler.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler", "src\fsharp\Microsoft.FSharp.Compiler\Microsoft.FSharp.Compiler.csproj", "{BBEDE3FA-6E2C-4C53-8B61-FBB545CD4FFC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler", "src\Microsoft.FSharp.Compiler\Microsoft.FSharp.Compiler.csproj", "{BBEDE3FA-6E2C-4C53-8B61-FBB545CD4FFC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ After it's finished, open `FSharp.sln` in your editor of choice.

### Documentation for contributors

* 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.

* 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.

* 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`.

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

* [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).
### Documentation for F# community

* [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).
* [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).

* [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.

Expand Down
70 changes: 25 additions & 45 deletions TESTGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,38 @@ Where this guide mentions the command `build` it means either `build.cmd` in the

## Quick start: Running Tests

Tests are grouped as noted below. Some test groups can only be run in `CI` configuration, for that, you need to pass the `-ci -bl` or `-ci -nobl` arguments. Some test groups can only be run in Release mode, this is indicated below. Some tests can only be run on Windows.

To run tests, from a command prompt, use variations such as the following, depending on which test suite and build configuration you want.

### Tests runnable in any configuration

The following testsets can be run in Release or Debug mode, with or without the `-ci` argument.

Run the tests in Release mode:
To run the tests in Release mode:

```shell
build -testCompiler -c Release
build -testCompilerService -c Release
build -testCompilerComponentTests -c Release
build -testCambridge -c Release -ci -nobl
build -testFSharpQA -c Release -ci -nobl
build -testFSharpCore -c Release
build -testScripting -c Release
build -testVS -c Release
build -testVs -c Release
build -testAll -c Release
```

Run the tests in Debug mode, add `-c Debug` or leave it out:
### Tests grouping summary

```shell
build -testCompiler -c Debug
build -testFSharpCore -c Debug
build -testScripting -c Debug
build -testVS -c Debug
```
| Group name | OS | Description |
|------------|----|-------------|
| testDesktop | Windows | Runs all net472 tests in 32 bit processes, this includes tests from other groups |
| testCoreClr | Linux/Mac/Windows | Runs all .NetStandard and .NETCore tests in 64 bit processes, this includes tests from other groups |
| testFSharpCore | Windows | Runs all test for FSharp.Core.dll |
| testCambridge | Windows | Runs the Cambridge suite tests |
| testFSharpQA | Windows | Runs the FSharpQA tests, requires Perl |
| testVS | Windows + VS | Runs all VS integration tests |
| testCompiler | Windows | Runs a few quick compiler tests |
| testScripting | Windows | Runs scripting fsx and fsi commandline tests |
| test | Windows | Same as testDesktop |
| testAll | Windows | Runs all above tests |

Some test groups can only be run in `CI` configuration, for that, you need to pass the `-ci -bl` or `-ci -nobl` arguments. Some test groups can only be run in Release mode, this is indicated below. Some tests can only be run on Windows.

To run tests, from a command prompt, use variations such as the following, depending on which test suite and build configuration you want.

### Tests that can be run on Linux and MacOS

Expand All @@ -55,37 +62,13 @@ build -testDesktop -c Release
build -testCoreClr -c Release
```

### Tests that can only run with `-ci`

The following tests **must** be run in Release mode and **must** have the CI argument like `-ci -bl` or `-ci -nobl`:

```shell
build -testCambridge -c Release -ci -nobl
build -testFSharpQA -c Release -ci -nobl
```

### Tests that open other windows

The following testsets open other windows and may interfere with you using your workstation, or change focus while you're doing something else:

* FSharpQA
* Cambridge

### Tests grouping summary

| Group name | OS | Description |
|------------|----|-------------|
| testDesktop | Windows | Runs all net472 tests in 32 bit processes, this includes tests from other groups |
| testCoreClr | Linux/Mac/Windows | Runs all .NetStandard and .NETCore tests in 64 bit processes, this includes tests from other groups |
| testFSharpCore | Windows | Runs all test for FSharp.Core.dll |
| testCambridge | Windows | Runs the Cambridge suite tests |
| testFSharpQA | Windows | Runs the FSharpQA tests, requires Perl |
| testVS | Windows + VS | Runs all VS integration tests |
| testCompiler | Windows | Runs a few quick compiler tests |
| testScripting | Windows | Runs scripting fsx and fsi commandline tests |
| test | Windows | Same as testDesktop |
| testAll | Windows | Runs all above tests |

### Running tests online in CI

You can also submit pull requests to https://github.com/dotnet/fsharp and run the tests via continuous integration. Most people do wholesale testing that way. A few notes:
Expand All @@ -109,7 +92,7 @@ The prerequisites are the same as for building the `FSharp.sln`, plus, at a mini
* Between switching git branches
* When merging with latest `main` upstream branch.

## Test Suites
## More Details

The F# tests are split as follows:

Expand All @@ -126,8 +109,6 @@ The F# tests are split as follows:
* [VisualFSharp.UnitTests](vsintegration/tests/unittests) - Visual F# Tools IDE Unit Test Suite
This suite exercises a wide range of behaviors in the F# Visual Studio project system and language service.

## More Details

### FSharp Suite

This is compiled using [tests\fsharp\FSharp.Tests.FSharpSuite.fsproj](tests/fsharp/FSharp.Tests.FSharpSuite.fsproj) to a unit test DLL which acts as a driver script. Each individual test is an NUnit test case, and so you can run it like any other NUnit test.
Expand Down Expand Up @@ -256,7 +237,6 @@ Some tests are known to fail on these older branches when run using one of the `

* Adding the `-norestore` flag to the commandline speeds up the build part a little bit.
* When using the `-ci` flag (mandatory for some testsets), adding the `-nobl` flag prevents creating the binary log files.
* NGen-ing the F# bits (fsc, fsi, FSharp.Core, etc) will result in tests executing much faster. Make sure you run `src\update.cmd` with the `-ngen` flag before running tests.

Some tests run in parallel by default, or use a hosted compiler to speed things up:

Expand Down
Loading