Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
264a54e
Update dependencies from https://github.com/dotnet/arcade build 20250…
dotnet-maestro[bot] Apr 28, 2025
9995898
Allow `_` in `use!` bindings values (#18487)
edgarfgp Apr 28, 2025
54fb3da
Checker: don't capture environment for checked modules (#18519)
auduchinok Apr 30, 2025
cf6b53e
reuse fsi sessions in tests (#18527)
majocha Apr 30, 2025
34dbfc1
Code completion: fix getting qualifier expression in `do` statements …
auduchinok Apr 30, 2025
05500b8
Enable TypeSubsumptionCache for IDE use (#18499)
majocha May 1, 2025
172dc31
include accessibility range in `SynPat.Named` (#18526)
edgarfgp May 2, 2025
abffd37
Fix mixed emit-multi+/- sessions (#18465)
KevinRansom May 5, 2025
63dd8ca
[main] Update dependencies from dotnet/arcade (#18535)
dotnet-maestro[bot] May 6, 2025
aa4550e
Update VisualFSharp.Core.targets (#18536)
AlexDelepine May 7, 2025
5a239f6
Update dependencies from https://github.com/dotnet/arcade build 20250…
dotnet-maestro[bot] May 7, 2025
f78ce10
Keep parens around records in interpolated strings (#18534)
brianrourkeboll May 12, 2025
c4ed80c
Clean up Conformance UnitsOfMeasure (#18537)
KevinRansom May 13, 2025
66e1637
Scoped nowarn (#18049)
Martin521 May 14, 2025
230df0c
Make attribute target mismatch a warning and not an error. (#18492)
edgarfgp May 14, 2025
9e74c0e
Fix race in cache eviction (#18528)
majocha May 14, 2025
29bcaf1
Cancellable: always catch internal cancellations (#18531)
majocha May 14, 2025
c77db37
VS Insertion pipeline update - main (#18548)
T-Gro May 15, 2025
1a76355
[main] Update dependencies from dotnet/arcade (#18559)
dotnet-maestro[bot] May 16, 2025
5db953f
Update automerge config (#18552)
T-Gro May 16, 2025
8b7bf60
Allow `let!` and `use!` binding with type annotation without parenthe…
edgarfgp May 16, 2025
a82b23d
Shorthand lambda: fix completion for chained calls (#18560)
DedSec256 May 19, 2025
2e40a23
Update dependencies from https://github.com/dotnet/arcade build 20250…
dotnet-maestro[bot] May 19, 2025
102c517
Fix find all references for F# exceptions (#18565)
majocha May 19, 2025
2188ac9
GH workflow - use ubuntu latest for cleaning up old runs (#18573)
T-Gro May 19, 2025
ff1ca8a
Versions props - main (#18550)
T-Gro May 19, 2025
0c94261
Use .NET10p3 SDK (#18471)
vzarytovskii May 20, 2025
195e723
Add GitHub action to update ILVerify baselines via PR comments (#18578)
Copilot May 20, 2025
087ffa2
Added support for empty case in random collections (#18568)
Lanayx May 20, 2025
7aa39f3
Multi agent parallel testing in CI (#18523)
majocha May 22, 2025
c63e1ee
Update dependencies from https://github.com/dotnet/arcade build 20250…
dotnet-maestro[bot] May 22, 2025
d67ac13
Allow `return|return!` `yield|yield!` and type annotations without pa…
edgarfgp May 22, 2025
8e3bb47
Minor perf opt: (#18541)
Thorium May 22, 2025
ce2d456
add contrib.rocks to README.md (#18564)
dawedawe May 22, 2025
fb50b56
Use struct tuple instead of reference tuple for pair ordering (#18513)
brianrourkeboll May 22, 2025
10c07b3
Fix parsing errors using anonymous records and units of measures (#18…
edgarfgp May 22, 2025
13db6d3
Create copilot-setup-steps.yml (#18590)
T-Gro May 22, 2025
755e967
Run fantomas without `-r` in GH action (#18595)
T-Gro May 22, 2025
9720080
Update copilot-setup-steps.yml
T-Gro May 22, 2025
24208f0
Fix access checking for properies setters in attribute arguments (#18…
evgTSV May 22, 2025
2b0e6cd
Update dependencies from https://github.com/dotnet/msbuild build 2025…
dotnet-maestro[bot] May 23, 2025
cad478b
Update CODEOWNERS - keep fsharp-team-msft (#18600)
T-Gro May 26, 2025
d18720c
Fix misleading XML documentation for pairwise functions (#18587)
Copilot May 26, 2025
644dc23
remove deoptimizations to see if things still work (#18606)
majocha May 26, 2025
4bf3bca
Update commands.yml (#18608)
T-Gro May 26, 2025
ceb0350
fix release notes regarding #18049 (#18611)
Martin521 May 28, 2025
13fbacd
Update System+Roslyn+VS versions (#18616)
T-Gro May 28, 2025
4853ba3
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-maestro[bot] May 28, 2025
8a363c4
Range of SynExprRecordField should include the expression (#18617)
edgarfgp May 28, 2025
2854dfb
remove XunitSetup linked file that does nothing (#18605)
majocha May 28, 2025
a1a156d
Fix parsing errors using anonymous records and code quotations (#18603)
edgarfgp May 28, 2025
261cfda
Address CI not always logging test results (#18598)
majocha May 28, 2025
449432c
WriteCodeFragment should support IsLiteral suffix for parity with MSB…
Copilot May 28, 2025
ec503f9
Checker: report environment before checking namespace (#18609)
auduchinok May 28, 2025
ae7ee86
opt-in warning attribute not valid for union case with fields (#18532)
edgarfgp May 28, 2025
f853482
[main] Update dependencies from dotnet/msbuild (#18612)
dotnet-maestro[bot] May 29, 2025
c80ecab
Update commands.yml (#18630)
T-Gro May 29, 2025
942de60
Update copilot-instructions.md (#18622)
T-Gro May 29, 2025
567e53f
More `string` optimizations (#18546)
brianrourkeboll May 29, 2025
ec6df2a
Update baselines
abonie May 29, 2025
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
  •  
  •  
  •  
8 changes: 6 additions & 2 deletions .config/service-branch-merge.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"merge-flow-configurations": {
// regular branch flow
"release/dev17.12": {
"MergeToBranch": "release/dev17.13",
"ExtraSwitches": "-QuietComments"
},
"release/dev17.13": {
"MergeToBranch": "main",
"MergeToBranch": "release/dev17.14",
"ExtraSwitches": "-QuietComments"
},
"release/dev17.14": {
"MergeToBranch": "release/dev18.0",
"MergeToBranch": "main",
"ExtraSwitches": "-QuietComments"
},
"main": {
Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
{
"name": "F#",
"image": "mcr.microsoft.com/dotnet/sdk:9.0.202",
"image": "mcr.microsoft.com/dotnet/sdk:10.0.100-preview.3",
"features": {
"ghcr.io/devcontainers/features/common-utils:2.5.2": {},
"ghcr.io/devcontainers/features/git:1.3.2": {},
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
"ghcr.io/devcontainers/features/dotnet:2.2.0": {}
"ghcr.io/devcontainers/features/common-utils:2.5.3": {},
"ghcr.io/devcontainers/features/git:1.3.3": {},
"ghcr.io/devcontainers/features/github-cli:1.0.14": {},
"ghcr.io/devcontainers/features/dotnet:2.2.1": {}
},
"hostRequirements": {
"cpus": 2,
Expand Down
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
* @dotnet/fsharp-team-msft
/eng/DotNetBuild.props @dotnet/product-construction
/eng/SourceBuild* @dotnet/source-build
47 changes: 39 additions & 8 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,65 @@
# GitHub Copilot Instructions for F# Compiler

## Language and Environment
## Build and test steps (Linux)

Always build and test the project before submitting your solution.

1. As an initial smoke test for a quick build, run `dotnet build ./FSharp.Compiler.Service.sln --verbosity quiet` from the repository root.
Only if this succeeds, move on.
2. From the repository root, run `./build.sh -c Release --norestore`. This creates a prototype compiler, and then the proto compiler builds itself again.
3. Only if two previous steps suceed, run automated tests with `./build.sh -c Release --testcoreclr --norestore`.


If the build fails with errors or non-zero exit code, fix it based on the error messages given and repeat the build step.

If either of the steps 1/2/3 fails, fix the errors and repeat from step 1 - up to 3 times.
After that, report all relevant build errors, error messages and specific details about failing tests and their test test failure details.

### Fixing tests

- If any of the tests fail: Check if the test, test expectation (either inline in the test or a reference file configured for the test) or implementation needs updating, and fix it
- If you see test failures for Surface area baselines: Refer to "Updating FCS surface area baselines" in devguide.md
- If you see test failures for IL baselines: Refer to "Updating ILVerify baselines" in devguide.md


## Acceptance criteria

- Code is formatted using `dotnet fantomas .` executed at the repo root.
- Builds without errors.
- Runs tests without errors. If some tests needed adjustments, those test expectations/baseline adjustments were done.
- If the acceptance criteria was not met, collect the error messages (build failures or failing tests) and report them.

## Coding standards

### Language and Environment
- Use modern F# with functional-first approach
- Target .NET Standard 2.0 for compatibility
- Avoid external dependencies - the codebase is self-contained

## Code Style and Standards
- Follow [coding standards](docs/coding-standards.md), especially:
### Code Style and Standards
- Follow docs/coding-standards.md, especially:
- Prefer immutability and pure functions
- Use consistent naming (see abbreviation guide)
- Process complex types recursively with pattern matching
- Avoid single-character identifiers except in established patterns
- This project uses .fsi signature files. When adding a new public API to a namespace/module which will be consumed from other file, add it to the respective .fsi signature file as well
- Follow [overview](docs/overview.md) for key compiler data formats and representations
- Follow docs/overview.md for key compiler data formats and representations

## Type System Handling
### Type System Handling
- When working with `TType` instances, use appropriate stripping functions:
- `stripTyparEqns` - Removes inference equations from type parameters
- `stripTyEqns` - Removes type equations and type abbreviations
- `stripTyEqnsAndErase` - Also erases compilation representations
- Match the appropriate stripper to the context (e.g., display vs compilation)
- Check equality with `typeEquiv` after stripping rather than direct comparison

## Core Data Structures
### Core Data Structures
- Use F# discriminated unions for type representations
- Respect representation hiding through access control
- Use `remapX` functions when transforming types across boundaries
- Be aware of performance implications for recursive type operations

## Documentation and Naming
### Documentation and Naming
- Document public APIs with XML comments
- Use descriptive function names that indicate transformation direction
- Follow established naming conventions in error messages
- Follow established naming conventions for error messages based on FSComp.txt file. Put all error messages into the FSComp.txt file to ensure localisation
2 changes: 1 addition & 1 deletion .github/workflows/add_to_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:
cleanup_old_runs:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: github.event_name != 'pull_request_target'
permissions:
actions: write
Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
permissions:
contents: write
issues: write
pull-requests: write
pull-requests: read

jobs:
cleanup_old_runs:
if: github.event.schedule == '0 13 * * *'
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
actions: write
env:
Expand All @@ -33,7 +33,7 @@ jobs:

run_command:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run')
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Extract command to run
uses: actions/github-script@v3
Expand Down Expand Up @@ -75,31 +75,40 @@ jobs:
- name: Process fantomas command
if: steps.command-extractor.outputs.result == 'fantomas'
id: fantomas
run: dotnet fantomas . -r
- name: Process fantomas command
run: dotnet fantomas .
- name: Process xlf command
if: steps.command-extractor.outputs.result == 'xlf'
id: xlf
run: dotnet build src/Compiler /t:UpdateXlf

- name: Commit and push changes
if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success'
if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' || steps.ilverify.outcome == 'success'
run: |
# Only commit if there are actual changes
if git diff --quiet; then
echo "No changes to commit, skipping."
exit 0
fi

git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -a -m 'Automated command ran: ${{ steps.command-extractor.outputs.result }}

Co-authored-by: ${{ github.event.comment.user.login }} <${{ github.event.comment.user.id }}+${{ github.event.comment.user.login }}@users.noreply.github.com>'
git push
git push origin HEAD:"refs/heads/$PR_HEAD_REF"\
- name: Post command comment
if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success'
if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' || steps.ilverify.outcome == 'success'
uses: actions/github-script@v3
with:
script: |
// Probably, there's more universal way of getting outputs, but my gh-actions-fu is not that good.
var output = ""
if ("${{steps.command-extractor.outputs.result}}" == 'fantomas') {
output = "${{steps.fantomas.outputs.result}}"
} else if("${{steps.command-extractor.outputs.result}}" == 'xlf') {
} else if ("${{steps.command-extractor.outputs.result}}" == 'xlf') {
output = "${{steps.xlf.outputs.result}}"
} else if ("${{steps.command-extractor.outputs.result}}" == 'ilverify') {
output = "${{steps.ilverify.outputs.result}}"
}
const body = `Ran ${{ steps.command-extractor.outputs.result }}: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}\n${output}`;
await github.issues.createComment({
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Copilot Setup Steps"

# Allow testing of the setup steps from your repository's "Actions" tab.
on: workflow_dispatch

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest

permissions:
contents: read

# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore solution
env:
CI: false
run: dotnet build ./FSharp.Compiler.Service.sln --verbosity quiet
3 changes: 2 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<add key="darc-pub-DotNet-msbuild-Trusted-7ad4e1c" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-7ad4e1c7/nuget/v3/index.json" />
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
Expand All @@ -20,6 +19,8 @@
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
<add key="dotnet10-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
<add key="vssdk-archived" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk-archived/nuget/v3/index.json" />
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,13 @@ If you're curious about F# itself, check out these links:
* [Get started with F#](https://learn.microsoft.com/dotnet/fsharp/get-started/)
* [F# Software Foundation](https://fsharp.org)
* [F# Testimonials](https://fsharp.org/testimonials)

## Contributors ✨

F# exists because of these wonderful people:

<a href="https://github.com/dotnet/fsharp/graphs/contributors">
<img src="https://contrib.rocks/image?repo=dotnet/fsharp" />
</a>

Made with [contrib.rocks](https://contrib.rocks).
Loading
Loading