Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ebbfeed
Name resolution: keep type vars in subsequent checks (#16456)
auduchinok Jan 16, 2024
5d14be8
Build benchmarks in CI (#16518)
psfinaki Jan 16, 2024
1da7005
More ValueOption in compiler: part 1 (#16323)
psfinaki Jan 16, 2024
2352770
`[Experimental]` `[WIP]` Transparent Compiler (#15179)
0101 Jan 16, 2024
f6e0313
Track CheckDeclarations.CheckModuleSignature activity. (#16534)
nojaf Jan 16, 2024
7e91ae6
Add Computation Expression Benchmarks (#16541)
dawedawe Jan 17, 2024
089fb96
Update Roslyn to a version which uses Immutable v7 (#16545)
T-Gro Jan 18, 2024
a78909c
revert #16326 (addition of XliffTasks reference) (#16548)
Martin521 Jan 18, 2024
9593393
updated devcontainer image (#16551)
Martin521 Jan 18, 2024
712016d
Add higher-order-function-based API for working with untyped AST (#16…
brianrourkeboll Jan 19, 2024
b10ccd5
Move paren entries to appropriate releases (#16561)
brianrourkeboll Jan 22, 2024
bc62506
[main] Update dependencies from dotnet/source-build-reference-package…
dotnet-maestro[bot] Jan 22, 2024
1112c11
Attempt to make links from single identifier module names. (#16550)
nojaf Jan 22, 2024
09ac400
rewrite SizeOfValueInfo in Optimizer.fs to be tail-recursive (#16559)
dawedawe Jan 22, 2024
0735d53
stringbuilder is not threadsafe (#16557)
majocha Jan 22, 2024
8ff2671
Array postfix notation in fsharp core api (#16564)
Martin521 Jan 22, 2024
02d11c6
Revert 16348 (#16536)
0101 Jan 22, 2024
592ff9b
Small code reshuffle for diff minimization (#16569)
psfinaki Jan 22, 2024
904b641
Refactor parens API (#16461)
brianrourkeboll Jan 22, 2024
f50f8e8
Preserve original stacktrace in state machines if available (#16568)
vzarytovskii Jan 23, 2024
3af3d41
check reportErrors and feature support at top level (#16549)
dawedawe Jan 23, 2024
276fc42
Align DU case augmentation with previous behavior in EraseUnions (#16…
T-Gro Jan 23, 2024
ac61334
Refresh debug surface area (#16573)
T-Gro Jan 24, 2024
ddf057b
Remove superfluous rec keywords and untangle some functions (#16544)
dawedawe Jan 24, 2024
641d0ee
Don't throw on invalid input in Graph construction (#16575)
0101 Jan 24, 2024
1b50168
More ValueOption in compiler: part 2 (#16567)
psfinaki Jan 24, 2024
13ba9fb
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] Jan 24, 2024
2caef37
[main] Update dependencies from dotnet/source-build-reference-package…
dotnet-maestro[bot] Jan 24, 2024
61a5792
Improve AsyncMemoize tests (#16580)
0101 Jan 24, 2024
544a1c9
Smoke test some benchmarks in CI (#16554)
psfinaki Jan 24, 2024
4c0a592
NodeCode.Parallel keeps ThreadStatics (#16576)
majocha Jan 25, 2024
615475b
Take the Unshadow stackguard from environment (#16583)
dawedawe Jan 25, 2024
9ae94bb
Parens: Keep parens for problematic exprs in `$"{(…):N0}"`, `$"{(…),-…
brianrourkeboll Jan 26, 2024
9e18eeb
Remove DotNet-Blob-Feed variables from azure-pipelines.yml (#16601)
akoeplinger Jan 29, 2024
6b25ed7
The benchmark leg seems to reliably fail (#16600)
KevinRansom Jan 29, 2024
dcf28e8
Set LKG for plain builds (#16603)
vzarytovskii Jan 29, 2024
b3a7e29
Don't crash graph checking on invalid syntax (#16588)
0101 Jan 29, 2024
2289ec9
Merge remote-tracking branch 'upstream/main' into merges/main-to-rele…
vzarytovskii Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<Import Project="$(RepoRoot)/Directory.Build.props.user" Condition = "Exists('$(RepoRoot)/Directory.Build.props.user')" />

<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
<BUILDING_WITH_LKG>true</BUILDING_WITH_LKG>
<BUILD_FROM_SOURCE>true</BUILD_FROM_SOURCE>
<DisableAutoSetFscCompilerPath>false</DisableAutoSetFscCompilerPath>
<FSHARPCORE_USE_PACKAGE Condition="'$(FSHARPCORE_USE_PACKAGE)' == ''">true</FSHARPCORE_USE_PACKAGE>
<DISABLE_ARCADE Condition="'$(DISABLE_ARCADE)' == ''">true</DISABLE_ARCADE>
Expand Down
13 changes: 12 additions & 1 deletion FSharp.Benchmarks.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
Expand Down Expand Up @@ -26,6 +27,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FCSSourceFiles", "tests\ben
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Test.Utilities", "tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj", "{0B149238-0912-493E-8877-F831AE01B942}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{62DED1EA-6A33-4537-8ED2-118462D0FEE5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -109,6 +112,14 @@ Global
{0B149238-0912-493E-8877-F831AE01B942}.Release|Any CPU.Build.0 = Release|Any CPU
{0B149238-0912-493E-8877-F831AE01B942}.ReleaseCompressed|Any CPU.ActiveCfg = Debug|Any CPU
{0B149238-0912-493E-8877-F831AE01B942}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Proto|Any CPU.Build.0 = Debug|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.Release|Any CPU.Build.0 = Release|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.ReleaseCompressed|Any CPU.ActiveCfg = Release|Any CPU
{62DED1EA-6A33-4537-8ED2-118462D0FEE5}.ReleaseCompressed|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
7 changes: 7 additions & 0 deletions FSharp.Compiler.Service.sln
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Interactive
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -143,6 +145,10 @@ Global
{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C0BDAF4-7D47-4BDA-9992-077F63D6B494}.Release|Any CPU.Build.0 = Release|Any CPU
{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -154,6 +160,7 @@ Global
{35F5F1C5-AE4F-4B5A-8D94-1AF708724FD5} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
{C1950E28-1CB7-4DEC-BB3A-8A0443A17282} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
{07CD957A-3C31-4F75-A735-16CE72E1BD71} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
{A7ACFD1F-D1B8-483A-A210-200BB6B4BD7E} = {AF321816-B4A0-41DD-9A1D-484E8A20C6F6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F9A60F3B-D894-4C8E-BA0F-C51115B25A5A}
Expand Down
15 changes: 15 additions & 0 deletions FSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
src\Compiler\FSCompCheck.fsx = src\Compiler\FSCompCheck.fsx
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{7D482560-DF6F-46A5-B50C-20ECF7C38759}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -416,6 +418,18 @@ Global
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}.Release|Any CPU.Build.0 = Release|Any CPU
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}.Release|x86.ActiveCfg = Release|Any CPU
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1}.Release|x86.Build.0 = Release|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|x86.ActiveCfg = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Debug|x86.Build.0 = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|Any CPU.Build.0 = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|x86.ActiveCfg = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Proto|x86.Build.0 = Debug|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|Any CPU.Build.0 = Release|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|x86.ActiveCfg = Release|Any CPU
{7D482560-DF6F-46A5-B50C-20ECF7C38759}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -447,6 +461,7 @@ Global
{209C7D37-8C01-413C-8698-EC25F4C86976} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{BEC6E796-7E53-4888-AAFC-B8FD55C425DF} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC}
{9C7523BA-7AB2-4604-A5FD-653E82C2BAD1} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC}
{7D482560-DF6F-46A5-B50C-20ECF7C38759} = {CE70D631-C5DC-417E-9CDA-B16097BEF1AC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD5177C7-1380-40E7-94D2-7768E1A8B1B8}
Expand Down
15 changes: 15 additions & 0 deletions VisualFSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor.Tests", "vsin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Editor.IntegrationTests", "vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj", "{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Benchmarks.Common", "tests\benchmarks\FSharp.Benchmarks.Common\FSharp.Benchmarks.Common.fsproj", "{6734FC6F-B5F3-45E1-9A72-720378BB49C9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1019,6 +1021,18 @@ Global
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|Any CPU.Build.0 = Release|Any CPU
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|x86.ActiveCfg = Release|Any CPU
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B}.Release|x86.Build.0 = Release|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|x86.ActiveCfg = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Debug|x86.Build.0 = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|Any CPU.Build.0 = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|x86.ActiveCfg = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Proto|x86.Build.0 = Debug|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|Any CPU.Build.0 = Release|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|x86.ActiveCfg = Release|Any CPU
{6734FC6F-B5F3-45E1-9A72-720378BB49C9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1099,6 +1113,7 @@ Global
{39CDF34B-FB23-49AE-AB27-0975DA379BB5} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
{CBC96CC7-65AB-46EA-A82E-F6A788DABF80} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{E31F9B59-FCF1-4D04-8762-C7BB60285A7B} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
{6734FC6F-B5F3-45E1-9A72-720378BB49C9} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37}
Expand Down
29 changes: 6 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CI and PR triggers
# CI and PR triggers
trigger:
branches:
include:
Expand Down Expand Up @@ -110,13 +110,10 @@ stages:
demands: ImageOverride -equals windows.vs2022preview.amd64
timeoutInMinutes: 300
variables:
- group: DotNet-Blob-Feed
- group: DotNet-Symbol-Server-Pats
- group: DotNet-DevDiv-Insertion-Workflow-Variables
- name: _SignType
value: Real
- name: _DotNetPublishToBlobFeed
value: true
steps:
- checkout: self
clean: true
Expand All @@ -131,9 +128,6 @@ stages:
/p:MicroBuild_SigningEnabled=true
/p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:TeamName=$(_TeamName)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:DotNetPublishToBlobFeed=true
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
Expand Down Expand Up @@ -713,30 +707,19 @@ stages:
continueOnError: true
condition: always()

# Build benchmarks
- job: Plain_Build_Benchmarks
# Build and run fast benchmarks
- job: Benchmarks
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
variables:
- name: _BuildConfig
value: Debug
value: Release
steps:
- checkout: self
clean: true
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet build .\FSharp.Benchmarks.sln /bl:\"artifacts/log/$(_BuildConfig)/BenchmarkBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)
displayName: Regular rebuild of FSharp.Benchmarks.sln
- script: eng\CIBuild.cmd -testBenchmarks
displayName: Smoke test fast benchmarks
continueOnError: true
condition: always()

Expand Down
1 change: 1 addition & 0 deletions buildtools/AssemblyCheck/SkipVerifyEmbeddedPdb.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FSharp.Build.UnitTests.dll
FSharp.Benchmarks.Common.dll
FSharp.Compiler.Benchmarks.dll
FSharp.Compiler.ComponentTests.dll
FSharp.Test.Utilities.dll
Expand Down
4 changes: 3 additions & 1 deletion docs/release-notes/.FSharp.Compiler.Service/8.0.300.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

* Code generated files with > 64K methods and generated symbols crash when loaded. Use infered sequence points for debugging. ([Issue #16399](https://github.com/dotnet/fsharp/issues/16399), [#PR 16514](https://github.com/dotnet/fsharp/pull/16514))
* `nameof Module` expressions and patterns are processed to link files in `--test:GraphBasedChecking`. ([PR #16550](https://github.com/dotnet/fsharp/pull/16550))
* Graph Based Checking doesn't throw on invalid parsed input so it can be used for IDE scenarios ([PR #16575](https://github.com/dotnet/fsharp/pull/16575))
* Graph Based Checking doesn't throw on invalid parsed input so it can be used for IDE scenarios ([PR #16575](https://github.com/dotnet/fsharp/pull/16575), [PR #16588](https://github.com/dotnet/fsharp/pull/16588))
* Keep parens for problematic exprs (`if`, `match`, etc.) in `$"{(…):N0}"`, `$"{(…),-3}"`, etc. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578))

### Added

* The stackguard depth for ILPdbWriter.unshadowScopes can be modified via the environment variable `FSHARP_ILPdb_UnshadowScopes_StackGuardDepth`([PR #16583](https://github.com/dotnet/fsharp/pull/16583))
* Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. ([PR #16425](https://github.com/dotnet/fsharp/pull/16425))
* Name resolution: keep type vars in subsequent checks ([PR #16456](https://github.com/dotnet/fsharp/pull/16456))
* Higher-order-function-based API for working with the untyped abstract syntax tree. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462))
Expand Down
24 changes: 23 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ param (
[switch]$testAllButIntegration,
[switch]$testpack,
[switch]$testAOT,
[switch]$testBenchmarks,
[string]$officialSkipTests = "false",
[switch]$noVisualStudio,
[switch]$sourceBuild,
Expand Down Expand Up @@ -111,6 +112,7 @@ function Print-Usage() {
Write-Host " -testVs Run F# editor unit tests"
Write-Host " -testpack Verify built packages"
Write-Host " -testAOT Run AOT/Trimming tests"
Write-Host " -testBenchmarks Build and Run Benchmark suite"
Write-Host " -officialSkipTests <bool> Set to 'true' to skip running tests"
Write-Host ""
Write-Host "Advanced settings:"
Expand Down Expand Up @@ -176,6 +178,7 @@ function Process-Arguments() {
$script:testVs = $False
$script:testpack = $False
$script:testAOT = $False
$script:testBenchmarks = $False
$script:verifypackageshipstatus = $True
}

Expand Down Expand Up @@ -211,6 +214,10 @@ function Process-Arguments() {
$script:pack = $True;
}

if ($testBenchmarks) {
$script:testBenchmarks = $True
}

foreach ($property in $properties) {
if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
Write-Host "Invalid argument: $property"
Expand Down Expand Up @@ -339,7 +346,7 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str

if ($env:RunningAsPullRequest -ne "true" -and $noTestFilter -eq $false) {
$args += " --filter TestCategory!=PullRequest"
}
}`

if ($asBackgroundJob) {
Write-Host("Starting on the background: $args")
Expand Down Expand Up @@ -541,12 +548,21 @@ try {
}
}

if ($testBenchmarks) {
$properties_storage = $properties
$properties += "/p:RuntimeIdentifier=win-x64"
$properties += "/p:Configuration=Release" # Always run in release.
BuildSolution "FSharp.Benchmarks.sln" $False
$properties = $properties_storage
}

if ($pack) {
$properties_storage = $properties
$properties += "/p:GenerateSbom=false"
BuildSolution "Microsoft.FSharp.Compiler.sln" $True
$properties = $properties_storage
}

if ($build) {
VerifyAssemblyVersionsAndSymbols
}
Expand Down Expand Up @@ -662,6 +678,12 @@ try {
Pop-Location
}

if ($testBenchmarks) {
Push-Location "$RepoRoot\tests\benchmarks"
./SmokeTestBenchmarks.ps1
Pop-Location
}

# verify nupkgs have access to the source code
$nupkgtestFailed = $false
if ($testpack) {
Expand Down
8 changes: 7 additions & 1 deletion src/Compiler/AbstractIL/ilwritepdb.fs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ open Internal.Utilities
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.AbstractIL.Support
open Internal.Utilities.Library
open Internal.Utilities.Library.Extras
open FSharp.Compiler.DiagnosticsLogger
open FSharp.Compiler.IO
open FSharp.Compiler.Text.Range
Expand Down Expand Up @@ -1028,6 +1029,11 @@ let rec pushShadowedLocals (stackGuard: StackGuard) (localsToPush: PdbLocalVar[]
// adding the text " (shadowed)" to the names of those with name conflicts.
let unshadowScopes rootScope =
// Avoid stack overflow when writing linearly nested scopes
let stackGuard = StackGuard(100, "ILPdbWriter.unshadowScopes")
let UnshadowScopesStackGuardDepth =
GetEnvInteger "FSHARP_ILPdb_UnshadowScopes_StackGuardDepth" 100

let stackGuard =
StackGuard(UnshadowScopesStackGuardDepth, "ILPdbWriter.unshadowScopes")

let result, _ = pushShadowedLocals stackGuard [||] rootScope
result
7 changes: 3 additions & 4 deletions src/Compiler/Driver/GraphChecking/FileContentMapping.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ type Continuations = ((FileContentEntry list -> FileContentEntry list) -> FileCo
let collectFromOption (mapping: 'T -> 'U list) (t: 'T option) : 'U list = List.collect mapping (Option.toList t)

let longIdentToPath (skipLast: bool) (longId: LongIdent) : LongIdentifier =
if skipLast then
List.take (longId.Length - 1) longId
else
longId
match skipLast, longId with
| true, _ :: _ -> List.take (longId.Length - 1) longId
| _ -> longId
|> List.map (fun ident -> ident.idText)

let synLongIdentToPath (skipLast: bool) (synLongIdent: SynLongIdent) =
Expand Down
10 changes: 7 additions & 3 deletions src/Compiler/Driver/GraphChecking/GraphProcessing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ let processGraphAsync<'Item, 'Result when 'Item: equality and 'Item: comparison>

let processedCount = IncrementableInt(0)

let raiseExn (item, ex: exn) =
localCts.Cancel()
let handleExn (item, ex: exn) =
try
localCts.Cancel()
with :? ObjectDisposedException ->
// If it's disposed already, it means that the processing has already finished, most likely due to cancellation or failure in another node.
()

match ex with
| :? OperationCanceledException -> completionSignal.TrySetCanceled()
Expand All @@ -252,7 +256,7 @@ let processGraphAsync<'Item, 'Result when 'Item: equality and 'Item: comparison>

match res with
| Choice1Of2() -> ()
| Choice2Of2 ex -> raiseExn (node.Info.Item, ex)
| Choice2Of2 ex -> handleExn (node.Info.Item, ex)
},
cts.Token
)
Expand Down
14 changes: 13 additions & 1 deletion src/Compiler/Facilities/BuildGraph.fs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,19 @@ type NodeCode private () =
}

static member Parallel(computations: NodeCode<'T> seq) =
computations |> Seq.map (fun (Node x) -> x) |> Async.Parallel |> Node
let diagnosticsLogger = DiagnosticsThreadStatics.DiagnosticsLogger
let phase = DiagnosticsThreadStatics.BuildPhase

computations
|> Seq.map (fun (Node x) ->
async {
DiagnosticsThreadStatics.DiagnosticsLogger <- diagnosticsLogger
DiagnosticsThreadStatics.BuildPhase <- phase
return! x
})
|> Async.Parallel
|> wrapThreadStaticInfo
|> Node

[<RequireQualifiedAccess>]
module GraphNode =
Expand Down
Loading