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
Copy file name to clipboardExpand all lines: DEVGUIDE.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
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.
4
4
5
+
## Documentation
6
+
7
+
The compiler is documented in [docs](docs/index.md). This is essential reading.
8
+
5
9
## Recommended workflow
6
10
7
11
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
122
126
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
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
152
154
Some of the code in this repository is formatted automatically by [Fantomas](https://github.com/fsprojects/fantomas). To format all files use:
153
155
154
156
```cmd
155
-
dotnet fantomas src/fsharp -r
157
+
dotnet fantomas src -r
156
158
```
157
159
158
160
The formatting is checked automatically by CI:
159
161
160
162
```cmd
161
-
dotnet fantomas src/fsharp -r --check
163
+
dotnet fantomas src -r --check
162
164
```
163
165
164
166
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\`.
239
241
### Example benchmark setup using [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet)
240
242
241
243
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
+
242
245
2. Create a benchmark project (in this example, the project will be created in `tests\benchmarks\`).
243
246
244
247
```shell
@@ -251,13 +254,13 @@ Existing compiler benchmarks can be found in `tests\benchmarks\`.
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,17 @@ After it's finished, open `FSharp.sln` in your editor of choice.
34
34
35
35
### Documentation for contributors
36
36
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
+
37
41
* 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`.
38
42
39
43
* See [TESTGUIDE.md](TESTGUIDE.md) for information about the various test suites in this codebase and how to run them individually.
40
44
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
+
###Documentationfor F# community
42
46
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).
44
48
45
49
*[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.
Copy file name to clipboardExpand all lines: TESTGUIDE.md
+25-45Lines changed: 25 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,31 +14,38 @@ Where this guide mentions the command `build` it means either `build.cmd` in the
14
14
15
15
## Quick start: Running Tests
16
16
17
-
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.
18
-
19
-
To run tests, from a command prompt, use variations such as the following, depending on which test suite and build configuration you want.
20
-
21
-
### Tests runnable in any configuration
22
-
23
-
The following testsets can be run in Release or Debug mode, with or without the `-ci` argument.
24
-
25
-
Run the tests in Release mode:
17
+
To run the tests in Release mode:
26
18
27
19
```shell
28
20
build -testCompiler -c Release
21
+
build -testCompilerService -c Release
22
+
build -testCompilerComponentTests -c Release
23
+
build -testCambridge -c Release -ci -nobl
24
+
build -testFSharpQA -c Release -ci -nobl
29
25
build -testFSharpCore -c Release
30
26
build -testScripting -c Release
31
-
build -testVS -c Release
27
+
build -testVs -c Release
28
+
build -testAll -c Release
32
29
```
33
30
34
-
Run the tests in Debug mode, add `-c Debug` or leave it out:
31
+
### Tests grouping summary
35
32
36
-
```shell
37
-
build -testCompiler -c Debug
38
-
build -testFSharpCore -c Debug
39
-
build -testScripting -c Debug
40
-
build -testVS -c Debug
41
-
```
33
+
| Group name | OS | Description |
34
+
|------------|----|-------------|
35
+
| testDesktop | Windows | Runs all net472 tests in 32 bit processes, this includes tests from other groups |
36
+
| testCoreClr | Linux/Mac/Windows | Runs all .NetStandard and .NETCore tests in 64 bit processes, this includes tests from other groups |
37
+
| testFSharpCore | Windows | Runs all test for FSharp.Core.dll |
38
+
| testCambridge | Windows | Runs the Cambridge suite tests |
39
+
| testFSharpQA | Windows | Runs the FSharpQA tests, requires Perl |
40
+
| testVS | Windows + VS | Runs all VS integration tests |
41
+
| testCompiler | Windows | Runs a few quick compiler tests |
42
+
| testScripting | Windows | Runs scripting fsx and fsi commandline tests |
43
+
| test | Windows | Same as testDesktop |
44
+
| testAll | Windows | Runs all above tests |
45
+
46
+
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.
47
+
48
+
To run tests, from a command prompt, use variations such as the following, depending on which test suite and build configuration you want.
42
49
43
50
### Tests that can be run on Linux and MacOS
44
51
@@ -55,37 +62,13 @@ build -testDesktop -c Release
55
62
build -testCoreClr -c Release
56
63
```
57
64
58
-
### Tests that can only run with `-ci`
59
-
60
-
The following tests **must** be run in Release mode and **must** have the CI argument like `-ci -bl` or `-ci -nobl`:
61
-
62
-
```shell
63
-
build -testCambridge -c Release -ci -nobl
64
-
build -testFSharpQA -c Release -ci -nobl
65
-
```
66
-
67
65
### Tests that open other windows
68
66
69
67
The following testsets open other windows and may interfere with you using your workstation, or change focus while you're doing something else:
70
68
71
69
* FSharpQA
72
70
* Cambridge
73
71
74
-
### Tests grouping summary
75
-
76
-
| Group name | OS | Description |
77
-
|------------|----|-------------|
78
-
| testDesktop | Windows | Runs all net472 tests in 32 bit processes, this includes tests from other groups |
79
-
| testCoreClr | Linux/Mac/Windows | Runs all .NetStandard and .NETCore tests in 64 bit processes, this includes tests from other groups |
80
-
| testFSharpCore | Windows | Runs all test for FSharp.Core.dll |
81
-
| testCambridge | Windows | Runs the Cambridge suite tests |
82
-
| testFSharpQA | Windows | Runs the FSharpQA tests, requires Perl |
83
-
| testVS | Windows + VS | Runs all VS integration tests |
84
-
| testCompiler | Windows | Runs a few quick compiler tests |
85
-
| testScripting | Windows | Runs scripting fsx and fsi commandline tests |
86
-
| test | Windows | Same as testDesktop |
87
-
| testAll | Windows | Runs all above tests |
88
-
89
72
### Running tests online in CI
90
73
91
74
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:
@@ -109,7 +92,7 @@ The prerequisites are the same as for building the `FSharp.sln`, plus, at a mini
109
92
* Between switching git branches
110
93
* When merging with latest `main` upstream branch.
111
94
112
-
## Test Suites
95
+
## More Details
113
96
114
97
The F# tests are split as follows:
115
98
@@ -126,8 +109,6 @@ The F# tests are split as follows:
126
109
*[VisualFSharp.UnitTests](vsintegration/tests/unittests) - Visual F# Tools IDE Unit Test Suite
127
110
This suite exercises a wide range of behaviors in the F# Visual Studio project system and language service.
128
111
129
-
## More Details
130
-
131
112
### FSharp Suite
132
113
133
114
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.
@@ -256,7 +237,6 @@ Some tests are known to fail on these older branches when run using one of the `
256
237
257
238
* Adding the `-norestore` flag to the commandline speeds up the build part a little bit.
258
239
* When using the `-ci` flag (mandatory for some testsets), adding the `-nobl` flag prevents creating the binary log files.
259
-
* 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.
260
240
261
241
Some tests run in parallel by default, or use a hosted compiler to speed things up:
0 commit comments