Skip to content

Commit

Permalink
merge and format
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyme committed May 31, 2022
2 parents 98ceafa + 5b1a3ae commit 56372c2
Show file tree
Hide file tree
Showing 150 changed files with 38,643 additions and 25,748 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "5.0.0-alpha-006",
"version": "5.0.0-alpha-008",
"commands": [
"fantomas"
]
Expand Down
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
root = true

# max_line_length is set to 140. At some point we will reduce it to 120 for as many files as reasonable.
[*.fs]
max_line_length=140
fsharp_newline_between_type_definition_and_members=true
fsharp_max_function_binding_width=40
fsharp_max_if_then_else_short_width=60
fsharp_max_infix_operator_expression=80
fsharp_max_array_or_list_width=80
fsharp_max_array_or_list_number_of_items=5
Expand All @@ -12,3 +16,13 @@ fsharp_keep_max_number_of_blank_lines=1
[*.fsi]
fsharp_newline_between_type_definition_and_members=true
fsharp_keep_max_number_of_blank_lines=1

# These files contains many imperative if-then expressions which are not clearer on one line
# Reducing fsharp_max_if_then_else_short_width back to its default formats these over multiple lines.
[src/FSharp.Build/*.fs]
fsharp_max_if_then_else_short_width=40

# This file contains a long list of one-line function definitions. Increasing
# fsharp_max_function_binding_width formats these over a single line.
[src/Compiler/Driver/CompilerDiagnostics.fs]
fsharp_max_function_binding_width=70
28 changes: 23 additions & 5 deletions .fantomasignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ service/
setup/
tests/
vsintegration/
artifacts/

# Explicitly unformatted implementation files

src/FSharp.Core/**/*.fs
src/Compiler/**/*.fs
src/Compiler/AbstractIL/**/*.fs
src/Compiler/Checking/**/*.fs
src/Compiler/CodeGen/**/*.fs
src/Compiler/DependencyManager/**/*.fs
src/Compiler/Driver/**/*.fs
src/Compiler/Facilities/**/*.fs
src/Compiler/Interactive/**/*.fs
src/Compiler/Legacy/**/*.fs
Expand All @@ -27,9 +24,30 @@ src/Compiler/Service/**/*.fs
src/Compiler/Symbols/**/*.fs
src/Compiler/SyntaxTree/**/*.fs
src/Compiler/TypedTree/**/*.fs
src/Compiler/Utilities/**/*.fs
src/Microsoft.FSharp.Compiler/**/*.fs

# Fantomas limitations on implementation files in FSharp.Core (to investigate)

src/FSharp.Core/array2.fs
src/FSharp.Core/array3.fs
src/FSharp.Core/Linq.fs
src/FSharp.Core/local.fs
src/FSharp.Core/nativeptr.fs
src/FSharp.Core/prim-types-prelude.fs
src/FSharp.Core/prim-types.fs
src/FSharp.Core/printf.fs
src/FSharp.Core/Query.fs
src/FSharp.Core/seqcore.fs

# Fantomas limitation https://github.com/fsprojects/fantomas/issues/2264

src/FSharp.Core/SI.fs

# Fantomas limitations on implementation files (to investigate)

src/Compiler/AbstractIL/ilwrite.fs
src/Compiler/Utilities/lib.fs

# Fantomas limitations on signature files (to investigate)

src/Compiler/AbstractIL/ilread.fsi
Expand Down
11 changes: 7 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
"request": "launch",
// TODO: Shall we assume that it's already been built, or build it every time we debug?
// "preLaunchTask": "Build (Debug)",
// If you have changed target frameworks, make sure to update the program path.
// If you have changed target frameworks, make sure to update the program p
"program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net6.0/fsi.dll",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal", // This is the default to be able to run in Codespaces.
"internalConsoleOptions": "neverOpen",
"suppressJITOptimizations": true,
"stopAtEntry": false,
"justMyCode": false,
"enableStepFiltering": true,
Expand All @@ -46,8 +48,10 @@
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal", // This is the default to be able to run in Codespaces.
"internalConsoleOptions": "neverOpen",
"suppressJITOptimizations": true,
"stopAtEntry": false,
"justMyCode": false,
"justMyCode": true,
"enableStepFiltering": true,
"symbolOptions": {
"searchMicrosoftSymbolServer": true,
Expand All @@ -60,7 +64,7 @@
},
},
{
"name": "Attach to .NET process",
"name": "Attach to a .NET process",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}",
Expand All @@ -69,7 +73,6 @@
"enabled": true
}
},
"stopAtEntry": false,
"justMyCode": false,
"enableStepFiltering": false,
}
Expand Down
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"*.fs": "${capture}.fsi"
},
"FSharp.suggestGitignore": false,
"FSharp.enableMSBuildProjectGraph": true,
"FSharp.workspacePath": "service/FSharp.Compiler.Service.sln",
"FSharp.workspaceModePeekDeepLevel": 2,
"FSharp.enableMSBuildProjectGraph": false,
"FSharp.workspacePath": "FSharp.Compiler.Service.sln",
"FSharp.workspaceModePeekDeepLevel": 1,
"FSharp.enableBackgroundServices": false,
"FSharp.excludeProjectDirectories": [
".git",
Expand All @@ -35,7 +35,7 @@
"csharp.suppressDotnetRestoreNotification": true,
"csharp.suppressHiddenDiagnostics": true,
"omnisharp.autoStart": false,
"omnisharp.defaultLaunchSolution": "service/FSharp.Compiler.Service.sln",
"omnisharp.defaultLaunchSolution": "FSharp.Compiler.Service.sln",
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
"omnisharp.disableMSBuildDiagnosticWarning": true,
"omnisharp.enableRoslynAnalyzers": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32228.430
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "..\src\Compiler\FSharp.Compiler.Service.fsproj", "{A59DB8AE-8044-41A5-848A-800A7FF31C93}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "src\Compiler\FSharp.Compiler.Service.fsproj", "{A59DB8AE-8044-41A5-848A-800A7FF31C93}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "..\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{8D9C9683-5041-48AB-8FA9-0939D2D27D33}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{8D9C9683-5041-48AB-8FA9-0939D2D27D33}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.DependencyManager.Nuget", "..\src\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{98E7659D-8E0C-489F-B4F5-E12AFC0D1BFA}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.DependencyManager.Nuget", "src\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{98E7659D-8E0C-489F-B4F5-E12AFC0D1BFA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FSharp.Compiler.Service.Tests support", "FSharp.Compiler.Service.Tests support", "{875D91AC-BA4C-4191-AB11-AE461DB9B8DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharp_Analysis", "..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{BFE6E6F1-1B73-404F-A3A5-30B57E5E0731}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{BFE6E6F1-1B73-404F-A3A5-30B57E5E0731}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestTP", "..\tests\service\data\TestTP\TestTP.fsproj", "{2EF674B9-8B56-4796-9933-42B2629E52C3}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestTP", "tests\service\data\TestTP\TestTP.fsproj", "{2EF674B9-8B56-4796-9933-42B2629E52C3}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Test.Utilities", "..\tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj", "{38A23D53-E2BF-4B76-907F-49F41D60C88E}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Test.Utilities", "tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj", "{38A23D53-E2BF-4B76-907F-49F41D60C88E}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.ComponentTests", "..\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{2A182B7D-EDA3-4BF2-84B8-C7553BB7A5A7}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.ComponentTests", "tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{2A182B7D-EDA3-4BF2-84B8-C7553BB7A5A7}"
ProjectSection(ProjectDependencies) = postProject
{38A23D53-E2BF-4B76-907F-49F41D60C88E} = {38A23D53-E2BF-4B76-907F-49F41D60C88E}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ stages:
packageType: sdk
useGlobalJson: true
includePreviewVersions: false
workingDirectory: $(Build.SourcesDirectory)/service
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Build.SourcesDirectory)/.dotnet
- script: .\eng\test-determinism.cmd -configuration Debug
displayName: Determinism tests with Debug configuration
Expand Down Expand Up @@ -454,7 +454,7 @@ stages:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Regular rebuild of FSharp.sln
- script: dotnet build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)/service
workingDirectory: $(Build.SourcesDirectory)
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Regular rebuild of FSharp.Compiler.Service.sln
Expand Down Expand Up @@ -486,7 +486,7 @@ stages:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Regular rebuild of FSharp.sln
- script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)/service
workingDirectory: $(Build.SourcesDirectory)
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Regular rebuild of FSharp.Compiler.Service.sln
Expand Down Expand Up @@ -518,7 +518,7 @@ stages:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Regular rebuild of FSharp.sln
- script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\"
workingDirectory: $(Build.SourcesDirectory)/service
workingDirectory: $(Build.SourcesDirectory)
env:
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
displayName: Regular rebuild of FSharp.Compiler.Service.sln
Expand Down
2 changes: 1 addition & 1 deletion eng/test-determinism.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Run-Build([string]$rootDir, [string]$logFileName) {
$stopWatch.Stop()
Write-Host "Cleaning took $($stopWatch.Elapsed)"

$solution = Join-Path $rootDir (Join-Path "service" "FSharp.Compiler.Service.sln")
$solution = Join-Path $rootDir "FSharp.Compiler.Service.sln"

if ($logFileName -eq "") {
$logFileName = [IO.Path]::GetFileNameWithoutExtension($projectFilePath)
Expand Down
7 changes: 0 additions & 7 deletions service/global.json

This file was deleted.

Loading

0 comments on commit 56372c2

Please sign in to comment.