diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
new file mode 100644
index 0000000000..c2021d8555
--- /dev/null
+++ b/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "fsharp.formatting.commandtool": {
+ "version": "11.5.1",
+ "commands": [
+ "fsdocs"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
deleted file mode 100644
index 9ffc7f9619..0000000000
--- a/.devcontainer/Dockerfile
+++ /dev/null
@@ -1,40 +0,0 @@
-#-------------------------------------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
-#-------------------------------------------------------------------------------------------------------------
-
-FROM mcr.microsoft.com/dotnet/core/sdk:3.1
-
-# Avoid warnings by switching to noninteractive
-ENV DEBIAN_FRONTEND=noninteractive
-
-# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
-# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
-# will be updated to match your local UID/GID (when using the dockerFile property).
-# See https://aka.ms/vscode-remote/containers/non-root-user for details.
-ARG USERNAME=vscode
-ARG USER_UID=1000
-ARG USER_GID=$USER_UID
-
-# Configure apt and install packages
-RUN apt-get update \
- && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
- #
- # Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
- && apt-get -y install git openssh-client less iproute2 procps lsb-release \
- #
- # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
- && groupadd --gid $USER_GID $USERNAME \
- && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
- # [Optional] Add sudo support for the non-root user
- && apt-get install -y sudo \
- && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
- && chmod 0440 /etc/sudoers.d/$USERNAME \
- #
- # Clean up
- && apt-get autoremove -y \
- && apt-get clean -y \
- && rm -rf /var/lib/apt/lists/*
-
-# Switch back to dialog for any ad-hoc use of apt-get
-ENV DEBIAN_FRONTEND=dialog
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
deleted file mode 100644
index 970a9ca1c0..0000000000
--- a/.devcontainer/devcontainer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
-// https://github.com/microsoft/vscode-dev-containers/tree/v0.108.0/containers/dotnetcore-3.1-fsharp
-{
- "name": "F# (.NET Core 3.1)",
- "dockerFile": "Dockerfile",
-
- // Set *default* container specific settings.json values on container create.
- //
- // .NET Core is now the default for F# in .NET Core 3.0+
- // However, .NET Core scripting is not the default yet. Set that to true.
- "settings": {
- "terminal.integrated.shell.linux": "/bin/bash",
- "FSharp.useSdkScripts":true,
- "editor.trimAutoWhitespace": false,
- "files.trimTrailingWhitespace": false,
- "FSharp.suggestGitignore": false,
- "FSharp.workspacePath": "FSharp.sln"
- },
-
- // Add the IDs of extensions you want installed when the container is created.
- "extensions": [
- "Ionide.Ionide-fsharp",
- "ms-dotnettools.csharp"
- ],
-
- // Use 'forwardPorts' to make a list of ports inside the container available locally.
- // "forwardPorts": [],
-
- // Use 'postCreateCommand' to run commands after the container is created.
- "postCreateCommand": "./build.sh",
-
- // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
- // "remoteUser": "vscode"
-}
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index db017a84e9..0000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,29 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-
-# Custom for Visual Studio
-*.cs text diff=csharp
-*.sln text eol=crlf merge=union
-*.csproj text merge=union
-*.vbproj text merge=union
-*.fsproj text merge=union
-*.dbproj text merge=union
-
-# Standard to msysgit
-*.doc diff=astextplain
-*.DOC diff=astextplain
-*.docx diff=astextplain
-*.DOCX diff=astextplain
-*.dot diff=astextplain
-*.DOT diff=astextplain
-*.pdf diff=astextplain
-*.PDF diff=astextplain
-*.rtf diff=astextplain
-*.RTF diff=astextplain
-
-*.sh text eol=lf
-targets.make text eol=lf
-
-*.bsl linguist-vendored=true
-
-*.png binary
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 212c869a3e..0000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve F#
-title: ''
-labels: ''
-assignees: ''
-
----
-
-Please provide a succinct description of the issue.
-
-**Repro steps**
-
-Provide the steps required to reproduce the problem:
-
-1. Step A
-2. Step B
-
-If possible attach a zip file with the repro case. This often makes it easier for others to reproduce.
-The zip file should ideally represent the situation just before the call/step that is problematic.
-
-**Expected behavior**
-
-Provide a description of the expected behavior.
-
-**Actual behavior**
-
-Provide a description of the actual behaviour observed.
-
-**Known workarounds**
-
-Provide a description of any known workarounds.
-
-**Related information**
-
-Provide any related information (optional):
-
-* Operating system
-* .NET Runtime kind (.NET Core, .NET Framework, Mono)
-* Editing Tools (e.g. Visual Studio Version, Visual Studio)
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 0a66fd8d38..0000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for the F# tools or compiler
-title: ''
-labels: Feature Request
-assignees: ''
-
----
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/issue_template.md b/.github/issue_template.md
deleted file mode 100644
index 0aa81ef607..0000000000
--- a/.github/issue_template.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# FSharp.Compiler.Service Issue Template
-
-> Thanks for your intention to help out!
-
-We appreciate your enthusiasm, but this repository is a *read-only* fork of the official F# compiler. Please raise your issue at the [upstream repository](https://github.com/dotnet/fsharp/issues/new).
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
deleted file mode 100644
index 0e642c8927..0000000000
--- a/.github/pull_request_template.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# FSharp.Compiler.Service Pull Request Template
-
-> Thanks for your intention to help out!
-
-We appreciate your enthusiasm, but this repository is a *read-only* fork of the official F# compiler. Please raise your Pull Request at the [upstream repository](https://github.com/dotnet/fsharp/compare).
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 76b0d57318..0000000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Build
-
-on: [push, pull_request]
-
-jobs:
- build:
-
- strategy:
- fail-fast: false
- matrix:
- os: [windows-latest, macos-latest, ubuntu-latest]
- dotnet: [3.1.301] # TODO: wish this action didn't pin versions...
- include:
- - os: windows-latest
- knownFailure: false
- - os: macos-latest
- knownFailure: true
- - os: ubuntu-latest
- knownFailure: true
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v1
- - name: Setup .Net Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: ${{matrix.dotnet}}
- - name: Restore tools
- run: dotnet tool restore
- working-directory: ./fcs
- - name: Build
- run: dotnet fake build -t Build
- working-directory: ./fcs
- - name: Test
- run: dotnet fake build -s -t Test
- working-directory: ./fcs
- if: ${{ !matrix.knownFailure }}
- - name: Archive code coverage results
- uses: actions/upload-artifact@v2
- if: always()
- with:
- name: code-coverage-report-${{ matrix.os }}-${{ env.GITHUB_SHA }}
- path: ${{ github.workspace }}/artifacts/TestResults/Release/FSharp.Compiler.Service.Test.*.xml
\ No newline at end of file
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d321ff2960..b3265de2fe 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -3,32 +3,38 @@ name: Release docs
on:
push:
branches:
- - master
+ - main
+ workflow_dispatch:
jobs:
build:
- runs-on: macos-latest
+ strategy:
+ matrix:
+ os: [windows-latest]
+ dotnet: [5.0.400]
+ runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 3.1.301
+ dotnet-version: 5.0.400
- name: Restore tools
run: dotnet tool restore
- working-directory: ./fcs
- - name: Restore dependencies
- run: dotnet restore
- working-directory: ./fcs
- - name: Run Fornax
- run: dotnet fake build -t GenerateDocs
- working-directory: ./fcs
+ - name: Restore projects
+ run: dotnet restore FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
+ - name: Checkout fsharp master
+ run: git clone https://github.com/dotnet/fsharp --depth 1 fsharp -b main
+ - name: Build fsharp master (turn of CI build status)
+ run: cd fsharp && eng\CIBuild.cmd
+ - name: Run fsdocs
+ run: dotnet fsdocs build --sourcefolder fsharp
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./fcs/docsrc/_public
+ publish_dir: ./output
publish_branch: gh-pages
- force_orphan: true
\ No newline at end of file
+ force_orphan: true
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000000..6c55d2b513
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,32 @@
+name: Pull request checks
+
+on:
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ build:
+
+ strategy:
+ matrix:
+ os: [windows-latest]
+ dotnet: [5.0.400]
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 5.0.400
+ - name: Restore tools
+ run: dotnet tool restore
+ - name: Restore projects
+ run: dotnet restore FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj
+ - name: Checkout fsharp master
+ run: git clone https://github.com/dotnet/fsharp --depth 1 fsharp -b main
+ - name: Build fsharp master (turn of CI build status)
+ run: cd fsharp && eng\CIBuild.cmd
+ - name: Run fsdocs
+ run: dotnet fsdocs build --sourcefolder fsharp
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
deleted file mode 100644
index fa38aac6ea..0000000000
--- a/.github/workflows/publish.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Publish
-
-on:
- push:
- tags:
- - '*'
-
-jobs:
- build:
-
- strategy:
- matrix:
- os: [macos-latest]
- dotnet: [3.1.301]
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v1
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: ${{ matrix.dotnet }}
- - name: Restore tools
- run: dotnet tool restore
- working-directory: ./fcs
- - name: Build and package
- run: dotnet fake build -t NuGet
- working-directory: ./fcs
- # TODO: fix the version-differ to be able to handle the same type across different versions of the contributing dll
- # - name: Validate package bump
- # run: dotnet fake build -s -t ValidateVersionBump
- # working-directory: ./fcs
- - name: Create release
- run: dotnet fake build -s -t CreateRelease
- working-directory: ./fcs
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Publish to nuget
- run: dotnet fake build -s -t PublishNuget
- working-directory: ./fcs
- env:
- NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
-
-
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index d047a21cdb..6e2e1f7f49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,246 +1,12 @@
-# output location
-artifacts/
-
-/tests/scripts/current
-.dotnet/
-.packages/
-.tools/
-
-# Patches that may have been generated by scripts.
-# (These aren't generally useful to commit directly; if anything, they should be applied.)
-scripts/*.patch
-/fcs/FSharp.Compiler.Service/illex.fs
-/fcs/FSharp.Compiler.Service/ilpars.fs
-/fcs/FSharp.Compiler.Service/ilpars.fsi
-/fcs/FSharp.Compiler.Service/lex.fs
-/fcs/FSharp.Compiler.Service/pars.fs
-/fcs/FSharp.Compiler.Service/pars.fsi
-/fcs/FSharp.Compiler.Service/pplex.fs
-/fcs/FSharp.Compiler.Service/pppars.fs
-/fcs/FSharp.Compiler.Service/pppars.fsi
-/src/*.userprefs
-/src/fsharp/FSStrings.resources
-/src/fsharp/FSharp.Build/*.resx
-/src/fsharp/FSharp.Build-proto/*.resx
-/src/fsharp/FSharp.Build-proto/*.resources
-/src/fsharp/FSharp.Compiler-proto/*.resx
-/src/fsharp/FSharp.Compiler-proto/*.resources
-/src/fsharp/FSharp.Compiler-proto/*.sln
-/src/fsharp/FSharp.Compiler-proto/*.userprefs
-/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.Private/*.resx
-/src/fsharp/FSharp.Compiler.Private/*.resources
-/src/fsharp/FSharp.Compiler.Private/*.sln
-/src/fsharp/FSharp.Compiler.Private/*.userprefs
-/src/*.log
-/src/fsharp/Fsc-proto/illex.fs
-/src/fsharp/Fsc-proto/ilpars.fs
-/src/fsharp/Fsc-proto/ilpars.fsi
-/src/fsharp/Fsc-proto/lex.fs
-/src/fsharp/Fsc-proto/pars.fs
-/src/fsharp/Fsc-proto/pars.fsi
-/src/fsharp/Fsc-proto/pplex.fs
-/src/fsharp/Fsc-proto/pppars.fs
-/src/fsharp/Fsc-proto/pppars.fsi
-/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
-/vsintegration/src/unittests/Unittests.fsi
-/tests/*FSharp_Failures.env
-/tests/*FSharp_Failures.lst
-/tests/fsharpqa/testenv/bin/
-/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll
-/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb
-/tests/Xnet40-fsharpqa-suite-failures.log.*
-/tests/fsharp/typeProviders/splitAssemblyTools/provider.dll
-/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.dll
-/vsintegration/src/service/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi
-/vsintegration/src/service/FsPkgs/FSharp.Project/FS/ctofiles/
-/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll
-/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.dll
-/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.env
-/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.lst
-/tests/**/FSharp.Core.dll
-/tests/fsharp/optimize/stats/FSharpOptimizationInfo.FSharp.Core
-/tests/fsharp/optimize/stats/FSharpSignatureInfo.FSharp.Core
-lib/debug
-lib/release
-lib/proto
-lib/bootstrap/4.1/*.mdb
-lib/bootstrap/4.1/*.xml
-lib/bootstrap/4.1/fsharpc
-lib/bootstrap/4.1/fsharpi
-lib/bootstrap/4.1/policy*
-obj/
-bin/
-aclocal.m4
-src/*.userprefs
-src/fsharp/FSStrings.resources
packages
-src/fsharp/FSharp.Build/*.resx
-src/fsharp/FSharp.Build-proto/*.resx
-src/fsharp/FSharp.Build-proto/*.resources
-src/fsharp/FSharp.Compiler-proto/*.resx
-src/fsharp/FSharp.Compiler-proto/*.resources
-src/fsharp/FSharp.Compiler-proto/*.sln
-src/fsharp/FSharp.Compiler-proto/*.userprefs
-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/*.resx
-src/fsharp/FSharp.Compiler/*.resources
-src/fsharp/FSharp.Compiler/*.sln
-src/fsharp/FSharp.Compiler/*.userprefs
-Debug
-Release
-Proto
-sign_temp
-.libs
-configure
-config.log
-config.status
-src/fsharp/FSharp.Compiler/illex.fs
-src/fsharp/FSharp.Compiler/ilpars.fs
-src/fsharp/FSharp.Compiler/ilpars.fsi
-src/fsharp/FSharp.Compiler/lex.fs
-src/fsharp/FSharp.Compiler/pars.fs
-src/fsharp/FSharp.Compiler/pars.fsi
-src/fsharp/FSharp.Compiler/pplex.fs
-src/fsharp/FSharp.Compiler/pppars.fs
-src/fsharp/FSharp.Compiler/pppars.fsi
-src/fsharp/FSharp.Compiler-proto/illex.fs
-src/fsharp/FSharp.Compiler-proto/ilpars.fs
-src/fsharp/FSharp.Compiler-proto/ilpars.fsi
-src/fsharp/FSharp.Compiler-proto/lex.fs
-src/fsharp/FSharp.Compiler-proto/pars.fs
-src/fsharp/FSharp.Compiler-proto/pars.fsi
-src/fsharp/FSharp.Compiler.Silverlight/lex.fs
-src/fsharp/FSharp.Compiler.Silverlight/pars.fs
-src/fsharp/FSharp.Compiler.Silverlight/pars.fsi
-src/fsharp/FSharp.Compiler-proto/pplex.fs
-src/fsharp/FSharp.Compiler-proto/pppars.fs
-src/fsharp/FSharp.Compiler-proto/pppars.fsi
-
-*~
-*.suo
-obj
-src/fsharp/FSharp.Data.TypeProviders/FSData.resx
-src/fsharp/fsiAnyCpu/FSIstrings.resx
-
-*.nupkg
-
-bin
-packages
-*.bak
-temp/
-src/fsharp/fsi/FSIStrings.fs
-
-src/fsharp/FSharp.Compiler.Service/FSComp.resx
-src/fsharp/FSharp.Compiler.Service/FSIstrings.resx
-src/fsharp/FSharp.Compiler.Service/illex.fs
-src/fsharp/FSharp.Compiler.Service/ilpars.fs
-src/fsharp/FSharp.Compiler.Service/ilpars.fsi
-src/fsharp/FSharp.Compiler.Service/lex.fs
-src/fsharp/FSharp.Compiler.Service/pars.fs
-src/fsharp/FSharp.Compiler.Service/pars.fsi
-TestResults.xml
-*.userprefs
-extras
-ossreadme*.txt
-*.XML
-src/assemblyinfo/assemblyinfo.shared.fs
-*.csproj.user
-src/fsharp/FSharp.LanguageService.Compiler/illex.*
-src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
-src/fsharp/FSharp.LanguageService.Compiler/lex.*
-src/fsharp/FSharp.LanguageService.Compiler/pars.*
-vsintegration/src/unittests/Unittests.fsi
-vsintegration/src/FSharp.ProjectSystem.FSharp/ctofiles/MenusAndCommands.cto
-tests/*FSharp_Failures.env
-tests/*FSharp_Failures.lst
-tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll
-tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb
-tests/XFSharpQA_Failures.log.*
-vsintegration/src/vs/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi
-vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ctofiles/
-tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll
-tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.dll
-packages
-FSharp.Compiler.Tools.Nuget/*.nupkg
-FSharp.Core.Nuget/*.nupkg
-tests/fsharpqa/Source/*FSharpQA_Failures.env
-tests/fsharpqa/Source/*FSharpQA_Failures.lst
-*.csproj.user
-*.fsproj.user
-*.vbproj.user
-*.sln.DotSettings.user
-*.log
-*.jrs
-*.chk
-*.bak
-FSharp.Compiler.Tools.Nuget/*.nupkg
-FSharp.Core.Nuget/*.nupkg
-artifacts/*.nupkg
-*.bak
-*.vserr
-*.err
-*.orig
-*.mdf
-*.ldf
-.paket/paket.exe
paket-files
-docsrc/tools/FSharp.Formatting.svclog
-src/fsharp/FSharp.Compiler.Service/pplex.fs
-src/fsharp/FSharp.Compiler.Service/pppars.fs
-src/fsharp/FSharp.Compiler.Service/pppars.fsi
-.fake
-*.cto
-*.vstman
-project.lock.json
-src/fsharp/FSharp.Compiler.Service/FSComp.fs
-src/fsharp/FSharp.Compiler.Service/FSComp.resx
-src/fsharp/FSharp.Compiler.Service/FSIstrings.fs
-src/fsharp/FSharp.Compiler.Service/FSIstrings.resx
-Tools/
-Backup/
-tests/fsharp/core/array/dont.run.peverify
-tests/fsharp/core/innerpoly/dont.run.peverify
-tests/fsharp/typecheck/sigs/neg94-pre.dll
-times
-/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
-source_link.json
-.vs/
-System.ValueTuple.dll
-tests/fsharpqa/testenv/bin/System.ValueTuple.dll
-**/.fake
-lib/netcore/fsc/bin/
-!lib/bootstrap/signed/**/*
-/fcs/packages/
-*/paket-files/
-/fcs/TestResult.xml
-/tests/fcs/
-/fcs/.paket/Paket.Restore.targets
-msbuild.binlog
-/fcs/FSharp.Compiler.Service.netstandard/*.fs
-/fcs/FSharp.Compiler.Service.netstandard/*.fsi
.ionide
+_public
.vscode
-**/.DS_Store
-/tests/fsharp/regression/5531/compilation.output.test.txt
-/tests/fsharp/core/fsfromfsviacs/compilation.langversion.old.output.txt
-/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.txt
-*ncrunch*.user
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
+.paket
+fsharp/
+FSharp.Formatting/
+.fsdocs/
+FSharp.Compiler.Service/obj/
+tmp/
+
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index d763943d4e..0000000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "editor.trimAutoWhitespace": false,
- "files.trimTrailingWhitespace": false,
- "FSharp.suggestGitignore": false,
- "FSharp.workspacePath": "FSharp.sln"
-}
\ No newline at end of file
diff --git a/.vsconfig b/.vsconfig
deleted file mode 100644
index 302d980890..0000000000
--- a/.vsconfig
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "version": "1.0",
- "components": [
- "Microsoft.VisualStudio.Component.CoreEditor",
- "Microsoft.VisualStudio.Workload.CoreEditor",
- "Microsoft.VisualStudio.Component.NuGet",
- "Microsoft.Net.Component.4.6.1.TargetingPack",
- "Microsoft.VisualStudio.Component.Roslyn.Compiler",
- "Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
- "Microsoft.VisualStudio.Component.FSharp",
- "Microsoft.Net.Core.Component.SDK.2.1",
- "Microsoft.NetCore.ComponentGroup.DevelopmentTools.2.1",
- "Microsoft.Net.Component.4.7.2.SDK",
- "Microsoft.Net.Component.4.7.2.TargetingPack",
- "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
- "Microsoft.Component.MSBuild",
- "Microsoft.VisualStudio.Component.TextTemplating",
- "Microsoft.VisualStudio.Component.ManagedDesktop.Core",
- "Microsoft.Net.Component.4.6.TargetingPack",
- "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
- "Microsoft.VisualStudio.Component.FSharp.Desktop",
- "Microsoft.VisualStudio.Workload.ManagedDesktop",
- "Microsoft.VisualStudio.Component.VSSDK",
- "Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites",
- "Microsoft.VisualStudio.Workload.VisualStudioExtension"
- ]
-}
diff --git a/Build.cmd b/Build.cmd
deleted file mode 100644
index ad55484933..0000000000
--- a/Build.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -build -restore %*"
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..216ec7e2bb
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at fsharp@fsharp.org. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 99a475b0d6..0000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Contributing to FSharp.Compiler.Service
-
-> Thanks for your intention to help out!
-
-We appreciate your enthusiasm, but this repository is a *read-only* fork of the official F# compiler. If you have issues, contributions, or questions, please raise them at the [upstream repository](https://github.com/dotnet/fsharp).
diff --git a/CoordinateXlif.targets b/CoordinateXlif.targets
deleted file mode 100644
index ea1ed17aaa..0000000000
--- a/CoordinateXlif.targets
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
deleted file mode 100644
index e9c2a5c5e9..0000000000
--- a/Directory.Build.props
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/Directory.Build.targets b/Directory.Build.targets
deleted file mode 100644
index 08da3ab096..0000000000
--- a/Directory.Build.targets
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
new file mode 100644
index 0000000000..308c6da3dd
--- /dev/null
+++ b/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -0,0 +1,42 @@
+
+
+
+ netstandard2.0
+ F# Software Foundation; Microsoft; F# Contributors
+ The core library for F#
+ The core library F#
+ Copyright 2003-2020
+ true
+
+ true
+ Library
+ false
+ true
+ MIT
+ 4.7.2
+ true
+
+
+
+ $(MSBuildThisFileDirectory)..\..\fsharp\artifacts\bin\FSharp.Compiler.Service\Debug\netstandard2.0\FSharp.Compiler.Service.dll
+
+
+ $(MSBuildThisFileDirectory)..\fsharp\artifacts\bin\FSharp.Compiler.Service\Debug\netstandard2.0\FSharp.Compiler.Service.dll
+
+
+
+
+ https://github.com/dotnet/fsharp/blob/main/License.txt
+ https://fsharp.github.io/fsharp-core-docs/
+ https://fsharp.org/img/logo/fsharp128.png
+ F#;async;fsharp;streaming
+ https://github.com/dotnet/fsharp/
+ https://fsharp.org
+ https://github.com/dotnet/fsharp/blob/main/License.txt
+ https://github.com/dotnet/fsharp/blob/main/release-notes.md
+ git
+ true
+
+
+
+
diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props
deleted file mode 100644
index 1abb6c8a95..0000000000
--- a/FSharp.Profiles.props
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- $(DefineConstants);CROSS_PLATFORM_COMPILER
- $(DefineConstants);ENABLE_MONO_SUPPORT
-
-
-
- $(DefineConstants);NETSTANDARD
- $(DefineConstants);FX_NO_APP_DOMAINS
- $(DefineConstants);FX_NO_CORHOST_SIGNER
- $(DefineConstants);FX_NO_PDB_READER
- $(DefineConstants);FX_NO_PDB_WRITER
- $(DefineConstants);FX_NO_SYMBOLSTORE
- $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION
- $(DefineConstants);FX_NO_WIN_REGISTRY
- $(DefineConstants);FX_NO_WINFORMS
- $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER
- $(DefineConstants);FX_RESHAPED_REFEMIT
- $(OtherFlags) --simpleresolution
-
-
-
diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props
deleted file mode 100644
index 681a3d3c70..0000000000
--- a/FSharpBuild.Directory.Build.props
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
-
- true
-
-
-
-
- $(RepoRoot)src
- $(RepoRoot)tests
- $(ArtifactsDir)\SymStore
- $(ArtifactsDir)\Bootstrap
- 4.4.0
- 1182;0025;$(WarningsAsErrors)
-
-
-
-
- $(MSBuildThisFileDirectory)icon.png
-
-
- $(RestoreAdditionalProjectSources);$(ArtifactsPackagesDir)
- $(ArtifactsPackagesDir)
-
-
- $(NUGET_PACKAGES)
- $(UserProfile)\.nuget\packages\
- $(HOME)/.nuget/packages/
-
-
- $(NuGetPackageRoot)\
- $(NuGetPackageRoot)/
-
-
- true
-
-
-
-
- /usr
- /Library/Frameworks/Mono.framework/Versions/Current
- $(MonoRoot)/lib/mono
- true
- $(MonoLibFolder)/4.5-api
- $(MonoLibFolder)/4.5.1-api
- $(MonoLibFolder)/4.5.2-api
- $(MonoLibFolder)/4.6-api
- $(MonoLibFolder)/4.6.1-api
- $(MonoLibFolder)/4.6.2-api
- $(MonoLibFolder)/4.7-api
- $(MonoLibFolder)/4.7.1-api
- $(MonoLibFolder)/4.7.2-api
-
-
-
-
- Microsoft
-
-
- $(FSharpSourcesRoot)\fsharp\test.snk
- false
- STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)
-
-
-
-
- false
- true
-
-
-
-
- false
- false
- https://github.com/Microsoft/visualfsharp
- git
-
-
-
- <_DotGitDir>$(RepoRoot).git
- <_HeadFileContent Condition="Exists('$(_DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(_DotGitDir)/HEAD').Trim())
- <_RefPath Condition="$(_HeadFileContent.StartsWith('ref: '))">$(_DotGitDir)/$(_HeadFileContent.Substring(5))
- $(BUILD_SOURCEVERSION)
- $([System.IO.File]::ReadAllText('$(_RefPath)').Trim())
-
-
-
-
- $(NoWarn);FS2003
- true
- embedded
- fs
- false
- true
-
-
-
- $(DefineConstants);TESTING_ON_LINUX
-
-
-
-
- $(ProtoOutputPath)\fsc\Microsoft.FSharp.Targets
- $(ProtoOutputPath)\fsc\Microsoft.FSharp.NetSdk.props
- $(ProtoOutputPath)\fsc\Microsoft.FSharp.NetSdk.targets
- $(ProtoOutputPath)\fsc\Microsoft.FSharp.Overrides.NetSdk.targets
-
-
-
diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets
deleted file mode 100644
index 256688bd2a..0000000000
--- a/FSharpBuild.Directory.Build.targets
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- <__TargetFilePath>@(NoneSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')
- <__TargetFileName>@(NoneSubstituteText->'%(Filename)%(Extension)')
- <__TargetLink>@(NoneSubstituteText->'%(Link)')
-
- <_ReplacementText>$([System.IO.File]::ReadAllText('%(NoneSubstituteText.FullPath)'))
- <_ReplacementText Condition="'%(NoneSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern1)', '%(NoneSubstituteText.Replacement1)'))
- <_ReplacementText Condition="'%(NoneSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern2)', '%(NoneSubstituteText.Replacement2)'))
- <_ReplacementText Condition="'%(NoneSubstituteText.Pattern3)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern3)', '%(NoneSubstituteText.Replacement3)'))
-
- <_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' != ''">%(NoneSubstituteText.CopyToOutputDirectory)
- <_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' == ''">Never
-
- <_IncludeInVsix>false
- <_IncludeInVsix Condition="'%(NoneSubstituteText.IncludeInVsix)' == 'true'">true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BuildPropertyLines Remove="@(_BuildPropertyLines)" />
- <_BuildPropertyLines Include="// <auto-generated >" />
- <_BuildPropertyLines Include="// <Generated by the FSharp WriteCodeFragment class./>" />
- <_BuildPropertyLines Include="// </auto-generated/>" />
- <_BuildPropertyLines Include="//" />
- <_BuildPropertyLines Include="module internal FSharp.BuildProperties" />
- <_BuildPropertyLines Include="let fsProductVersion = "$(FSPRODUCTVERSION)"" />
- <_BuildPropertyLines Include="let fsLanguageVersion = "$(FSLANGUAGEVERSION)"" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props
deleted file mode 100644
index 90d7376140..0000000000
--- a/FSharpTests.Directory.Build.props
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
- true
-
-
-
- true
-
- $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net472
- fsc.exe
-
-
- $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net472
- fsi.exe
-
-
-
-
- true
-
- $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
- dotnet.exe
- dotnet
- $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\netcoreapp3.1\fsc.exe
-
- $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)'))
- dotnet.exe
- dotnet
- $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\netcoreapp3.1\fsi.exe
-
-
-
-
- <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'!='Core'">net472
- <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">netcoreapp3.1
- <_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(_FSharpBuildTargetFramework)
-
- $(_FSharpBuildBinPath)\FSharp.Build.dll
-
- $(_FSharpBuildBinPath)/Microsoft.FSharp.Targets
- $(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.props
- $(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.targets
- $(_FSharpBuildBinPath)/Microsoft.FSharp.Overrides.NetSdk.targets
-
-
-
diff --git a/INTERNAL.md b/INTERNAL.md
deleted file mode 100644
index 15550dcedc..0000000000
--- a/INTERNAL.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Links for internal team members to find build definitions, etc.
-
-Note that usually only the most recent link in each section is interesting. Older links are included for reference only.
-
-## PR Build Definition
-
-The PR build definition can be found [here](https://dev.azure.com/dnceng/public/_build?definitionId=496) or by
-navigating through an existing PR.
-
-## Signed Build Definitions
-
-[VS 16.4 to current](https://dev.azure.com/dnceng/internal/_build?definitionId=499&_a=summary)
-
-[VS 15.7 to 16.3](https://dev.azure.com/devdiv/DevDiv/_build/index?definitionId=8978)
-
-[VS 15.6](https://dev.azure.com/devdiv/DevDiv/_build?definitionId=7239)
-
-[VS 15.0 to 15.5](https://dev.azure.com/devdiv/DevDiv/_build?definitionId=5037)
-
-## VS Insertion Generators
-
-VS 16.4 to current - part of the build definition. [See below](#vs-insertions-as-part-of-the-build-definition).
-
-The following insertion generators are automatically invoked upon successful completion of a signed build in each of
-their respective branches.
-
-[VS 16.3](https://dev.azure.com/devdiv/DevDiv/_release?definitionId=1839&_a=releases)
-
-[VS 16.2](https://dev.azure.com/devdiv/DevDiv/_release?definitionId=1699&_a=releases)
-
-[VS 16.1](https://dev.azure.com/devdiv/DevDiv/_release?definitionId=1669&_a=releases)
-
-VS 16.0 and prior were done manually
-
-## VS Insertions as part of the build definition
-
-Starting with the 16.4 release and moving forwards, the VS insertion is generated as part of the build. The relevant
-bits can be found near the bottom of [`azure-pipelines.yml`](azure-pipelines.yml) under the `VS Insertion` header. The
-interesting parameters are `componentBranchName` and `insertTargetBranch`. In short, when an internal signed build
-completes and the name of the branch built exactly equals the value in the `componentBranchName` parameter, a component
-insertion into VS will be created into the `insertTargetBranch` branch. The link to the insertion PR will be found
-near the bottom of the build under the title 'Insert into VS'. Examine the log for 'Insert VS Payload' and near the
-bottom you'll see a line that looks like `Created request #xxxxxx at https://...`.
-
-To see all insertions created this way (possibly including for other internal teams), check
-[here](https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequests?createdBy=122d5278-3e55-4868-9d40-1e28c2515fc4&_a=active).
-
-## Less interesting links
-
-[Nightly VSIX (master) uploader](https://dev.azure.com/dnceng/internal/_release?_a=releases&definitionId=70). Uploads
-a package from every build of `master` to the [Nightly VSIX feed](README.md#using-nightly-releases-in-visual-studio).
-
-[Nightly VSIX (preview) uploader](https://dev.azure.com/dnceng/internal/_release?_a=releases&definitionId=71). Uploads
-a package from every build of the branch that corresponds to the current Visual Studio preview to the
-[Preview VSIX feed](README.md#using-nightly-releases-in-visual-studio).
-
-[MyGet package uploader](https://dev.azure.com/dnceng/internal/_release?_a=releases&definitionId=69). Uploads various
-packages for internal consumption. Feed URL is `https://dotnet.myget.org/F/fsharp/api/v3/index.json`.
-
-[Internal source mirror](https://dev.azure.com/dnceng/internal/_git/dotnet-fsharp).
diff --git a/LICENSE b/LICENSE
index 20daa663dc..6167060e50 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,6 @@
-The MIT License (MIT)
+MIT License
-Copyright (c) Microsoft Corporation.
-All rights reserved.
+Copyright (c) 2020 F# Software Foundation Repositories
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/Language-Version-History.md b/Language-Version-History.md
deleted file mode 100644
index 72da5b5b33..0000000000
--- a/Language-Version-History.md
+++ /dev/null
@@ -1,107 +0,0 @@
-Features Added in F# Language Versions
-====================
-
-# [F# 1.0](https://docs.microsoft.com/en-us/archive/blogs/dsyme/welcome-to-dons-f-blog)
-
-- Discriminated unions
-- Records
-- Tuples
-- Pattern matching
-- Type abbreviations
-- Object expressions
-- Structs
-- Signature files
-- Imperative programming
-- Modules (no functors)
-- Nested modules
-- .NET Interoperability
-
-# [F# 1.1](https://docs.microsoft.com/en-us/archive/blogs/dsyme/a-taste-of-whats-new-in-f-1-1)
-
-- Interactive environment
-- Object programming
-- Encapsulation Extensions
-
-# [F# 2.0](https://fsharp.org/specs/language-spec/2.0/FSharpSpec-2.0-April-2012.pdf)
-
-- Active patterns
-- Units of measure
-- Sequence expressions
-- Asynchronous programming
-- Agent programming
-- Extension members
-- Named arguments
-- Optional arguments
-- Array slicing
-- Quotations
-- Native interoperability
-- Computation expressions
-
-# [F# 3.0](https://fsharp.org/specs/language-spec/3.0/FSharpSpec-3.0-final.pdf)
-
-- Type providers
-- LINQ query expressions
-- CLIMutable attribute
-- Triple-quoted strings
-- Auto-properties
-- Provided units-of-measure
-
-# [F# 3.1](https://fsharp.org/specs/language-spec/3.1/FSharpSpec-3.1-final.pdf)
-
-- Named union type fields
-- Extensions to array slicing
-- Type inference enhancements
-
-# [F# 4.0](https://fsharp.org/specs/language-spec/4.0/FSharpSpec-4.0-final.pdf)
-
-- `printf` on unitized values
-- Extension property initializers
-- Non-null provided types
-- Primary constructors as functions
-- Static parameters for provided methods
-- `printf` interpolation
-- Extended `#if` grammar
-- Multiple interface instantiations
-- Optional type args
-- Params dictionaries
-
-# [F# 4.1](https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf)
-
-- Struct tuples which inter-operate with C# tuples
-- Struct annotations for Records
-- Struct annotations for Single-case Discriminated Unions
-- Underscores in numeric literals
-- Caller info argument attributes
-- Result type and some basic Result functions
-- Mutually referential types and modules within the same file
-- Implicit `Module` syntax on modules with shared name as type
-- Byref returns, supporting consuming C# `ref`-returning methods
-- Error message improvements
-- Support for `fixed`
-
-# [F# 4.5](https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-45)
-
-- Versioning alignment of binary, package, and language
-- Support for `Span<'T>` and related types
-- Ability to produce `byref` returns
-- The `voidptr` type
-- The `inref<'T>` and `outref<'T>` types to represent readonly and write-only `byref`s
-- `IsByRefLike` structs
-- `IsReadOnly` structs
-- Extension method support for `byref<'T>`/`inref<'T>`/`outref<'T>`
-- `match!` keyword in computation expressions
-- Relaxed upcast with `yield` in F# sequence/list/array expressions
-- Relaxed indentation with list and array expressions
-- Enumeration cases emitted as public
-
-# [F# 4.6](https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-46)
-
-- Anonymous records
-- `ValueOption` module functions
-
-# [F# 4.7](https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-47)
-
-- Compiler support for `LangVersion`
-- Implicit `yield`s
-- No more required double underscore (wildcard identifier)
-- Indentation relaxations for parameters passed to constructors and static methods
diff --git a/NuGet.config b/NuGet.config
deleted file mode 100644
index 97aafe6f10..0000000000
--- a/NuGet.config
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/README.md b/README.md
index 3a627bd4ba..0b604c3dcf 100644
--- a/README.md
+++ b/README.md
@@ -1,102 +1,92 @@
-# OLD NOTES - ARCHIVED REPO, NOW MERGED with [dotnet/fsharp](https://github.com/dotnet/fsharp)
+# FSharp.Compiler.Service API documentation generation
+https://fsharp.github.io/FSharp.Compiler.Service
-------------------------
+## Contributing to Library Content
+To improve the content of the FSharp.Compiler.Service library documentation, contribute to the XML `///` documentation in the
+signature files (`*.fsi`) in the FSharp.Compiler.Service implementation.
-# F# Compiler Service (OLD NOTES - ARCHIVED REPO, NOW MERGED with [dotnet/fsharp](https://github.com/dotnet/fsharp))
+* Fork and clone https://github.com/dotnet/fsharp locally, see below, as a subdirectory of your copy of `fsharp-core-docs`
-The FSharp.Compiler.Service package contains a custom build of the F# compiler that
-exposes additional functionality for implementing F# language bindings, additional
-tools based on the compiler or refactoring tools. The package also includes F#
-interactive service that can be used for embedding F# scripting into your applications. This repository exists entirely to create and publish that package.
+* Contribute to [the src/fsharp directory](https://github.com/dotnet/fsharp/tree/master/src/fsharp)
-## Purpose
+* Use a local build, see below
-> This repo is (mostly) **read only**
+* Submit work to `main` branch of https://github.com/dotnet/fsharp
-This repo exists as a downstream packaging repository for the [FSharp.Compiler.Service](https://www.nuget.org/packages/FSharp.Compiler.Service) NuGet Package. It serves the following purposes _only_:
+* Once accepted your work will be published through a rebuild here, so submit a dummy pull request here
+## Contributing to Generation of API Docs
-* Release packaging
-* Hosting [public documentation](http://fsharp.github.io/FSharp.Compiler.Service/)
-* Serving as a stable base for Fable
+The docs are generated by using `fsdocs` tool from FSharp.Formatting. If you want to improve the generation process:
-It is a fork of the official F# source repository, which is located at [dotnet/fsharp](https://github.com/dotnet/fsharp). **All** issues and contributions should be raised there. All feature development should be targeted there. Once contributions are accepted into [dotnet/fsharp](https://github.com/dotnet/fsharp), they will be integrated into this repository for packaging and release.
+* Contribute to the API Docs mode and/or HTML generator in [FSharp.Formatting.ApiDocs](https://github.com/fsprojects/FSharp.Formatting/tree/master/src/FSharp.Formatting.ApiDocs) and [the `fsdocs` tool](https://github.com/fsprojects/FSharp.Formatting/tree/master/src/FSharp.Formatting.CommandTool)
-If you need to add customizations to FSharp.Compiler.Service for your own uses, you should clone [dotnet/fsharp](https://github.com/dotnet/fsharp) and build the FSharp.Compiler.Service binaries from there. The process is exactly the same as it is described below.
+* Use a local copy of these, see below, as a subdirectory of fsharp-core-docs
-### No contribution is too small
+* Submit work to the `master` branch of https://github.com/fsprojects/FSharp.Formatting
-Even if you find a single-character typo, we're happy to take the change! Although the codebase can feel daunting for beginners, we and other contributors are happy to help you along.
+* Once accepted the new tooling will be published through a rebuild here, so submit a dummy pull request here that increments dummyVersion.txt
-## Documentation
+## Contributing to Layout and Design
-For more information about the project, see:
+These pages are currently using [the default template of the FSharp.Formatting tools](https://github.com/fsprojects/FSharp.Formatting/blob/master/docs/_template.html)
+with its small amount of corresponding [CSS and JavaScript](https://github.com/fsprojects/FSharp.Formatting/tree/master/docs/content)
- * [F# Compiler Service API and usage documentation](http://fsharp.github.io/FSharp.Compiler.Service/)
- * [Description of the project structure](http://fsharp.github.io/FSharp.Compiler.Service/devnotes.html)
+See [FSharp.Formatting styling](https://fsprojects.github.io/FSharp.Formatting/styling.html) for information on styling for output generated by `fsdocs`.
-## Build and Test
+This template is *not* the long term plan (unless it is improved enough). We can improve the design - please help with this.
-On Windows:
+1. Copy the default template and CSS to `docs`. Rebuild as before. This template will be used instead of the default template.
- .\fcs\build.cmd Test
+2. After you have identified fixes and improvements, contribute back to the default template of FSharp.Formatting, or submit your work here and we can assess that. This will help improve many F# libraries.
-On Linux:
+Whatever improvements you make should eventually get copied across back into FSharp.Formatting (and the duplicated template and styling will then likely be removed from this repo once it's no longer needed). If the design diverges to be a completely different look and feel then we can make several templates available in FSharp.Formatting with this as one of them.
- ./fcs/build.sh Test
-To build NuGet packages:
+## Build steps
- build NuGet
- build TestAndNuGet
+Eventually the build will just be
-## Build Status
+ dotnet tool restore
+ dotnet restore FSharp.Compiler.Service
+ dotnet fsdocs build
-Branch | OS | Badge |
------- | ------ | - |
-master | Linux/OSX | [](https://travis-ci.org/fsharp/FSharp.Compiler.Service) |
-master | Windows | [](https://ci.appveyor.com/project/fsgit/fsharp-compiler-service) |
+For now, we want to pick up the latest copies of FSharp.Formatting and FSharp.Compiler.Service, and set you up to make contributions to these. So we ask you to clone local copies of these:
-## NuGet package
+ (start in 'fsharp-core-docs')
+ dotnet restore FSharp.Compiler.Service
-[](https://www.nuget.org/packages/FSharp.Compiler.Service)
+ (make 'fsharp-core-docs/fsharp' and 'fsharp-core-docs/FSharp.Formatting' )
+ git clone https://github.com/dotnet/fsharp --depth 1 -b main
+ git clone https://github.com/fsprojects/FSharp.Formatting --depth 1
-Stable builds are available in the NuGet Gallery:
-[https://www.nuget.org/packages/FSharp.Compiler.Service](https://www.nuget.org/packages/FSharp.Compiler.Service)
+ (build 'fsharp-core-docs/fsharp')
+ pushd fsharp
+ .\build -noVisualStudio
+ popd
-All AppVeyor builds are available using the NuGet feed: https://ci.appveyor.com/nuget/fsgit-fsharp-compiler-service
+ (build 'fsharp-core-docs/FSharp.Formatting')
+ pushd FSharp.Formatting
+ .\build -t Build
+ popd
-* [The F# Compiler Technical Guide](https://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html)
-* [The F# Language Specification](https://fsharp.org/specs/language-spec/)
+Then do iterative development using:
-## License
+ (from 'fsharp-core-docs')
+ FSharp.Formatting\src\FSharp.Formatting.CommandTool\bin\Release\netcoreapp3.1\fsdocs.exe watch --sourcefolder fsharp
-This project is subject to the MIT License. A copy of this license is in [License.txt](License.txt).
+## CI Pipeline
-## Code of Conduct
+This repo is published via GitHub Actions. On each push to master, the docs are built, and the outputs (which are written to the `output` directory by fsdocs) are pushed to the `gh-pages` branch. This repo is configured to host using GitHub Pages from this branch, so once the generated files are pushed the update is nearly-instant.
-This project has adopted the [Contributor Covenant](https://contributor-covenant.org/) code of conduct to clarify expected behavior in our community. You can read it at [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md).
+To build the very latest and freshest docs using the latest `fsdocs` tooling the CI does this:
-## Get In Touch
+1. build dotnet/fsharp `main` branch (where we assume latest doc updates have been pushed)
-Members of the [F# Software Foundation](https://fsharp.org) are invited to the [FSSF Slack](https://fsharp.org/guides/slack/). You can find support from other contributors in the `#compiler` and `#editor-support` channels.
+2. builds `FSharp.Formatting` master branch
-Additionally, you can use the `#fsharp` tag on Twitter if you have general F# questions, including about this repository. Chances are you'll get multiple responses.
+3. Uses that `FSharp.Formatting` tool to build the docs for the FSharp.Compiler.Service built in step 1
-The maintainers of this repository are:
-
- - [Don Syme](http://github.com/dsyme)
- - [Tomas Petricek](http://github.com/tpetricek)
- - [Enrico Sada](http://github.com/enricosada)
- - [Chet Husk](http://github.com/baronfel)
- - Many people have helped including [Robin Neatherway](https://github.com/rneatherway), [Dave Thomas](http://github.com/7sharp9), [Lincoln Atkinson](http://github.com/latkin), [Kevin Ransom](http://github.com/KevinRansom), [Vladimir Matveev](http://github.com/vladima) and others
-
-## About F\#
-
-* [What is F#](https://docs.microsoft.com/dotnet/fsharp/what-is-fsharp)
-* [Get started with F#](https://docs.microsoft.com/dotnet/fsharp/get-started/)
-* [F# Software Foundation](https://fsharp.org)
-* [F# Testimonials](https://fsharp.org/testimonials)
diff --git a/Restore.cmd b/Restore.cmd
deleted file mode 100644
index 1b84815f3e..0000000000
--- a/Restore.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -restore %*"
diff --git a/RoslynPackageVersion.txt b/RoslynPackageVersion.txt
deleted file mode 100644
index 2b54870d02..0000000000
--- a/RoslynPackageVersion.txt
+++ /dev/null
@@ -1 +0,0 @@
-3.2.0-beta4-19312-15
\ No newline at end of file
diff --git a/Test.cmd b/Test.cmd
deleted file mode 100644
index 4a6eabc39e..0000000000
--- a/Test.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -test %*"
diff --git a/benchmarks/Benchmarks.sln b/benchmarks/Benchmarks.sln
deleted file mode 100644
index 6b7bb5ac9f..0000000000
--- a/benchmarks/Benchmarks.sln
+++ /dev/null
@@ -1,62 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28307.136
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CompilerServiceBenchmarks", "CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "..\src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{BB9EAE76-194A-49D8-9618-586CBE7031D9}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}"
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.28407.52
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CompilerServiceBenchmarks", "CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "..\src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Proto|Any CPU = Proto|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.Build.0 = Release|Any CPU
- {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.Build.0 = Release|Any CPU
- {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.Build.0 = Release|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Proto|Any CPU.ActiveCfg = Release|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Proto|Any CPU.Build.0 = Release|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.Build.0 = Release|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.Build.0 = Debug|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0 = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {049A4D02-709F-418C-AD59-7FB0DBE956B1}
- EndGlobalSection
-EndGlobal
diff --git a/benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj b/benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
deleted file mode 100644
index 68f56def1d..0000000000
--- a/benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- Exe
- net472
- $(MSBuildProjectDirectory)\..\..\src
-
-
-
- Exe
- net472
- true
- true
- $(SystemValueTupleVersion)
-
-
-
- AnyCPU
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/benchmarks/CompilerServiceBenchmarks/Program.fs b/benchmarks/CompilerServiceBenchmarks/Program.fs
deleted file mode 100644
index f13602445d..0000000000
--- a/benchmarks/CompilerServiceBenchmarks/Program.fs
+++ /dev/null
@@ -1,320 +0,0 @@
-open System
-open System.IO
-open System.Text
-open FSharp.Compiler.ErrorLogger
-open FSharp.Compiler.SourceCodeServices
-open FSharp.Compiler.Text
-open FSharp.Compiler.AbstractIL
-open FSharp.Compiler.AbstractIL.IL
-open FSharp.Compiler.AbstractIL.ILBinaryReader
-open Microsoft.CodeAnalysis.Text
-open BenchmarkDotNet.Attributes
-open BenchmarkDotNet.Running
-
-module private SourceText =
-
- open System.Runtime.CompilerServices
-
- let weakTable = ConditionalWeakTable()
-
- let create (sourceText: SourceText) =
-
- let sourceText =
- { new ISourceText with
-
- member __.Item with get index = sourceText.[index]
-
- member __.GetLineString(lineIndex) =
- sourceText.Lines.[lineIndex].ToString()
-
- member __.GetLineCount() =
- sourceText.Lines.Count
-
- member __.GetLastCharacterPosition() =
- if sourceText.Lines.Count > 0 then
- (sourceText.Lines.Count, sourceText.Lines.[sourceText.Lines.Count - 1].Span.Length)
- else
- (0, 0)
-
- member __.GetSubTextString(start, length) =
- sourceText.GetSubText(TextSpan(start, length)).ToString()
-
- member __.SubTextEquals(target, startIndex) =
- if startIndex < 0 || startIndex >= sourceText.Length then
- raise (ArgumentOutOfRangeException("startIndex"))
-
- if String.IsNullOrEmpty(target) then
- raise (ArgumentException("Target is null or empty.", "target"))
-
- let lastIndex = startIndex + target.Length
- if lastIndex <= startIndex || lastIndex >= sourceText.Length then
- raise (ArgumentException("Target is too big.", "target"))
-
- let mutable finished = false
- let mutable didEqual = true
- let mutable i = 0
- while not finished && i < target.Length do
- if target.[i] <> sourceText.[startIndex + i] then
- didEqual <- false
- finished <- true // bail out early
- else
- i <- i + 1
-
- didEqual
-
- member __.ContentEquals(sourceText) =
- match sourceText with
- | :? SourceText as sourceText -> sourceText.ContentEquals(sourceText)
- | _ -> false
-
- member __.Length = sourceText.Length
-
- member __.CopyTo(sourceIndex, destination, destinationIndex, count) =
- sourceText.CopyTo(sourceIndex, destination, destinationIndex, count)
- }
-
- sourceText
-
-type SourceText with
-
- member this.ToFSharpSourceText() =
- SourceText.weakTable.GetValue(this, Runtime.CompilerServices.ConditionalWeakTable<_,_>.CreateValueCallback(SourceText.create))
-
-[]
-module Helpers =
-
- let createProject name referencedProjects =
- let tmpPath = Path.GetTempPath()
- let file = Path.Combine(tmpPath, Path.ChangeExtension(name, ".fs"))
- {
- ProjectFileName = Path.Combine(tmpPath, Path.ChangeExtension(name, ".dll"))
- ProjectId = None
- SourceFiles = [|file|]
- OtherOptions =
- Array.append [|"--optimize+"; "--target:library" |] (referencedProjects |> Array.ofList |> Array.map (fun x -> "-r:" + x.ProjectFileName))
- ReferencedProjects =
- referencedProjects
- |> List.map (fun x -> (x.ProjectFileName, x))
- |> Array.ofList
- IsIncompleteTypeCheckEnvironment = false
- UseScriptResolutionRules = false
- LoadTime = DateTime()
- UnresolvedReferences = None
- OriginalLoadReferences = []
- ExtraProjectInfo = None
- Stamp = Some 0L (* set the stamp to 0L on each run so we don't evaluate the whole project again *)
- }
-
- let generateSourceCode moduleName =
- sprintf """
-module Benchmark.%s
-
-type %s =
-
- val X : int
-
- val Y : int
-
- val Z : int
-
-let function%s (x: %s) =
- let x = 1
- let y = 2
- let z = x + y
- z""" moduleName moduleName moduleName moduleName
-
-[]
-type CompilerService() =
-
- let mutable checkerOpt = None
-
- let mutable sourceOpt = None
-
- let parsingOptions =
- {
- SourceFiles = [|"TypeChecker.fs"|]
- ConditionalCompilationDefines = []
- ErrorSeverityOptions = FSharpErrorSeverityOptions.Default
- IsInteractive = false
- LightSyntax = None
- CompilingFsLib = false
- IsExe = false
- }
-
- let mutable assembliesOpt = None
-
- let readerOptions =
- {
- pdbDirPath = None
- reduceMemoryUsage = ReduceMemoryFlag.No
- metadataOnly = MetadataOnlyFlag.Yes
- tryGetMetadataSnapshot = fun _ -> None
- }
-
- []
- member __.Setup() =
- match checkerOpt with
- | None -> checkerOpt <- Some(FSharpChecker.Create(projectCacheSize = 200))
- | _ -> ()
-
- match sourceOpt with
- | None ->
- sourceOpt <- Some <| SourceText.From(File.OpenRead("""..\..\..\..\..\src\fsharp\TypeChecker.fs"""), Encoding.Default, SourceHashAlgorithm.Sha1, true)
- | _ -> ()
-
- match assembliesOpt with
- | None ->
- assembliesOpt <-
- System.AppDomain.CurrentDomain.GetAssemblies()
- |> Array.map (fun x -> (x.Location))
- |> Some
- | _ -> ()
-
- []
- member __.ParsingTypeCheckerFs() =
- match checkerOpt, sourceOpt with
- | None, _ -> failwith "no checker"
- | _, None -> failwith "no source"
- | Some(checker), Some(source) ->
- let results = checker.ParseFile("TypeChecker.fs", source.ToFSharpSourceText(), parsingOptions) |> Async.RunSynchronously
- if results.ParseHadErrors then failwithf "parse had errors: %A" results.Errors
-
- []
- member __.ParsingTypeCheckerFsSetup() =
- match checkerOpt with
- | None -> failwith "no checker"
- | Some(checker) ->
- checker.InvalidateAll()
- checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()
- checker.ParseFile("dummy.fs", SourceText.ofString "dummy", parsingOptions) |> Async.RunSynchronously |> ignore
- ClearAllILModuleReaderCache()
-
- []
- member __.ILReading() =
- match assembliesOpt with
- | None -> failwith "no assemblies"
- | Some(assemblies) ->
- // We try to read most of everything in the assembly that matter, mainly types with their properties, methods, and fields.
- // CustomAttrs and SecurityDecls are lazy until you call them, so we call them here for benchmarking.
- assemblies
- |> Array.iter (fun (fileName) ->
- let reader = OpenILModuleReader fileName readerOptions
-
- let ilModuleDef = reader.ILModuleDef
-
- let ilAssemblyManifest = ilModuleDef.Manifest.Value
-
- ilAssemblyManifest.CustomAttrs |> ignore
- ilAssemblyManifest.SecurityDecls |> ignore
- ilAssemblyManifest.ExportedTypes.AsList
- |> List.iter (fun x ->
- x.CustomAttrs |> ignore
- )
-
- ilModuleDef.CustomAttrs |> ignore
- ilModuleDef.TypeDefs.AsArray
- |> Array.iter (fun ilTypeDef ->
- ilTypeDef.CustomAttrs |> ignore
- ilTypeDef.SecurityDecls |> ignore
-
- ilTypeDef.Methods.AsArray
- |> Array.iter (fun ilMethodDef ->
- ilMethodDef.CustomAttrs |> ignore
- ilMethodDef.SecurityDecls |> ignore
- )
-
- ilTypeDef.Fields.AsList
- |> List.iter (fun ilFieldDef ->
- ilFieldDef.CustomAttrs |> ignore
- )
-
- ilTypeDef.Properties.AsList
- |> List.iter (fun ilPropertyDef ->
- ilPropertyDef.CustomAttrs |> ignore
- )
- )
- )
-
- []
- member __.ILReadingSetup() =
- // With caching, performance increases an order of magnitude when re-reading an ILModuleReader.
- // Clear it for benchmarking.
- ClearAllILModuleReaderCache()
-
- member val TypeCheckFileWith100ReferencedProjectsOptions =
- createProject "MainProject"
- [ for i = 1 to 100 do
- yield
- createProject ("ReferencedProject" + string i) []
- ]
-
- member this.TypeCheckFileWith100ReferencedProjectsRun() =
- let options = this.TypeCheckFileWith100ReferencedProjectsOptions
- let file = options.SourceFiles.[0]
-
- match checkerOpt with
- | None -> failwith "no checker"
- | Some checker ->
- let parseResult, checkResult =
- checker.ParseAndCheckFileInProject(file, 0, SourceText.ofString (File.ReadAllText(file)), options)
- |> Async.RunSynchronously
-
- if parseResult.Errors.Length > 0 then
- failwithf "%A" parseResult.Errors
-
- match checkResult with
- | FSharpCheckFileAnswer.Aborted -> failwith "aborted"
- | FSharpCheckFileAnswer.Succeeded checkFileResult ->
-
- if checkFileResult.Errors.Length > 0 then
- failwithf "%A" checkFileResult.Errors
-
- []
- member this.TypeCheckFileWith100ReferencedProjectsSetup() =
- this.TypeCheckFileWith100ReferencedProjectsOptions.SourceFiles
- |> Seq.iter (fun file ->
- File.WriteAllText(file, generateSourceCode (Path.GetFileNameWithoutExtension(file)))
- )
-
- this.TypeCheckFileWith100ReferencedProjectsOptions.ReferencedProjects
- |> Seq.iter (fun (_, referencedProjectOptions) ->
- referencedProjectOptions.SourceFiles
- |> Seq.iter (fun file ->
- File.WriteAllText(file, generateSourceCode (Path.GetFileNameWithoutExtension(file)))
- )
- )
-
- this.TypeCheckFileWith100ReferencedProjectsRun()
-
- []
- member this.TypeCheckFileWith100ReferencedProjects() =
- // Because the checker's projectcachesize is set to 200, this should be fast.
- // If set to 3, it will be almost as slow as re-evaluating all project and it's projects references on setup; this could be a bug or not what we want.
- this.TypeCheckFileWith100ReferencedProjectsRun()
-
- []
- member this.TypeCheckFileWith100ReferencedProjectsCleanup() =
- this.TypeCheckFileWith100ReferencedProjectsOptions.SourceFiles
- |> Seq.iter (fun file ->
- try File.Delete(file) with | _ -> ()
- )
-
- this.TypeCheckFileWith100ReferencedProjectsOptions.ReferencedProjects
- |> Seq.iter (fun (_, referencedProjectOptions) ->
- referencedProjectOptions.SourceFiles
- |> Seq.iter (fun file ->
- try File.Delete(file) with | _ -> ()
- )
- )
-
- match checkerOpt with
- | None -> failwith "no checker"
- | Some(checker) ->
- checker.InvalidateAll()
- checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()
- ClearAllILModuleReaderCache()
-
-[]
-let main argv =
- let _ = BenchmarkRunner.Run()
- 0
diff --git a/clean.sh b/clean.sh
deleted file mode 100755
index 4698bb1666..0000000000
--- a/clean.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /usr/bin/env bash
-
-DEAD_DIRS=(
- "azure-pipelines.yml"
- "DEVGUIDE.md"
- "eng/common"
- "eng/common/templates"
- "eng/common/tools.ps1"
- "FSharp.sln"
- "setup/"
- "src/fsharp/fsc/fsc.fsproj"
- "src/fsharp/FSharp.Build"
- "src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec"
- "src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj"
- "src/fsharp/fsi/xlf"
- "src/fsharp/fsi/fsi.fsproj"
- "src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj"
- "src/fsharp/Interactive.DependencyManager/xlf"
- "src/fsharp/Microsoft.DotNet.DependencyManager/xlf"
- "src/fsharp/xlf"
- "TESTGUIDE.md"
- "tests/EndToEndBuildTests"
- "tests/FSharp.Build.UnitTests"
- "tests/FSharp.Compiler.ComponentTests"
- "tests/FSharp.Compiler.Private.Scripting.UnitTests"
- "tests/FSharp.Compiler.UnitTests"
- "tests/FSharp.Core.UnitTests"
- "tests/FSharp.Test.Utilities"
- "tests/fsharp/*.fs"
- "tests/fsharp/Compiler"
- "tests/fsharp/conformance"
- "tests/fsharp/core"
- "tests/fsharp/FSharpSuite.Tests.fsproj"
- "tests/fsharp/regression"
- "tests/fsharp/SDKTests"
- "tests/fsharp/test-framework.fs"
- "tests/fsharp/tests.fs"
- "tests/fsharp/typecheck"
- "tests/fsharp/typeProviders"
- "tests/fsharpqa"
- "tests/scripts"
- "VisualFSharp.sln"
- "vsintegration"
-)
-
-git rm -rf --ignore-unmatch ${DEAD_DIRS[*]}
\ No newline at end of file
diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico
new file mode 100644
index 0000000000..1b43557a9d
Binary files /dev/null and b/docs/img/favicon.ico differ
diff --git a/docs/img/logo.png b/docs/img/logo.png
new file mode 100644
index 0000000000..f98449050b
Binary files /dev/null and b/docs/img/logo.png differ
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000000..6277bee79f
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,29 @@
+
+# F# Core Library Documentation
+
+This site contains the documentation for the FSharp.Compiler.Service library used in all F# code.
+
+FSharp.Compiler.Service contains functionality for basic F# definitions, operations for collections such as lists, maps and sequences,
+and library functionality for quotations, reflections, events, asynchronous programming and native interoperability.
+
+The following namespaces are available:
+
+* [FSharp.Compiler.Service](reference/fsharp-core.html) - Basic definitions of options, functions, operators, results and formatting.
+
+* [FSharp.Collections](reference/fsharp-collections.html) - Operations for collections such as lists, arrays, sets, maps and sequences. See also [F# Collection Types](https://docs.microsoft.com/dotnet/fsharp/language-reference/fsharp-collection-types) in the F# Language Guide.
+
+* [FSharp.Control](reference/fsharp-control.html) - Library functionality for asynchronous programming, events and agents. See also [F# Asynchronous Programming](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows) in the F# Language Guide.
+
+* [FSharp.Linq](reference/fsharp-linq.html) - Library functionality for F# query syntax and interoperability with .NET Expressions. See also [F# Query Expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/query-expressions) in the F# Language Guide.
+
+* [FSharp.Quotations](reference/fsharp-quotations.html) - Library functionality for F# quotations. See also [F# Code Quotations](https://docs.microsoft.com/dotnet/fsharp/language-reference/code-quotations) in the F# Language Guide.
+
+* [FSharp.Reflection](reference/fsharp-reflection.html) - Library functionality for accessing additional information about F# types and F# values at runtime, augmenting that available through [System.Reflection](https://docs.microsoft.com/dotnet/api/system.reflection). See also [F# Reflection](https://en.wikibooks.org/wiki/F_Sharp_Programming/Reflection) in the F# Wiki Book.
+
+* [FSharp.NativeInterop](reference/fsharp-nativeinterop.html) - Basic functionality for native interopability. See also [F# External Functions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/functions/external-functions) in the F# Language Guide.
+
+* [FSharp.Compiler.Service.CompilerServices](reference/fsharp-core-compilerservices.html) - Library functionality for supporting type providers and code generated by the F# compiler. See also [F# Type Providers](https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/type-providers/) in the F# Language Guide.
+
+## Contributing to this documentation
+
+To contribute to this documentation site and its content, please see [the notes in the corresponding GitHub repository](https://github.com/fsharp/fsharp-core-docs).
diff --git a/dummyVersion.txt b/dummyVersion.txt
new file mode 100644
index 0000000000..d6b24041cf
--- /dev/null
+++ b/dummyVersion.txt
@@ -0,0 +1 @@
+19
diff --git a/eng/Build.ps1 b/eng/Build.ps1
deleted file mode 100644
index 630406eae9..0000000000
--- a/eng/Build.ps1
+++ /dev/null
@@ -1,545 +0,0 @@
-#
-# This script controls the F# build process. This encompasess everything from build, testing to
-# publishing of NuGet packages. The intent is to structure it to allow for a simple flow of logic
-# between the following phases:
-#
-# - restore
-# - build
-# - sign
-# - pack
-# - test
-# - publish
-#
-# Each of these phases has a separate command which can be executed independently. For instance
-# it's fine to call `build.ps1 -build -testDesktop` followed by repeated calls to
-# `.\build.ps1 -testDesktop`.
-
-[CmdletBinding(PositionalBinding=$false)]
-param (
- [string][Alias('c')]$configuration = "Debug",
- [string][Alias('v')]$verbosity = "m",
- [string]$msbuildEngine = "vs",
-
- # Actions
- [switch][Alias('r')]$restore,
- [switch]$noRestore,
- [switch][Alias('b')]$build,
- [switch]$rebuild,
- [switch]$sign,
- [switch]$noSign,
- [switch]$pack,
- [switch]$publish,
- [switch]$launch,
- [switch]$help,
-
- # Options
- [switch][Alias('proto')]$bootstrap,
- [string]$bootstrapConfiguration = "Proto",
- [string]$bootstrapTfm = "net472",
- [switch][Alias('bl')]$binaryLog,
- [switch][Alias('nobl')]$excludeCIBinaryLog,
- [switch]$ci,
- [switch]$official,
- [switch]$procdump,
- [switch]$deployExtensions,
- [switch]$prepareMachine,
- [switch]$useGlobalNuGetCache = $true,
- [switch]$warnAsError = $true,
- [switch][Alias('test')]$testDesktop,
- [switch]$testCoreClr,
- [switch]$testCambridge,
- [switch]$testCompiler,
- [switch]$testFSharpCore,
- [switch]$testFSharpQA,
- [switch]$testScripting,
- [switch]$testVs,
- [switch]$testAll,
- [string]$officialSkipTests = "false",
- [switch]$noVisualStudio,
-
- [parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
-
-Set-StrictMode -version 2.0
-$ErrorActionPreference = "Stop"
-$BuildCategory = ""
-$BuildMessage = ""
-
-function Print-Usage() {
- Write-Host "Common settings:"
- Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
- Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
- Write-Host " -deployExtensions Deploy built vsixes"
- Write-Host " -binaryLog Create MSBuild binary log (short: -bl)"
- Write-Host " -excludeCIBinaryLog When running on CI, allow no binary log (short: -nobl)"
- Write-Host ""
- Write-Host "Actions:"
- Write-Host " -restore Restore packages (short: -r)"
- Write-Host " -norestore Don't restore packages"
- Write-Host " -build Build main solution (short: -b)"
- Write-Host " -rebuild Rebuild main solution"
- Write-Host " -pack Build NuGet packages, VS insertion manifests and installer"
- Write-Host " -sign Sign our binaries"
- Write-Host " -publish Publish build artifacts (e.g. symbols)"
- Write-Host " -launch Launch Visual Studio in developer hive"
- Write-Host " -help Print help and exit"
- Write-Host ""
- Write-Host "Test actions"
- Write-Host " -testAll Run all tests"
- Write-Host " -testCambridge Run Cambridge tests"
- Write-Host " -testCompiler Run FSharpCompiler unit tests"
- Write-Host " -testDesktop Run tests against full .NET Framework"
- Write-Host " -testCoreClr Run tests against CoreCLR"
- Write-Host " -testFSharpCore Run FSharpCore unit tests"
- Write-Host " -testFSharpQA Run F# Cambridge tests"
- Write-Host " -testScripting Run Scripting tests"
- Write-Host " -testVs Run F# editor unit tests"
- Write-Host " -officialSkipTests Set to 'true' to skip running tests"
- Write-Host ""
- Write-Host "Advanced settings:"
- Write-Host " -ci Set when running on CI server"
- Write-Host " -official Set when building an official build"
- Write-Host " -bootstrap Build using a bootstrap compiler"
- Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
- Write-Host " -procdump Monitor test runs with procdump"
- Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
- Write-Host " -useGlobalNuGetCache Use global NuGet cache."
- Write-Host " -noVisualStudio Only build fsc and fsi as .NET Core applications. No Visual Studio required. '-configuration', '-verbosity', '-norestore', '-rebuild' are supported."
- Write-Host ""
- Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
-}
-
-# Process the command line arguments and establish defaults for the values which are not
-# specified.
-function Process-Arguments() {
- if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
- Print-Usage
- exit 0
- }
- $script:nodeReuse = $False;
-
- if ($testAll) {
- $script:testDesktop = $True
- $script:testCoreClr = $True
- $script:testFSharpQA = $True
- $script:testVs = $True
- }
-
- if ([System.Boolean]::Parse($script:officialSkipTests)) {
- $script:testAll = $False
- $script:testCambridge = $False
- $script:testCompiler = $False
- $script:testDesktop = $False
- $script:testCoreClr = $False
- $script:testFSharpCore = $False
- $script:testFSharpQA = $False
- $script:testVs = $False
- }
-
- if ($noRestore) {
- $script:restore = $False;
- }
-
- if ($noSign) {
- $script:sign = $False;
- }
-
- foreach ($property in $properties) {
- if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
- Write-Host "Invalid argument: $property"
- Print-Usage
- exit 1
- }
- }
-}
-
-function Update-Arguments() {
- if ($script:noVisualStudio) {
- $script:bootstrapTfm = "netcoreapp3.1"
- $script:msbuildEngine = "dotnet"
- }
-
- if ($bootstrapTfm -eq "netcoreapp3.1") {
- if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
- $script:bootstrap = $True
- }
- } else {
- if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.exe") -or (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
- $script:bootstrap = $True
- }
- }
-}
-
-function BuildSolution() {
- # VisualFSharp.sln can't be built with dotnet due to WPF, WinForms and VSIX build task dependencies
- $solution = "VisualFSharp.sln"
-
- Write-Host "$($solution):"
-
- if ($binaryLog -and $excludeCIBinaryLog) {
- Write-Host "Invalid argument -binarylog(-bl) and -excludeCIBinaryLog(-nobl) cannot be set at the same time"
- ExitWithExitCode 1
- }
- $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
-
- $projects = Join-Path $RepoRoot $solution
- $officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" }
- $toolsetBuildProj = InitializeToolset
- $quietRestore = !$ci
- $testTargetFrameworks = if ($testCoreClr) { "netcoreapp3.1" } else { "" }
-
- # Do not set the property to true explicitly, since that would override value projects might set.
- $suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
-
- MSBuild $toolsetBuildProj `
- $bl `
- /p:Configuration=$configuration `
- /p:Projects=$projects `
- /p:RepoRoot=$RepoRoot `
- /p:Restore=$restore `
- /p:Build=$build `
- /p:Rebuild=$rebuild `
- /p:Pack=$pack `
- /p:Sign=$sign `
- /p:Publish=$publish `
- /p:ContinuousIntegrationBuild=$ci `
- /p:OfficialBuildId=$officialBuildId `
- /p:QuietRestore=$quietRestore `
- /p:QuietRestoreBinaryLog=$binaryLog `
- /p:TestTargetFrameworks=$testTargetFrameworks `
- /v:$verbosity `
- $suppressExtensionDeployment `
- @properties
-}
-
-function TestAndAddToPath([string] $testPath) {
- if (Test-Path $testPath) {
- $env:PATH = "$testPath;$env:PATH"
- Write-Host "Added [$testPath] to the path."
- }
-}
-
-function UpdatePath() {
- # add highest framework dir
- $subdir = ""
- foreach ($child in Get-ChildItem "$env:WINDIR\Microsoft.NET\Framework\v4.0.?????") {
- $subdir = $child
- }
- TestAndAddToPath $subdir
-
- # add windows SDK dir for ildasm.exe
- foreach ($child in Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.* Tools") {
- $subdir = $child
- }
- TestAndAddToPath $subdir
-
- TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\net472"
- TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net472"
-}
-
-function VerifyAssemblyVersionsAndSymbols() {
- $assemblyVerCheckPath = Join-Path $ArtifactsDir "Bootstrap\AssemblyCheck\AssemblyCheck.dll"
-
- # Only verify versions on CI or official build
- if ($ci -or $official) {
- $dotnetPath = InitializeDotNetCli
- $dotnetExe = Join-Path $dotnetPath "dotnet.exe"
- Exec-Console $dotnetExe """$assemblyVerCheckPath"" ""$ArtifactsDir"""
- }
-}
-
-function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
- $dotnetPath = InitializeDotNetCli
- $dotnetExe = Join-Path $dotnetPath "dotnet.exe"
- $projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject)
- $testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
- $testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
- $args = "test $testProject -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
-
- if (-not $noVisualStudio -or $norestore) {
- $args += " --no-restore"
- }
-
- if (-not $noVisualStudio) {
- $args += " --no-build"
- }
-
- if ($env:RunningAsPullRequest -ne "true") {
- $args += " --filter TestCategory!=PullRequest"
- }
-
- Exec-Console $dotnetExe $args
-}
-
-function BuildCompiler() {
- if ($bootstrapTfm -eq "netcoreapp3.1") {
- $dotnetPath = InitializeDotNetCli
- $dotnetExe = Join-Path $dotnetPath "dotnet.exe"
- $fscProject = "$RepoRoot\src\fsharp\fsc\fsc.fsproj"
- $fsiProject = "$RepoRoot\src\fsharp\fsi\fsi.fsproj"
-
- $argNoRestore = if ($norestore) { " --no-restore" } else { "" }
- $argNoIncremental = if ($rebuild) { " --no-incremental" } else { "" }
-
- if ($binaryLog) {
- $logFilePath = Join-Path $LogDir "fscBootstrapLog.binlog"
- $args += " /bl:$logFilePath"
- }
- $args = "build $fscProject -c $configuration -v $verbosity -f netcoreapp3.1" + $argNoRestore + $argNoIncremental
- Exec-Console $dotnetExe $args
-
- if ($binaryLog) {
- $logFilePath = Join-Path $LogDir "fsiBootstrapLog.binlog"
- $args += " /bl:$logFilePath"
- }
- $args = "build $fsiProject -c $configuration -v $verbosity -f netcoreapp3.1" + $argNoRestore + $argNoIncremental
- Exec-Console $dotnetExe $args
- }
-}
-
-function Prepare-TempDir() {
- Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.props") $TempDir
- Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.targets") $TempDir
-}
-
-function DownloadDotnetFrameworkSdk() {
- $dlTempPath = [System.IO.Path]::GetTempPath()
- $dlRandomFile = [System.IO.Path]::GetRandomFileName()
- $net48Dir = Join-Path $dlTempPath $dlRandomFile
- Create-Directory $net48Dir
-
- $net48Exe = Join-Path $net48Dir "ndp48-devpack-enu.exe"
- $dlLogFilePath = Join-Path $LogDir "dotnet48.install.log"
- Invoke-WebRequest "https://go.microsoft.com/fwlink/?linkid=2088517" -OutFile $net48Exe
-
- Write-Host "Exec-Console $net48Exe /install /quiet /norestart /log $dlLogFilePath"
- Exec-Console $net48Exe "/install /quiet /norestart /log $dlLogFilePath"
-}
-
-function Test-IsAdmin {
- ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
-}
-
-function TryDownloadDotnetFrameworkSdk() {
- # If we are not running as admin user, don't bother grabbing ndp sdk -- since we don't need sn.exe
- $isAdmin = Test-IsAdmin
- Write-Host "TryDownloadDotnetFrameworkSdk -- Test-IsAdmin = '$isAdmin'"
- if ($isAdmin -eq $true)
- {
- # Get program files(x86) location
- if (${env:ProgramFiles(x86)} -eq $null) {
- $programFiles = $env:ProgramFiles
- }
- else {
- $programFiles = ${env:ProgramFiles(x86)}
- }
-
- # Get windowsSDK location for x86
- $windowsSDK_ExecutablePath_x86 = $env:WindowsSDK_ExecutablePath_x86
- $newWindowsSDK_ExecutablePath_x86 = Join-Path "$programFiles" "Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools"
-
- if ($windowsSDK_ExecutablePath_x86 -eq $null) {
- $snPathX86 = Join-Path $newWindowsSDK_ExecutablePath_x86 "sn.exe"
- }
- else {
- $snPathX86 = Join-Path $windowsSDK_ExecutablePath_x86 "sn.exe"
- $snPathX86Exists = Test-Path $snPathX86 -PathType Leaf
- if ($snPathX86Exists -ne $true) {
- $windowsSDK_ExecutablePath_x86 = null
- $snPathX86 = Join-Path $newWindowsSDK_ExecutablePath_x86 "sn.exe"
- }
- }
-
- $windowsSDK_ExecutablePath_x64 = $env:WindowsSDK_ExecutablePath_x64
- $newWindowsSDK_ExecutablePath_x64 = Join-Path "$programFiles" "Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"
-
- if ($windowsSDK_ExecutablePath_x64 -eq $null) {
- $snPathX64 = Join-Path $newWindowsSDK_ExecutablePath_x64 "sn.exe"
- }
- else {
- $snPathX64 = Join-Path $windowsSDK_ExecutablePath_x64 "sn.exe"
- $snPathX64Exists = Test-Path $snPathX64 -PathType Leaf
- if ($snPathX64Exists -ne $true) {
- $windowsSDK_ExecutablePath_x86 = null
- $snPathX64 = Join-Path $newWindowsSDK_ExecutablePath_x64 "sn.exe"
- }
- }
-
- $snPathX86Exists = Test-Path $snPathX86 -PathType Leaf
- Write-Host "pre-dl snPathX86Exists : $snPathX86Exists - '$snPathX86'"
- if ($snPathX86Exists -ne $true) {
- DownloadDotnetFrameworkSdk
- }
-
- $snPathX86Exists = Test-Path $snPathX86 -PathType Leaf
- if ($snPathX86Exists -eq $true) {
- if ($windowsSDK_ExecutablePath_x86 -ne $newWindowsSDK_ExecutablePath_x86) {
- $windowsSDK_ExecutablePath_x86 = $newWindowsSDK_ExecutablePath_x86
- # x86 environment variable
- Write-Host "set WindowsSDK_ExecutablePath_x86=$WindowsSDK_ExecutablePath_x86"
- [System.Environment]::SetEnvironmentVariable("WindowsSDK_ExecutablePath_x86","$newWindowsSDK_ExecutablePath_x86",[System.EnvironmentVariableTarget]::Machine)
- $env:WindowsSDK_ExecutablePath_x86 = $newWindowsSDK_ExecutablePath_x86
- }
- }
-
- # Also update environment variable for x64
- $snPathX64Exists = Test-Path $snPathX64 -PathType Leaf
- if ($snPathX64Exists -eq $true) {
- if ($windowsSDK_ExecutablePath_x64 -ne $newWindowsSDK_ExecutablePath_x64) {
- $windowsSDK_ExecutablePath_x64 = $newWindowsSDK_ExecutablePath_x64
- # x64 environment variable
- Write-Host "set WindowsSDK_ExecutablePath_x64=$WindowsSDK_ExecutablePath_x64"
- [System.Environment]::SetEnvironmentVariable("WindowsSDK_ExecutablePath_x64","$newWindowsSDK_ExecutablePath_x64",[System.EnvironmentVariableTarget]::Machine)
- $env:WindowsSDK_ExecutablePath_x64 = $newWindowsSDK_ExecutablePath_x64
- }
- }
- }
-}
-
-function EnablePreviewSdks() {
- if (Test-Path variable:global:_MSBuildExe) {
- return
- }
- $vsInfo = LocateVisualStudio
- if ($vsInfo -eq $null) {
- # Preview SDKs are allowed when no Visual Studio instance is installed
- return
- }
-
- $vsId = $vsInfo.instanceId
- $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
-
- $instanceDir = Join-Path ${env:USERPROFILE} "AppData\Local\Microsoft\VisualStudio\$vsMajorVersion.0_$vsId"
- Create-Directory $instanceDir
- $sdkFile = Join-Path $instanceDir "sdk.txt"
- 'UsePreviews=True' | Set-Content $sdkFile
-}
-
-try {
- $script:BuildCategory = "Build"
- $script:BuildMessage = "Failure preparing build"
-
- Process-Arguments
-
- . (Join-Path $PSScriptRoot "build-utils.ps1")
-
- Update-Arguments
-
- Push-Location $RepoRoot
-
- if ($ci) {
- Prepare-TempDir
- EnablePreviewSdks
- }
-
- $buildTool = InitializeBuildTool
- $toolsetBuildProj = InitializeToolset
- TryDownloadDotnetFrameworkSdk
- if ($bootstrap) {
- $script:BuildMessage = "Failure building bootstrap compiler"
- $bootstrapDir = Make-BootstrapBuild
- }
-
- $script:BuildMessage = "Failure building product"
- if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish) {
- if ($noVisualStudio) {
- BuildCompiler
- } else {
- BuildSolution
- }
- }
-
- if ($build) {
- VerifyAssemblyVersionsAndSymbols
- }
-
- $script:BuildCategory = "Test"
- $script:BuildMessage = "Failure running tests"
- $desktopTargetFramework = "net472"
- $coreclrTargetFramework = "netcoreapp3.1"
-
- if ($testDesktop -and -not $noVisualStudio) {
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
- }
-
- if ($testCoreClr) {
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
- }
-
- if ($testFSharpQA -and -not $noVisualStudio) {
- Push-Location "$RepoRoot\tests\fsharpqa\source"
- $nugetPackages = Get-PackagesDir
- $resultsRoot = "$ArtifactsDir\TestResults\$configuration"
- $resultsLog = "test-net40-fsharpqa-results.log"
- $errorLog = "test-net40-fsharpqa-errors.log"
- $failLog = "test-net40-fsharpqa-errors"
- $perlPackageRoot = "$nugetPackages\StrawberryPerl\5.28.0.1";
- $perlExe = "$perlPackageRoot\bin\perl.exe"
- Create-Directory $resultsRoot
- UpdatePath
- $env:HOSTED_COMPILER = 1
- $env:CSC_PIPE = "$nugetPackages\Microsoft.Net.Compilers\2.7.0\tools\csc.exe"
- $env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
- $env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
- $env:OSARCH = $env:PROCESSOR_ARCHITECTURE
- $env:PERL5LIB = "$perlPackageRoot\vendor\lib"
- Exec-Console $perlExe """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
- Pop-Location
- }
-
- if ($testFSharpCore) {
- if (-not $noVisualStudio) {
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- }
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- }
-
- if ($testCompiler) {
- if (-not $noVisualStudio) {
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- }
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- }
-
- if ($testCambridge) {
- if (-not $noVisualStudio) {
- TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
- }
- TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
- }
-
- if ($testScripting) {
- if (-not $noVisualStudio) {
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- }
- TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
- }
-
- if ($testVs -and -not $noVisualStudio) {
- TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\GetTypesVS.UnitTests\GetTypesVS.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework
- }
-
- ExitWithExitCode 0
-}
-catch {
- Write-Host $_
- Write-Host $_.Exception
- Write-Host $_.ScriptStackTrace
- Write-PipelineTelemetryError -Category $script:BuildCategory -Message $script:BuildMessage
- ExitWithExitCode 1
-}
-finally {
- Pop-Location
-}
diff --git a/eng/CIBuild.cmd b/eng/CIBuild.cmd
deleted file mode 100644
index 84640d7efc..0000000000
--- a/eng/CIBuild.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\Build.ps1" -ci -restore -build -bootstrap -pack -sign -publish -binaryLog %*
diff --git a/eng/DumpPackageRoot/DumpPackageRoot.csproj b/eng/DumpPackageRoot/DumpPackageRoot.csproj
deleted file mode 100644
index c3b2cedf8f..0000000000
--- a/eng/DumpPackageRoot/DumpPackageRoot.csproj
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- netcoreapp3.1
-
-
-
-
-
-
-
-
- $(ArtifactsDir)NugetPackageRootContents
- $(PackageRootArtifactDirectory)/package_contents.txt
-
-
-
-
-
diff --git a/eng/Signing.props b/eng/Signing.props
deleted file mode 100644
index da17d32fa4..0000000000
--- a/eng/Signing.props
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
deleted file mode 100644
index 0d23aab716..0000000000
--- a/eng/Version.Details.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
- https://github.com/dotnet/arcade
- f6192d1e284a08ac05041d05fa6e60dec74b24f5
-
-
-
diff --git a/eng/Versions.props b/eng/Versions.props
deleted file mode 100644
index 8b4df92674..0000000000
--- a/eng/Versions.props
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
- false
-
- true
- true
- true
- true
- true
-
-
-
- beta
- 5.0
- $(FSLanguageVersion)
- $(FSCoreMajorVersion).0
- $(FSCoreMajorVersion).0
- $(FSCoreVersionPrefix).0
-
- 4.7.2
-
- $(FSCorePackageVersion)-$(PreReleaseVersionLabel).*
-
-
- 11.0
- $(FSPackageMajorVersion).0
- $(FSPackageVersion)
- $(FSPackageVersion).0
-
-
- 16
- 7
- $(VSMajorVersion).0
- $(VSMajorVersion).$(VSMinorVersion).0
- $(VSAssemblyVersionPrefix).0
-
-
-
- $(FSCoreVersionPrefix)
- $(FSCorePackageVersion)
- $(FSProductVersionPrefix)
- $(VSAssemblyVersionPrefix)
- $(VersionPrefix).0
-
-
-
-
-
- $(RestoreSources);
- https://www.myget.org/F/fsharp-daily/api/v3/index.json;
- https://dotnet.myget.org/F/roslyn-master-nightly/api/v3/index.json;
- https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
- https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json;
- https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
- https://api.nuget.org/v3/index.json;
- https://dotnet.myget.org/F/roslyn/api/v3/index.json;
- https://dotnet.myget.org/F/symreader-converter/api/v3/index.json;
- https://dotnet.myget.org/F/interactive-window/api/v3/index.json;
- https://myget.org/F/vs-devcore/api/v3/index.json;
- https://myget.org/F/vs-editor/api/v3/index.json;
- https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json;
- https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json;
- https://myget.org/F/roslyn_concord/api/v3/index.json;
-
-
- $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\RoslynPackageVersion.txt').Trim())
-
- 1.5.0
- 4.3.0
- 4.3.0
- 4.0.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.5.3
- 4.3.0
- 4.3.0
- 4.3.0
- 1.6.0
- 4.3.0
- 1.5.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.3.0
- 4.11.0
- 4.3.0
- 4.3.0
- 4.5.0
- 4.5.0
- 4.5.3
-
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
- $(RoslynVersion)
- 2.0.17
- $(RoslynVersion)
-
- 16.6
- $(MicrosoftBuildOverallPackagesVersion)
- $(MicrosoftBuildOverallPackagesVersion)
- $(MicrosoftBuildOverallPackagesVersion)
- $(MicrosoftBuildOverallPackagesVersion)
-
- 8.0.1
- 14.0.25420
- 16.1.89
- 16.1.89
- 1.1.4322
- 16.1.89
- 16.1.89
- 16.0.28226-alpha
- 16.1.28916.169
- 16.1.28917.181
- 16.1.89
- 16.1.89
- 16.1.89
- 8.0.50728
- 7.10.6071
- 16.1.28917.181
- 16.1.89
- 8.0.50728
- 16.0.201-pre-g7d366164d0
- 2.3.6152103
- 14.3.25407
- 16.1.28917.181
- 16.1.28917.181
- 16.1.28917.181
- 10.0.30319
- 11.0.50727
- 15.0.25123-Dev15Preview
- 7.10.6072
- 8.0.50728
- 9.0.30730
- 10.0.30320
- 11.0.61031
- 12.0.30111
- 16.0.0
- 16.1.89
- 16.1.89
- 7.10.6071
- 8.0.50728
- 10.0.30320
- 12.0.30112
- 16.1.89
- 16.1.89
- 16.0.102
- 16.1.28917.181
- 15.3.58
- 9.0.30729
- 16.5.2044
- 12.0.4
- 7.0.4
- 8.0.4
- 11.0.4
- 7.0.4
-
- 0.2.0
- 1.0.0
- 1.0.147
-
- 3.0.0-alpha4
- 4.3.0.0
- 1.0.30
- 8.0.0-alpha
- 2.7.0
- 3.1.0
- 3.0.0-preview-27318-01
- 3.0.0-preview-27318-01
- 16.6.1
- 4.3.0
- 9.0.1
- 3.11.0
- 3.11.2
- 3.11.0
- 2.1.41
- 1.0.0-beta2-dev3
- 5.28.0.1
- 2.0.187
- 2.4.1
- 5.10.3
-
-
diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1
deleted file mode 100644
index dd812ea797..0000000000
--- a/eng/build-utils.ps1
+++ /dev/null
@@ -1,274 +0,0 @@
-# Collection of powershell build utility functions that we use across our scripts.
-
-Set-StrictMode -version 2.0
-$ErrorActionPreference="Stop"
-
-# Import Arcade functions
-. (Join-Path $PSScriptRoot "common\tools.ps1")
-
-$VSSetupDir = Join-Path $ArtifactsDir "VSSetup\$configuration"
-$PackagesDir = Join-Path $ArtifactsDir "packages\$configuration"
-
-$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $false }
-$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { $false }
-$bootstrapDir = if (Test-Path variable:bootstrapDir) { $bootstrapDir } else { "" }
-$bootstrapConfiguration = if (Test-Path variable:bootstrapConfiguration) { $bootstrapConfiguration } else { "Proto" }
-$bootstrapTfm = if (Test-Path variable:bootstrapTfm) { $bootstrapTfm } else { "net472" }
-$properties = if (Test-Path variable:properties) { $properties } else { @() }
-
-function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [string]$configuration = $script:configuration, [string]$tfm = "net472", [string]$rid = "", [bool]$published = $false) {
- $projectName = if ($projectName -ne "") { $projectName } else { [System.IO.Path]::GetFileNameWithoutExtension($fileName) }
- $publishDir = if ($published) { "publish\" } else { "" }
- $ridDir = if ($rid -ne "") { "$rid\" } else { "" }
- return Join-Path $ArtifactsDir "bin\$projectName\$configuration\$tfm\$ridDir$publishDir$fileName"
-}
-
-# Handy function for executing a command in powershell and throwing if it
-# fails.
-#
-# Use this when the full command is known at script authoring time and
-# doesn't require any dynamic argument build up. Example:
-#
-# Exec-Block { & $msbuild Test.proj }
-#
-# Original sample came from: http://jameskovacs.com/2010/02/25/the-exec-problem/
-function Exec-Block([scriptblock]$cmd) {
- & $cmd
-
- # Need to check both of these cases for errors as they represent different items
- # - $?: did the powershell script block throw an error
- # - $lastexitcode: did a windows command executed by the script block end in error
- if ((-not $?) -or ($lastexitcode -ne 0)) {
- throw "Command failed to execute: $cmd"
- }
-}
-
-function Exec-CommandCore([string]$command, [string]$commandArgs, [switch]$useConsole = $true) {
- if ($useConsole) {
- $exitCode = Exec-Process $command $commandArgs
- if ($exitCode -ne 0) {
- throw "Command failed to execute with exit code $($exitCode): $command $commandArgs"
- }
- return
- }
-
- $startInfo = New-Object System.Diagnostics.ProcessStartInfo
- $startInfo.FileName = $command
- $startInfo.Arguments = $commandArgs
-
- $startInfo.UseShellExecute = $false
- $startInfo.WorkingDirectory = Get-Location
- $startInfo.RedirectStandardOutput = $true
- $startInfo.CreateNoWindow = $true
-
- $process = New-Object System.Diagnostics.Process
- $process.StartInfo = $startInfo
- $process.Start() | Out-Null
-
- $finished = $false
- try {
- # The OutputDataReceived event doesn't fire as events are sent by the
- # process in powershell. Possibly due to subtlties of how Powershell
- # manages the thread pool that I'm not aware of. Using blocking
- # reading here as an alternative which is fine since this blocks
- # on completion already.
- $out = $process.StandardOutput
- while (-not $out.EndOfStream) {
- $line = $out.ReadLine()
- Write-Output $line
- }
-
- while (-not $process.WaitForExit(100)) {
- # Non-blocking loop done to allow ctr-c interrupts
- }
-
- $finished = $true
- if ($process.ExitCode -ne 0) {
- throw "Command failed to execute with exit code $($process.ExitCode): $command $commandArgs"
- }
- }
- finally {
- # If we didn't finish then an error occured or the user hit ctrl-c. Either
- # way kill the process
- if (-not $finished) {
- $process.Kill()
- }
- }
-}
-
-# Handy function for executing a windows command which needs to go through
-# windows command line parsing.
-#
-# Use this when the command arguments are stored in a variable. Particularly
-# when the variable needs reparsing by the windows command line. Example:
-#
-# $args = "/p:ManualBuild=true Test.proj"
-# Exec-Command $msbuild $args
-#
-function Exec-Command([string]$command, [string]$commandArgs) {
- Exec-CommandCore -command $command -commandArgs $commandargs -useConsole:$false
-}
-
-# Functions exactly like Exec-Command but lets the process re-use the current
-# console. This means items like colored output will function correctly.
-#
-# In general this command should be used in place of
-# Exec-Command $msbuild $args | Out-Host
-#
-function Exec-Console([string]$command, [string]$commandArgs) {
- Exec-CommandCore -command $command -commandArgs $commandargs -useConsole:$true
-}
-
-# Handy function for executing a powershell script in a clean environment with
-# arguments. Prefer this over & sourcing a script as it will both use a clean
-# environment and do proper error checking
-function Exec-Script([string]$script, [string]$scriptArgs = "") {
- Exec-Command "powershell" "-noprofile -executionPolicy RemoteSigned -file `"$script`" $scriptArgs"
-}
-
-# Ensure the proper .NET Core SDK is available. Returns the location to the dotnet.exe.
-function Ensure-DotnetSdk() {
- return Join-Path (InitializeDotNetCli -install:$true) "dotnet.exe"
-}
-
-function Get-VersionCore([string]$name, [string]$versionFile) {
- $name = $name.Replace(".", "")
- $name = $name.Replace("-", "")
- $nodeName = "$($name)Version"
- $x = [xml](Get-Content -raw $versionFile)
- $node = $x.SelectSingleNode("//Project/PropertyGroup/$nodeName")
- if ($node -ne $null) {
- return $node.InnerText
- }
-
- throw "Cannot find package $name in $versionFile"
-
-}
-
-# Return the version of the NuGet package as used in this repo
-function Get-PackageVersion([string]$name) {
- return Get-VersionCore $name (Join-Path $EngRoot "Versions.props")
-}
-
-# Locate the directory where our NuGet packages will be deployed. Needs to be kept in sync
-# with the logic in Version.props
-function Get-PackagesDir() {
- $d = $null
- if ($env:NUGET_PACKAGES -ne $null) {
- $d = $env:NUGET_PACKAGES
- }
- else {
- $d = Join-Path $env:UserProfile ".nuget\packages\"
- }
-
- Create-Directory $d
- return $d
-}
-
-# Locate the directory of a specific NuGet package which is restored via our main
-# toolset values.
-function Get-PackageDir([string]$name, [string]$version = "") {
- if ($version -eq "") {
- $version = Get-PackageVersion $name
- }
-
- $p = Get-PackagesDir
- $p = Join-Path $p $name.ToLowerInvariant()
- $p = Join-Path $p $version
- return $p
-}
-
-function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]$logFileName = "", [switch]$parallel = $true, [switch]$summary = $true, [switch]$warnAsError = $true, [string]$configuration = $script:configuration, [string]$verbosity = $script:verbosity) {
- # Because we override the C#/VB toolset to build against our LKG package, it is important
- # that we do not reuse MSBuild nodes from other jobs/builds on the machine. Otherwise,
- # we'll run into issues such as https://github.com/dotnet/roslyn/issues/6211.
- # MSBuildAdditionalCommandLineArgs=
- $args = "/p:TreatWarningsAsErrors=true /nologo /nodeReuse:false /p:Configuration=$configuration ";
-
- if ($warnAsError) {
- $args += " /warnaserror"
- }
-
- if ($summary) {
- $args += " /consoleloggerparameters:Verbosity=minimal;summary"
- } else {
- $args += " /consoleloggerparameters:Verbosity=minimal"
- }
-
- if ($parallel) {
- $args += " /m"
- }
-
- if ($binaryLog) {
- if ($logFileName -eq "") {
- $logFileName = [IO.Path]::GetFileNameWithoutExtension($projectFilePath)
- }
- $logFileName = [IO.Path]::ChangeExtension($logFileName, ".binlog")
- $logFilePath = Join-Path $LogDir $logFileName
- $args += " /bl:$logFilePath"
- }
-
- if ($official) {
- $args += " /p:OfficialBuildId=" + $env:BUILD_BUILDNUMBER
- }
-
- if ($ci) {
- $args += " /p:ContinuousIntegrationBuild=true"
- }
-
- $args += " $buildArgs"
- $args += " $projectFilePath"
- $args += " $properties"
-
- $buildTool = InitializeBuildTool
- Exec-Console $buildTool.Path "$($buildTool.Command) $args"
-}
-
-# Create a bootstrap build of the compiler. Returns the directory where the bootstrap build
-# is located.
-#
-# Important to not set $script:bootstrapDir here yet as we're actually in the process of
-# building the bootstrap.
-function Make-BootstrapBuild() {
- Write-Host "Building bootstrap '$bootstrapTfm' compiler"
-
- $dir = Join-Path $ArtifactsDir "Bootstrap"
- Remove-Item -re $dir -ErrorAction SilentlyContinue
- Create-Directory $dir
-
- # prepare FsLex and Fsyacc and AssemblyCheck
- $dotnetPath = InitializeDotNetCli
- $dotnetExe = Join-Path $dotnetPath "dotnet.exe"
- $buildToolsProject = "$RepoRoot\src\buildtools\buildtools.proj"
-
- $argNoRestore = if ($norestore) { " --no-restore" } else { "" }
- $argNoIncremental = if ($rebuild) { " --no-incremental" } else { "" }
-
- $args = "build $buildToolsProject -c $bootstrapConfiguration -v $verbosity -f netcoreapp3.1" + $argNoRestore + $argNoIncremental
- if ($binaryLog) {
- $logFilePath = Join-Path $LogDir "toolsBootstrapLog.binlog"
- $args += " /bl:$logFilePath"
- }
- Exec-Console $dotnetExe $args
-
- Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp3.1" -Destination "$dir\fslex" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp3.1" -Destination "$dir\fsyacc" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\netcoreapp3.1" -Destination "$dir\AssemblyCheck" -Force -Recurse
-
- # prepare compiler
- $protoProject = "$RepoRoot\proto.proj"
- $args = "build $protoProject -c $bootstrapConfiguration -v $verbosity -f $bootstrapTfm" + $argNoRestore + $argNoIncremental
- if ($binaryLog) {
- $logFilePath = Join-Path $LogDir "protoBootstrapLog.binlog"
- $args += " /bl:$logFilePath"
- }
- Exec-Console $dotnetExe $args
-
- Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm" -Destination "$dir\fsc" -Force -Recurse
- Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm" -Destination "$dir\fsi" -Force -Recurse
-
- return $dir
-}
-
-
-
diff --git a/eng/build.sh b/eng/build.sh
deleted file mode 100755
index 5ec449d1cc..0000000000
--- a/eng/build.sh
+++ /dev/null
@@ -1,304 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-# Stop script if unbound variable found (use ${var:-} if intentional)
-set -u
-
-usage()
-{
- echo "Common settings:"
- echo " --configuration Build configuration: 'Debug' or 'Release' (short: -c)"
- echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
- echo " --binaryLog Create MSBuild binary log (short: -bl)"
- echo ""
- echo "Actions:"
- echo " --bootstrap Force the build of the bootstrap compiler"
- echo " --restore Restore projects required to build (short: -r)"
- echo " --norestore Don't restore projects required to build"
- echo " --build Build all projects (short: -b)"
- echo " --rebuild Rebuild all projects"
- echo " --pack Build nuget packages"
- echo " --publish Publish build artifacts"
- echo " --help Print help and exit"
- echo ""
- echo "Test actions:"
- echo " --testcoreclr Run unit tests on .NET Core (short: --test, -t)"
- echo ""
- echo "Advanced settings:"
- echo " --ci Building in CI"
- echo " --docker Run in a docker container if applicable"
- echo " --skipAnalyzers Do not run analyzers during build operations"
- echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
- echo ""
- echo "Command line arguments starting with '/p:' are passed through to MSBuild."
-}
-
-source="${BASH_SOURCE[0]}"
-
-# resolve $source until the file is no longer a symlink
-while [[ -h "$source" ]]; do
- scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
- source="$(readlink "$source")"
- # if $source was a relative symlink, we need to resolve it relative to the path where the
- # symlink file was located
- [[ $source != /* ]] && source="$scriptroot/$source"
-done
-scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
-
-restore=false
-build=false
-rebuild=false
-pack=false
-publish=false
-test_core_clr=false
-
-configuration="Debug"
-verbosity='minimal'
-binary_log=false
-force_bootstrap=false
-ci=false
-skip_analyzers=false
-prepare_machine=false
-source_build=false
-properties=""
-
-docker=false
-args=""
-
-BuildCategory=""
-BuildMessage=""
-
-if [[ $# = 0 ]]
-then
- usage
- exit 1
-fi
-
-while [[ $# > 0 ]]; do
- opt="$(echo "$1" | awk '{print tolower($0)}')"
- case "$opt" in
- --help|-h)
- usage
- exit 0
- ;;
- --configuration|-c)
- configuration=$2
- args="$args $1"
- shift
- ;;
- --verbosity|-v)
- verbosity=$2
- args="$args $1"
- shift
- ;;
- --binarylog|-bl)
- binary_log=true
- ;;
- --bootstrap)
- force_bootstrap=true
- ;;
- --restore|-r)
- restore=true
- ;;
- --norestore)
- restore=false
- ;;
- --build|-b)
- build=true
- ;;
- --rebuild)
- rebuild=true
- ;;
- --pack)
- pack=true
- ;;
- --publish)
- publish=true
- ;;
- --testcoreclr|--test|-t)
- test_core_clr=true
- ;;
- --ci)
- ci=true
- ;;
- --skipanalyzers)
- skip_analyzers=true
- ;;
- --preparemachine)
- prepare_machine=true
- ;;
- --docker)
- docker=true
- shift
- continue
- ;;
- /p:*)
- properties="$properties $1"
- if [[ "$1" == "/p:dotnetbuildfromsource=true" ]]; then
- source_build=true
- fi
- ;;
- *)
- echo "Invalid argument: $1"
- usage
- exit 1
- ;;
- esac
- args="$args $1"
- shift
-done
-
-# Import Arcade functions
-. "$scriptroot/common/tools.sh"
-
-function TestUsingNUnit() {
- BuildCategory="Test"
- BuildMessage="Error running tests"
- testproject=""
- targetframework=""
- while [[ $# > 0 ]]; do
- opt="$(echo "$1" | awk '{print tolower($0)}')"
- case "$opt" in
- --testproject)
- testproject=$2
- shift
- ;;
- --targetframework)
- targetframework=$2
- shift
- ;;
- *)
- echo "Invalid argument: $1"
- exit 1
- ;;
- esac
- shift
- done
-
- if [[ "$testproject" == "" || "$targetframework" == "" ]]; then
- echo "--testproject and --targetframework must be specified"
- exit 1
- fi
-
- filterArgs=""
- if [[ "${RunningAsPullRequest:-}" != "true" ]]; then
- filterArgs=" --filter TestCategory!=PullRequest"
- fi
-
- projectname=$(basename -- "$testproject")
- projectname="${projectname%.*}"
- testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
- args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\"$filterArgs"
- "$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
-}
-
-function BuildSolution {
- BuildCategory="Build"
- BuildMessage="Error preparing build"
- local solution="FSharp.sln"
- echo "$solution:"
-
- InitializeToolset
- local toolset_build_proj=$_InitializeToolset
-
- local bl=""
- if [[ "$binary_log" = true ]]; then
- bl="/bl:\"$log_dir/Build.binlog\""
- fi
-
- local projects="$repo_root/$solution"
-
- # https://github.com/dotnet/roslyn/issues/23736
- local enable_analyzers=!$skip_analyzers
- UNAME="$(uname)"
- if [[ "$UNAME" == "Darwin" ]]; then
- enable_analyzers=false
- fi
-
- # NuGet often exceeds the limit of open files on Mac and Linux
- # https://github.com/NuGet/Home/issues/2163
- if [[ "$UNAME" == "Darwin" || "$UNAME" == "Linux" ]]; then
- ulimit -n 6500
- fi
-
- local quiet_restore=""
- if [[ "$ci" != true ]]; then
- quiet_restore=true
- fi
-
- # Node reuse fails because multiple different versions of FSharp.Build.dll get loaded into MSBuild nodes
- node_reuse=false
-
- # build bootstrap tools
- bootstrap_config=Proto
- bootstrap_dir=$artifacts_dir/Bootstrap
- if [[ "$force_bootstrap" == true ]]; then
- rm -fr $bootstrap_dir
- fi
- if [ ! -f "$bootstrap_dir/fslex.dll" ]; then
- BuildMessage="Error building tools"
- MSBuild "$repo_root/src/buildtools/buildtools.proj" \
- /restore \
- /p:Configuration=$bootstrap_config \
- /t:Publish
-
- mkdir -p "$bootstrap_dir"
- cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/netcoreapp3.1/publish $bootstrap_dir/fslex
- cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/netcoreapp3.1/publish $bootstrap_dir/fsyacc
- fi
- if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
- BuildMessage="Error building bootstrap"
- MSBuild "$repo_root/proto.proj" \
- /restore \
- /p:Configuration=$bootstrap_config \
- /t:Publish
-
- cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/netcoreapp3.1/publish $bootstrap_dir/fsc
- fi
-
- # do real build
- BuildMessage="Error building solution"
- MSBuild $toolset_build_proj \
- $bl \
- /v:$verbosity \
- /p:Configuration=$configuration \
- /p:Projects="$projects" \
- /p:RepoRoot="$repo_root" \
- /p:Restore=$restore \
- /p:Build=$build \
- /p:Rebuild=$rebuild \
- /p:Pack=$pack \
- /p:Publish=$publish \
- /p:UseRoslynAnalyzers=$enable_analyzers \
- /p:ContinuousIntegrationBuild=$ci \
- /p:QuietRestore=$quiet_restore \
- /p:QuietRestoreBinaryLog="$binary_log" \
- $properties
-}
-
-function TrapAndReportError {
- local exit_code=$?
- if [[ ! $exit_code == 0 ]]; then
- Write-PipelineTelemetryError -category $BuildCategory "$BuildMessage (exit code '$exit_code')."
- ExitWithExitCode $exit_code
- fi
-}
-
-# allow early termination to report the appropriate build failure reason
-trap TrapAndReportError EXIT
-
-InitializeDotNetCli $restore
-
-BuildSolution
-
-if [[ "$test_core_clr" == true ]]; then
- coreclrtestframework=netcoreapp3.1
- TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework
- TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework
- TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
- TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
- TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework $coreclrtestframework
-fi
-
-ExitWithExitCode 0
diff --git a/eng/cibuild.sh b/eng/cibuild.sh
deleted file mode 100755
index 290f7ebaa5..0000000000
--- a/eng/cibuild.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-source="${BASH_SOURCE[0]}"
-
-# resolve $SOURCE until the file is no longer a symlink
-while [[ -h $source ]]; do
- scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
- source="$(readlink "$source")"
-
- # if $source was a relative symlink, we need to resolve it relative to the path where
- # the symlink file was located
- [[ $source != /* ]] && source="$scriptroot/$source"
-done
-scriptroot="$( cd -P "$( dirname "$source" )" && pwd)"
-
-echo "Building this commit:"
-git show --no-patch --pretty=raw HEAD
-
-. "$scriptroot/build.sh" --ci --restore --build --pack --publish --binaryLog "$@"
diff --git a/eng/config/runtimeconfig.template.json b/eng/config/runtimeconfig.template.json
deleted file mode 100644
index a3075303ad..0000000000
--- a/eng/config/runtimeconfig.template.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "rollForwardOnNoCandidateFx": 2
-}
diff --git a/eng/release/insert-into-vs.yml b/eng/release/insert-into-vs.yml
deleted file mode 100644
index ad19e31d09..0000000000
--- a/eng/release/insert-into-vs.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-parameters:
- componentBranchName: ''
- insertBuildPolicy: 'Request Perf DDRITs'
- insertTargetBranch: ''
- insertTeamEmail: ''
- insertTeamName: ''
- dependsOn: [build]
-
-stages:
-- stage: insert
- dependsOn: build
- displayName: Insert into VS
- jobs:
- - job: Insert_VS
- pool:
- vmImage: vs2017-win2016
- variables:
- - group: DotNet-VSTS-Infra-Access
- - name: InsertAccessToken
- value: $(dn-bot-devdiv-build-rw-code-rw-release-rw)
- - name: InsertBuildPolicy
- value: ${{ parameters.insertBuildPolicy }}
- - name: InsertTargetBranch
- value: ${{ parameters.insertTargetBranch }}
- - name: InsertTeamEmail
- value: ${{ parameters.insertTeamEmail }}
- - name: InsertTeamName
- value: ${{ parameters.insertTeamName }}
- - name: InsertPayloadName
- value: '${{ parameters.insertTeamName }} $(Build.SourceBranchName) $(Build.BuildNumber)'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Insertion Artifacts
- inputs:
- buildType: current
- artifactName: VSSetup
- - task: PowerShell@2
- displayName: Get Publish URLs
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetPublishUrls.ps1
- arguments: -accessToken $(System.AccessToken) -buildId $(Build.BuildId) -insertionDir $(Build.ArtifactStagingDirectory)\VSSetup
- - task: PowerShell@2
- displayName: Get versions for default.config
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetDefaultConfigVersions.ps1
- arguments: -packagesDir $(Build.ArtifactStagingDirectory)\VSSetup\DevDivPackages
- - task: PowerShell@2
- displayName: Get versions for AssemblyVersions.tt
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/release/scripts/GetAssemblyVersions.ps1
- arguments: -assemblyVersionsPath $(Build.ArtifactStagingDirectory)\VSSetup\DevDivPackages\DependentAssemblyVersions.csv
- - task: ms-vseng.MicroBuildShipTasks.55100717-a81d-45ea-a363-b8fe3ec375ad.MicroBuildInsertVsPayload@3
- displayName: 'Insert VS Payload'
- inputs:
- LinkWorkItemsToPR: false
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], '${{ parameters.componentBranchName }}'))
diff --git a/eng/release/scripts/GetAssemblyVersions.ps1 b/eng/release/scripts/GetAssemblyVersions.ps1
deleted file mode 100644
index 2b75ac1dd5..0000000000
--- a/eng/release/scripts/GetAssemblyVersions.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-[CmdletBinding(PositionalBinding=$false)]
-param (
- [string]$assemblyVersionsPath
-)
-
-Set-StrictMode -version 2.0
-$ErrorActionPreference = "Stop"
-
-try {
- [string[]]$lines = Get-Content -Path $assemblyVersionsPath | ForEach-Object {
- $parts = $_ -Split ",",2
- $asm = $parts[0]
- $ver = $parts[1]
- $asmConst = ($asm -Replace "\.","") + "Version"
- $output = "$asmConst=$ver"
- $output
- }
-
- $final = $lines -Join ","
- Write-Host "Setting InsertVersionsValues to $final"
- Write-Host "##vso[task.setvariable variable=InsertVersionsValues]$final"
-}
-catch {
- Write-Host $_
- Write-Host $_.Exception
- Write-Host $_.ScriptStackTrace
- exit 1
-}
diff --git a/eng/release/scripts/GetDefaultConfigVersions.ps1 b/eng/release/scripts/GetDefaultConfigVersions.ps1
deleted file mode 100644
index d0f1f67fc5..0000000000
--- a/eng/release/scripts/GetDefaultConfigVersions.ps1
+++ /dev/null
@@ -1,29 +0,0 @@
-[CmdletBinding(PositionalBinding=$false)]
-param (
- [string]$packagesDir
-)
-
-Set-StrictMode -version 2.0
-$ErrorActionPreference = "Stop"
-
-try {
- $packages = @()
- $regex = "^(.*?)\.((?:\.?[0-9]+){3,}(?:[-a-z0-9]+)?)\.nupkg$"
- Get-Item -Path "$packagesDir\*" -Filter "*.nupkg" | ForEach-Object {
- $fileName = Split-Path $_ -Leaf
- If ($fileName -Match $regex) {
- $entry = $Matches[1] + "=" + $Matches[2]
- $packages += $entry
- }
- }
-
- $final = $packages -Join ","
- Write-Host "Setting InsertConfigValues to $final"
- Write-Host "##vso[task.setvariable variable=InsertConfigValues]$final"
-}
-catch {
- Write-Host $_
- Write-Host $_.Exception
- Write-Host $_.ScriptStackTrace
- exit 1
-}
diff --git a/eng/release/scripts/GetPublishUrls.ps1 b/eng/release/scripts/GetPublishUrls.ps1
deleted file mode 100644
index 897ef398f5..0000000000
--- a/eng/release/scripts/GetPublishUrls.ps1
+++ /dev/null
@@ -1,123 +0,0 @@
-[CmdletBinding(PositionalBinding=$false)]
-param (
- [string]$accessToken,
- [string]$buildId,
- [string]$insertionDir
-)
-
-Set-StrictMode -version 2.0
-$ErrorActionPreference = "Stop"
-
-$dropUrlRegex = "(https://vsdrop\.corp\.microsoft\.com/[^\r\n;]+);([^\r\n]+)\r?\n"
-
-function Invoke-WebRequestWithAccessToken([string] $uri, [string] $accessToken, [int] $retryCount = 5) {
- Write-Host "Fetching content from $uri"
- $base64 = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$accessToken"))
- $headers = @{
- Authorization = "Basic $base64"
- }
-
- for ($i = 0; $i -lt $retryCount; $i++) {
- try {
- return Invoke-WebRequest -Method Get -Uri $uri -Headers $headers -UseBasicParsing
- }
- catch {
- Write-Host "Invoke-WebRequest failed: $_"
- Start-Sleep -Seconds 1
- }
- }
-
- throw "Unable to fetch $uri after $retryCount tries."
-}
-
-# this function has to download ~500 individual logs and check each one; prone to timeouts
-function Get-ManifestsViaIndividualLogs([PSObject] $manifestVersionMap, [string] $buildId, [string] $accessToken) {
- $manifests = @()
- $seenManifests = @{}
- $json = Invoke-WebRequestWithAccessToken -uri "https://dev.azure.com/dnceng/internal/_apis/build/builds/$buildId/logs?api-version=5.1" -accessToken $accessToken | ConvertFrom-Json
- foreach ($l in $json.value) {
- $logUrl = $l.url
- $log = (Invoke-WebRequestWithAccessToken -uri $logUrl -accessToken $accessToken).Content
- If ($log -Match $dropUrlRegex) {
- $manifestShortUrl = $Matches[1]
- $manifestName = $Matches[2]
- $manifestUrl = "$manifestShortUrl;$manifestName"
- If (-Not $seenManifests.Contains($manifestUrl)) {
- $seenManifests.Add($manifestUrl, $true)
- $buildVersion = $manifestVersionMap[$manifestName]
- $manifestEntry = "$manifestName{$buildVersion}=$manifestUrl"
- $manifests += $manifestEntry
- }
- }
- }
-
- return $manifests
-}
-
-# this function only has to download 1 file and look at a very specific file
-function Get-ManifestsViaZipLog([PSObject] $manifestVersionMap, [string] $buildId, [string] $accessToken) {
- # create temporary location
- $guid = [System.Guid]::NewGuid().ToString()
- $tempDir = Join-Path ([System.IO.Path]::GetTempPath()) $guid
- New-Item -ItemType Directory -Path $tempDir | Out-Null
-
- # download the logs
- $base64 = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$accessToken"))
- $headers = @{
- Authorization = "Basic $base64"
- }
- $uri = "https://dev.azure.com/dnceng/internal/_apis/build/builds/$buildId/logs?`$format=zip"
- Invoke-WebRequest -Uri $uri -Method Get -Headers $headers -UseBasicParsing -OutFile "$tempDir/logs.zip"
-
- # expand the logs
- New-Item -ItemType Directory -Path "$tempDir/logs" | Out-Null
- Expand-Archive -Path "$tempDir/logs.zip" -DestinationPath "$tempDir/logs"
-
- # parse specific logs
- $logDir = "$tempDir/logs"
- $manifests = @()
- $seenManifests = @{}
- Get-ChildItem $logDir -r -inc "*Upload VSTS Drop*" | ForEach-Object {
- $result = Select-String -Path $_ -Pattern "(https://vsdrop\.corp\.microsoft\.com[^;]+);(.*)" -AllMatches
- $result.Matches | ForEach-Object {
- $manifestShortUrl = $_.Groups[1].Value
- $manifestName = $_.Groups[2].Value
- $manifestUrl = "$manifestShortUrl;$manifestName"
- If (-Not $seenManifests.Contains($manifestUrl)) {
- $seenManifests.Add($manifestUrl, $true)
- $buildVersion = $manifestVersionMap[$manifestName]
- $manifestEntry = "$manifestName{$buildVersion}=$manifestUrl"
- $manifests += $manifestEntry
- }
- }
- }
-
- Remove-Item -Path $tempDir -Recurse
-
- return $manifests
-}
-
-try {
- # build map of all *.vsman files to their `info.buildVersion` values
- $manifestVersionMap = @{}
- Get-ChildItem -Path "$insertionDir\*" -Filter "*.vsman" | ForEach-Object {
- $manifestName = Split-Path $_ -Leaf
- $vsmanContents = Get-Content $_ | ConvertFrom-Json
- $buildVersion = $vsmanContents.info.buildVersion
- $manifestVersionMap.Add($manifestName, $buildVersion)
- }
-
- # find all publish URLs
- #$manifests = Get-ManifestsViaIndividualLogs -manifestVersionMap $manifestVersionMap -buildId $buildId -accessToken $accessToken
- $manifests = Get-ManifestsViaZipLog -manifestVersionMap $manifestVersionMap -buildId $buildId -accessToken $accessToken
-
- $final = $manifests -Join ","
- Write-Host "Setting InsertJsonValues to $final"
- Write-Host "##vso[task.setvariable variable=InsertJsonValues]$final"
-}
-catch {
- Write-Host $_
- Write-Host $_.Exception
- Write-Host $_.ScriptStackTrace
- exit 1
-}
diff --git a/eng/targets/Imports.targets b/eng/targets/Imports.targets
deleted file mode 100644
index c13c86875d..0000000000
--- a/eng/targets/Imports.targets
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- $(RepositoryEngineeringDir)config\runtimeconfig.template.json
-
-
diff --git a/eng/targets/NGenBinaries.targets b/eng/targets/NGenBinaries.targets
deleted file mode 100644
index c06944e270..0000000000
--- a/eng/targets/NGenBinaries.targets
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
-
- false
- true
-
-
-
-
-
-
- true
- false
-
-
-
-
-
-
- $(windir)\Microsoft.NET\Framework\v4.0.30319\ngen.exe
- $(windir)\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(WindowsSDK_ExecutablePath_x86)\sn.exe
- $(WindowsSDK_ExecutablePath_x64)\sn.exe
-
-
-
-
-
-
-
diff --git a/eng/targets/NuGet.targets b/eng/targets/NuGet.targets
deleted file mode 100644
index dc8f32e24d..0000000000
--- a/eng/targets/NuGet.targets
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/eng/targets/Settings.props b/eng/targets/Settings.props
deleted file mode 100644
index 77f7a0c704..0000000000
--- a/eng/targets/Settings.props
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- MIT
- Visual F# Compiler FSharp functional programming
- $(ArtifactsBinDir)
-
-
-
-
- false
-
-
-
diff --git a/eng/tests/UpToDate.ps1 b/eng/tests/UpToDate.ps1
deleted file mode 100644
index e29bb9d878..0000000000
--- a/eng/tests/UpToDate.ps1
+++ /dev/null
@@ -1,80 +0,0 @@
-# This script verifies that subsequent calls to `Build.cmd` don't cause assemblies to be unnecessarily rebuilt.
-
-[CmdletBinding(PositionalBinding=$false)]
-param (
- [string][Alias('c')]$configuration = "Debug",
- [parameter(ValueFromRemainingArguments=$true)][string[]]$properties
-)
-
-Set-StrictMode -version 2.0
-$ErrorActionPreference = "Stop"
-
-try {
- $RepoRoot = Join-Path $PSScriptRoot ".." | Join-Path -ChildPath ".." -Resolve
- $BuildScript = Join-Path $RepoRoot "Build.cmd"
-
- # do first build
- & $BuildScript -configuration $configuration @properties
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Error running first build."
- exit 1
- }
-
- # gather assembly timestamps
- $ArtifactsBinDir = Join-Path $RepoRoot "artifacts" | Join-Path -ChildPath "bin" -Resolve
- $FSharpAssemblyDirs = Get-ChildItem -Path $ArtifactsBinDir -Filter "FSharp.*"
- $FscAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fsc"
- $FsiAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fsi"
- $FsiAnyCpuAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fsiAnyCpu"
- $DmAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "Microsoft.DotNet.DependencyManager"
- $ProjectSystemAssemblyDirs = Get-ChildItem -Path $ArtifactsBinDir -Filter "ProjectSystem*"
- $FSharpDirs = @($FSharpAssemblyDirs) + @($FscAssemblyDir) + @($FsiAssemblyDir) + @($FsiAnyCpuAssemblyDir) + @($DmAssemblyDir) + @($ProjectSystemAssemblyDirs)
- $FSharpDllPaths = $FSharpDirs | ForEach-Object { Get-ChildItem -Path (Join-Path $ArtifactsBinDir $_) -Recurse -Filter "*.dll" } | ForEach-Object { $_.FullName }
- $FSharpExePaths = $FSharpDirs | ForEach-Object { Get-ChildItem -Path (Join-Path $ArtifactsBinDir $_) -Recurse -Filter "*.exe" } | ForEach-Object { $_.FullName }
- $FSharpAssemblyPaths = @($FSharpDllPaths) + @($FSharpExePaths)
-
- $InitialAssembliesAndTimes = @{}
- foreach ($asm in $FSharpAssemblyPaths) {
- Write-Host "Assembly : $asm"
- $LastWriteTime = (Get-Item $asm).LastWriteTimeUtc
- $InitialAssembliesAndTimes.Add($asm, $LastWriteTime)
- }
-
- $InitialCompiledCount = $FSharpAssemblyPaths.Length
-
- # build again
- & $BuildScript -configuration $configuration @properties
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Error running second build."
- exit 1
- }
-
- # gather assembly timestamps again
- $FinalAssembliesAndTimes = @{}
- foreach ($asm in $FSharpAssemblyPaths) {
- $LastWriteTime = (Get-Item $asm).LastWriteTimeUtc
- $FinalAssembliesAndTimes.Add($asm, $LastWriteTime)
- }
-
- # validate that assembly timestamps haven't changed
- $RecompiledFiles = @()
- foreach ($asm in $InitialAssembliesAndTimes.keys) {
- $InitialTime = $InitialAssembliesAndTimes[$asm]
- $FinalTime = $FinalAssembliesAndTimes[$asm]
- if ($InitialTime -ne $FinalTime) {
- Write-Host "Rebuilt assembly: $asm"
- $RecompiledFiles += $asm
- }
- }
-
- $RecompiledCount = $RecompiledFiles.Length
- Write-Host "$RecompiledCount of $InitialCompiledCount assemblies were re-compiled"
- $RecompiledFiles | ForEach-Object { Write-Host " $_" }
- exit $RecompiledCount
-}
-catch {
- Write-Host $_
- Write-Host $_.Exception
- Write-Host $_.ScriptStackTrace
- exit 1
-}
diff --git a/fcs/.config/dotnet-tools.json b/fcs/.config/dotnet-tools.json
deleted file mode 100644
index 921015529f..0000000000
--- a/fcs/.config/dotnet-tools.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "version": 1,
- "isRoot": true,
- "tools": {
- "fake-cli": {
- "version": "5.18.3",
- "commands": [
- "fake"
- ]
- },
- "paket": {
- "version": "5.236.0",
- "commands": [
- "paket"
- ]
- },
- "fornax": {
- "version": "0.13.1",
- "commands": [
- "fornax"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/fcs/.gitignore b/fcs/.gitignore
deleted file mode 100644
index 0a3b52abf5..0000000000
--- a/fcs/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.paket/
-build.fsx.lock
-FSharp.Compiler.Service.Tests/TestResults/*
-FSharp.Compiler.Service.netstandard/illex.fs
-FSharp.Compiler.Service.netstandard/ilpars.fs
-FSharp.Compiler.Service.netstandard/ilpars.fsi
-FSharp.Compiler.Service.netstandard/lex.fs
-FSharp.Compiler.Service.netstandard/pars.fs
-FSharp.Compiler.Service.netstandard/pars.fsi
-FSharp.Compiler.Service.netstandard/pplex.fs
-FSharp.Compiler.Service.netstandard/pppars.fs
-FSharp.Compiler.Service.netstandard/pppars.fsi
-.idea/
-_public
\ No newline at end of file
diff --git a/fcs/.paket/Paket.Restore.targets b/fcs/.paket/Paket.Restore.targets
deleted file mode 100644
index a79555813d..0000000000
--- a/fcs/.paket/Paket.Restore.targets
+++ /dev/null
@@ -1,481 +0,0 @@
-
-
-
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
- $(MSBuildVersion)
- 15.0.0
- false
- true
-
- true
- $(MSBuildThisFileDirectory)
- $(MSBuildThisFileDirectory)..\
- $(PaketRootPath)paket-files\paket.restore.cached
- $(PaketRootPath)paket.lock
- classic
- proj
- assembly
- native
- /Library/Frameworks/Mono.framework/Commands/mono
- mono
-
-
- $(PaketRootPath)paket.bootstrapper.exe
- $(PaketToolsPath)paket.bootstrapper.exe
- $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\
-
- "$(PaketBootStrapperExePath)"
- $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"
-
-
-
-
- true
- true
-
-
- True
-
- $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))
-
-
-
-
-
-
-
-
-
-
-
-
- dotnet paket
-
-
-
-
-
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
- $(PaketToolsPath)paket.exe
- $(_PaketBootStrapperExeDir)paket.exe
- paket.exe
-
-
- $(PaketRootPath)paket
- $(PaketToolsPath)paket
- $(PaketToolsPath)paket
-
-
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
-
-
- $(PaketBootStrapperExeDir)paket.exe
-
-
- paket
-
- <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
- dotnet "$(PaketExePath)"
- $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
- "$(PaketExePath)"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- $(NoWarn);NU1603;NU1604;NU1605;NU1608
- false
- true
-
-
-
-
-
-
-
-
- $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))
-
-
-
-
-
-
- $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``))
- $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``))
-
-
-
-
- %(PaketRestoreCachedKeyValue.Value)
- %(PaketRestoreCachedKeyValue.Value)
-
-
-
-
- true
- false
- true
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached
-
- $(MSBuildProjectFullPath).paket.references
-
- $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references
-
- $(MSBuildProjectDirectory)\paket.references
-
- false
- true
- true
- references-file-or-cache-not-found
-
-
-
-
- $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)'))
- $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)'))
- references-file
- false
-
-
-
-
- false
-
-
-
-
- true
- target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths)
-
-
-
-
-
-
-
-
-
-
- false
- true
-
-
-
-
-
-
-
-
-
-
- $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)
- $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])
- $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])
- $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])
- $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])
-
-
- %(PaketReferencesFileLinesInfo.PackageVersion)
- All
- runtime
- runtime
- true
- true
-
-
-
-
- $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools
-
-
-
-
-
-
-
-
- $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0])
- $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1])
-
-
- %(PaketCliToolFileLinesInfo.PackageVersion)
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
- <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
-
-
-
-
-
- $(MSBuildProjectDirectory)/$(MSBuildProjectFile)
- true
- false
- true
- false
- true
- false
- true
- false
- true
- $(PaketIntermediateOutputPath)\$(Configuration)
- $(PaketIntermediateOutputPath)
-
-
-
- <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fcs/Directory.Build.props b/fcs/Directory.Build.props
deleted file mode 100644
index 7988ee2f36..0000000000
--- a/fcs/Directory.Build.props
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- $(RestoreSources);
- https://api.nuget.org/v3/index.json;
- https://dotnet.myget.org/F/fsharp/api/v3/index.json;
-
-
-
-
- $(UserProfile)\.nuget\packages\
- $(HOME)/.nuget/packages/
- $(NuGetPackageRoot)\
- $(NuGetPackageRoot)/
- $(MSBuildThisFileDirectory)..\artifacts
- $(ArtifactsDir)\bin
- $(ArtifactsDir)\obj
- $(ArtifactsBinDir)\fcs\$(Configuration)
- $(ArtifactsObjDir)\fcs\$(Configuration)
- true
-
-
-
-
- $(MSBuildThisFileDirectory)..\src
- 22.0.3
- --version:$(VersionPrefix)
- false
-
-
- $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools
- fsi.exe
- 4.6.2
- net461
-
-
diff --git a/fcs/Directory.Build.targets b/fcs/Directory.Build.targets
deleted file mode 100644
index 00f6e63aa8..0000000000
--- a/fcs/Directory.Build.targets
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
- <__TargetFilePath>@(NoneSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')
- <__TargetFileName>@(NoneSubstituteText->'%(Filename)%(Extension)')
-
- <_ReplacementText>$([System.IO.File]::ReadAllText('%(NoneSubstituteText.FullPath)'))
- <_ReplacementText Condition="'%(NoneSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern1)', '%(NoneSubstituteText.Replacement1)'))
- <_ReplacementText Condition="'%(NoneSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern2)', '%(NoneSubstituteText.Replacement2)'))
-
- <_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' != ''">%(NoneSubstituteText.CopyToOutputDirectory)
- <_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' == ''">Never
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BuildPropertyLines Remove="@(_BuildPropertyLines)" />
- <_BuildPropertyLines Include="// <auto-generated >" />
- <_BuildPropertyLines Include="// <Generated by the FSharp WriteCodeFragment class./>" />
- <_BuildPropertyLines Include="// </auto-generated/>" />
- <_BuildPropertyLines Include="//" />
- <_BuildPropertyLines Include="module internal FSharp.BuildProperties" />
- <_BuildPropertyLines Include="let fsProductVersion = "$(FSPRODUCTVERSION)"" />
- <_BuildPropertyLines Include="let fsLanguageVersion = "$(FSLANGUAGEVERSION)"" />
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
deleted file mode 100644
index 9e3ecf6a10..0000000000
--- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- $(FcsTargetNetFxFramework)
- true
- $(DefineConstants);CROSS_PLATFORM_COMPILER
- $(DefineConstants);ENABLE_MONO_SUPPORT
- embedded
-
-
- Additional DLL for legacy compat for the F# compiler service.
- Additional DLL for legacy compat for the F# compiler service.
- false
- F# community contributors
- MIT
- https://github.com/fsharp/FSharp.Compiler.Service
- logo.png
- F#, compiler, msbuild
-
-
-
-
- Service/MSBuildReferenceResolver.fs
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.Tests/.gitignore b/fcs/FSharp.Compiler.Service.Tests/.gitignore
deleted file mode 100644
index eabace925a..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-watson-test.exe
diff --git a/fcs/FSharp.Compiler.Service.Tests/App.config b/fcs/FSharp.Compiler.Service.Tests/App.config
deleted file mode 100644
index 380c93a453..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/App.config
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
deleted file mode 100644
index 6bded08333..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- net461;netstandard2.0
- $(FcsTargetNetFxFramework);netstandard2.0
- false
- $(NoWarn);0067;1591
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
deleted file mode 100644
index 7f3b33ad92..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- $(FcsTargetNetFxFramework);netcoreapp3.1
- true
- 4.1.19
- $(NoWarn);44;75;
- true
- true
- ..\..\$(Configuration.ToLower())\fcs
- portable
- false
- true
- true
-
-
- $(DefineConstants);NO_PROJECTCRACKER
- $(DefineConstants);FCS
-
-
-
- FsUnit.fs
-
-
- Common.fs
-
-
- AssemblyReaderShim.fs
-
-
- EditorTests.fs
-
-
- Symbols.fs
-
-
- FileSystemTests.fs
-
-
- ProjectAnalysisTests.fs
-
-
- MultiProjectAnalysisTests.fs
-
-
- PerfTests.fs
-
-
- InteractiveCheckerTests.fs
-
-
- ExprTests.fs
-
-
- CSharpProjectAnalysis.fs
-
-
- StructureTests.fs
-
-
- TokenizerTests.fs
-
-
- ServiceUntypedParseTests.fs
-
-
- TreeVisitorTests.fs
-
-
- PatternMatchCompilationTests.fs
-
-
- ScriptOptionsTests.fs
-
-
- Program.fs
-
-
- {{FSCoreVersion}}
- $(FSCoreVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.Tests/FsxCompletionProviderTests.fs b/fcs/FSharp.Compiler.Service.Tests/FsxCompletionProviderTests.fs
deleted file mode 100644
index 236caff428..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/FsxCompletionProviderTests.fs
+++ /dev/null
@@ -1,161 +0,0 @@
-// To run the tests in this file:
-//
-// Technique 1: Compile VisualFSharp.UnitTests.dll and run it as a set of unit tests
-//
-// Technique 2:
-//
-// Enable some tests in the #if EXE section at the end of the file,
-// then compile this file as an EXE that has InternalsVisibleTo access into the
-// appropriate DLLs. This can be the quickest way to get turnaround on updating the tests
-// and capturing large amounts of structured output.
-(*
- cd Debug\net40\bin
- .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.UnitTests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\UnitTests\FsxCompletionProviderTests.fs
- .\VisualFSharp.UnitTests.exe
-*)
-// Technique 3:
-//
-// Use F# Interactive. This only works for FSharp.Compiler.Service.dll which has a public API
-
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
-
-open System
-open System.Collections.Generic
-open System.IO
-open System.Linq
-open System.Reflection
-
-open NUnit.Framework
-
-open Microsoft.CodeAnalysis
-open Microsoft.CodeAnalysis.Completion
-open Microsoft.CodeAnalysis.Text
-open Microsoft.VisualStudio.FSharp.Editor
-
-open FSharp.Compiler.SourceCodeServices
-open UnitTests.TestLib.LanguageService
-
-// AppDomain helper
-type Worker () =
- inherit MarshalByRefObject()
-
- let filePath = "C:\\test.fsx"
- let projectOptions = {
- ProjectFileName = "C:\\test.fsproj"
- ProjectId = None
- SourceFiles = [| filePath |]
- ReferencedProjects = [| |]
- OtherOptions = [| |]
- IsIncompleteTypeCheckEnvironment = true
- UseScriptResolutionRules = true
- LoadTime = DateTime.MaxValue
- OriginalLoadReferences = []
- UnresolvedReferences = None
- ExtraProjectInfo = None
- Stamp = None
- }
-
- let formatCompletions(completions : string seq) =
- "\n\t" + String.Join("\n\t", completions)
-
- let VerifyCompletionList(fileContents: string, marker: string, expected: string list, unexpected: string list) =
- let caretPosition = fileContents.IndexOf(marker) + marker.Length
- let results =
- FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default)
- |> Async.RunSynchronously
- |> Option.defaultValue (ResizeArray())
- |> Seq.map(fun result -> result.DisplayText)
-
- let expectedFound =
- expected
- |> Seq.filter results.Contains
-
- let expectedNotFound =
- expected
- |> Seq.filter (expectedFound.Contains >> not)
-
- let unexpectedNotFound =
- unexpected
- |> Seq.filter (results.Contains >> not)
-
- let unexpectedFound =
- unexpected
- |> Seq.filter (unexpectedNotFound.Contains >> not)
-
- // If either of these are true, then the test fails.
- let hasExpectedNotFound = not (Seq.isEmpty expectedNotFound)
- let hasUnexpectedFound = not (Seq.isEmpty unexpectedFound)
-
- if hasExpectedNotFound || hasUnexpectedFound then
- let expectedNotFoundMsg =
- if hasExpectedNotFound then
- sprintf "\nExpected completions not found:%s\n" (formatCompletions expectedNotFound)
- else
- String.Empty
-
- let unexpectedFoundMsg =
- if hasUnexpectedFound then
- sprintf "\nUnexpected completions found:%s\n" (formatCompletions unexpectedFound)
- else
- String.Empty
-
- let completionsMsg = sprintf "\nin Completions:%s" (formatCompletions results)
-
- let msg = sprintf "%s%s%s" expectedNotFoundMsg unexpectedFoundMsg completionsMsg
-
- Assert.Fail(msg)
-
- member __.VerifyCompletionListExactly(fileContents: string, marker: string, expected: List) =
-
- let caretPosition = fileContents.IndexOf(marker) + marker.Length
- let expected = expected |> Seq.toList
- let actual =
- let x = FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default)
- |> Async.RunSynchronously
- x |> Option.defaultValue (ResizeArray())
- |> Seq.toList
- // sort items as Roslyn do - by `SortText`
- |> List.sortBy (fun x -> x.SortText)
-
- let actualNames = actual |> List.map (fun x -> x.DisplayText)
-
- if actualNames <> expected then
- Assert.Fail(sprintf "Expected:\n%s,\nbut was:\n%s\nactual with sort text:\n%s"
- (String.Join("; ", expected |> List.map (sprintf "\"%s\"")))
- (String.Join("; ", actualNames |> List.map (sprintf "\"%s\"")))
- (String.Join("\n", actual |> List.map (fun x -> sprintf "%s => %s" x.DisplayText x.SortText))))
-
-module FsxCompletionProviderTests =
-
- let pathToThisDll = Assembly.GetExecutingAssembly().CodeBase
-
- let getWorker () =
-
- let adSetup =
- let setup = new System.AppDomainSetup ()
- setup.PrivateBinPath <- pathToThisDll
- setup.ApplicationBase <- Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SomeNonExistentDirectory")
- setup
-
- let ad = AppDomain.CreateDomain((Guid()).ToString(), null, adSetup)
- (ad.CreateInstanceFromAndUnwrap(pathToThisDll, typeof.FullName)) :?> Worker
-
- []
- let fsiShouldTriggerCompletionInFsxFile() =
-
- let fileContents = """
- fsi.
- """
- let expected = List([
- "CommandLineArgs"; "EventLoop"; "FloatingPointFormat"; "FormatProvider"; "PrintDepth";
- "PrintLength"; "PrintSize"; "PrintWidth"; "ShowDeclarationValues"; "ShowIEnumerable";
- "ShowProperties"; "AddPrinter"; "AddPrintTransformer"; "Equals"; "GetHashCode";
- "GetType"; "ToString"; ])
-
- // We execute in a seperate appdomain so that we can set BaseDirectory to a non-existent location
- getWorker().VerifyCompletionListExactly(fileContents, "fsi.", expected)
-
-#if EXE
-ShouldTriggerCompletionInFsxFile()
-#endif
diff --git a/fcs/FSharp.Compiler.Service.Tests/ProjectOptionsBuilder.fs b/fcs/FSharp.Compiler.Service.Tests/ProjectOptionsBuilder.fs
deleted file mode 100644
index 106b7602a5..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/ProjectOptionsBuilder.fs
+++ /dev/null
@@ -1,154 +0,0 @@
-namespace VisualFSharp.UnitTests.Roslyn
-
-open System
-open System.IO
-open System.Xml.Linq
-open FSharp.Compiler.SourceCodeServices
-
-module FileSystemHelpers =
- let safeDeleteFile (path: string) =
- try
- File.Delete(path)
- with
- | _ -> ()
-
- let safeDeleteDirectory (path: string) =
- try
- Directory.Delete(path)
- with
- | _ -> ()
-
-type FSharpProject =
- {
- Directory: string
- Options: FSharpProjectOptions
- Files: (string * string) list
- }
-
- /// Strips cursor information from each file and returns the name and cursor position of the last file to specify it.
- member this.GetCaretPosition () =
- let caretSentinel = "$$"
- let mutable cursorInfo: (string * int) = (null, 0)
- this.Files
- |> List.iter (fun (name, contents) ->
- // find the '$$' sentinel that represents the cursor location
- let caretPosition = contents.IndexOf(caretSentinel)
- if caretPosition >= 0 then
- let newContents = contents.Substring(0, caretPosition) + contents.Substring(caretPosition + caretSentinel.Length)
- File.WriteAllText(Path.Combine(this.Directory, name), newContents)
- cursorInfo <- (name, caretPosition))
- cursorInfo
- interface IDisposable with
- member this.Dispose() =
- // delete each source file
- this.Files
- |> List.map fst
- |> List.iter FileSystemHelpers.safeDeleteFile
- // delete the directory
- FileSystemHelpers.safeDeleteDirectory (this.Directory)
- // project file doesn't really exist, nothing to delete
- ()
-
-[]
-module internal ProjectOptionsBuilder =
- let private FileName = XName.op_Implicit "File"
- let private NameName = XName.op_Implicit "Name"
- let private ProjectName = XName.op_Implicit "Project"
- let private ReferenceName = XName.op_Implicit "Reference"
-
- let private CreateSingleProjectFromMarkup(markup:XElement) =
- if markup.Name.LocalName <> "Project" then failwith "Expected root node to be "
- let projectRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString())
- if Directory.Exists(projectRoot) then Directory.Delete(projectRoot, true)
- Directory.CreateDirectory(projectRoot) |> ignore
- let files = // filename -> fileContents
- markup.Elements(FileName)
- |> Seq.map (fun file ->
- let fileName = Path.Combine(projectRoot, file.Attribute(NameName).Value)
- let fileContents = file.Value
- File.WriteAllText(fileName, fileContents)
- (fileName, fileContents))
- |> List.ofSeq
- let options =
- {
- ProjectFileName = Path.Combine(projectRoot, markup.Attribute(NameName).Value)
- ProjectId = None
- SourceFiles = files |> Seq.map fst |> Array.ofSeq
- ReferencedProjects = [||] // potentially filled in later
- OtherOptions = [||]
- IsIncompleteTypeCheckEnvironment = true
- UseScriptResolutionRules = false
- LoadTime = DateTime.MaxValue
- OriginalLoadReferences = []
- UnresolvedReferences = None
- ExtraProjectInfo = None
- Stamp = None
- }
- {
- Directory = projectRoot
- Options = options
- Files = files
- }
-
- let private CreateMultipleProjectsFromMarkup(markup:XElement) =
- if markup.Name.LocalName <> "Projects" then failwith "Expected root node to be "
- let projectsAndXml =
- markup.Elements(ProjectName)
- |> Seq.map (fun xml -> (CreateSingleProjectFromMarkup xml, xml))
- |> List.ofSeq
- // setup project references
- let projectMap =
- projectsAndXml
- |> List.map (fun (projectOptions, _xml) ->
- let normalizedProjectName = Path.GetFileName(projectOptions.Options.ProjectFileName)
- (normalizedProjectName, projectOptions))
- |> Map.ofList
- let projects =
- projectsAndXml
- |> List.map(fun (projectOptions, xml) ->
- // bind references to their `FSharpProjectOptions` counterpart
- let referenceList =
- xml.Elements(ReferenceName)
- |> Seq.map (fun reference -> reference.Value)
- |> Seq.fold (fun list reference -> reference :: list) []
- |> List.rev
- |> List.map (fun referencedProject ->
- let project = projectMap.[referencedProject]
- let asmName = Path.GetFileNameWithoutExtension(project.Options.ProjectFileName)
- let binaryPath = Path.Combine(project.Directory, "bin", asmName + ".dll")
- (binaryPath, project.Options))
- |> Array.ofList
- let binaryRefs =
- referenceList
- |> Array.map fst
- |> Array.map (fun r -> "-r:" + r)
- let otherOptions = Array.append projectOptions.Options.OtherOptions binaryRefs
- { projectOptions with
- Options = { projectOptions.Options with
- ReferencedProjects = referenceList
- OtherOptions = otherOptions
- }
- })
- let rootProject = List.head projects
- rootProject
-
- let CreateProjectFromMarkup(markup:XElement) =
- match markup.Name.LocalName with
- | "Project" -> CreateSingleProjectFromMarkup markup
- | "Projects" -> CreateMultipleProjectsFromMarkup markup
- | name -> failwith <| sprintf "Unsupported root node name: %s" name
-
- let CreateProject(markup:string) =
- XDocument.Parse(markup).Root
- |> CreateProjectFromMarkup
-
- let SingleFileProject(code:string) =
- code
- |> sprintf @"
-
-
-
-
-
-"
- |> CreateProject
diff --git a/fcs/FSharp.Compiler.Service.Tests/QuickInfoTests.fs b/fcs/FSharp.Compiler.Service.Tests/QuickInfoTests.fs
deleted file mode 100644
index 415079942e..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/QuickInfoTests.fs
+++ /dev/null
@@ -1,445 +0,0 @@
-namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
-
-open System.IO
-open FSharp.Compiler.SourceCodeServices
-open Microsoft.CodeAnalysis
-open Microsoft.CodeAnalysis.Text
-open Microsoft.VisualStudio.FSharp.Editor
-open NUnit.Framework
-open UnitTests.TestLib.LanguageService
-open VisualFSharp.UnitTests.Roslyn
-
-[]
-module QuickInfo =
-
-let internal GetQuickInfo (project:FSharpProject) (fileName:string) (caretPosition:int) =
- async {
- let code = File.ReadAllText(fileName)
- let sourceText = SourceText.From(code)
- let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) // only used for caching purposes
- return! FSharpAsyncQuickInfoSource.ProvideQuickInfo(checker, documentId, sourceText, fileName, caretPosition, FSharpParsingOptions.Default, project.Options, 0, LanguageServicePerformanceOptions.Default)
- } |> Async.RunSynchronously
-
-let GetQuickInfoText (project:FSharpProject) (fileName:string) (caretPosition:int) =
- let sigHelp = GetQuickInfo project fileName caretPosition
- match sigHelp with
- | Some (quickInfo) ->
- let documentationBuilder =
- { new IDocumentationBuilder with
- override __.AppendDocumentationFromProcessedXML(_, _, _, _, _, _) = ()
- override __.AppendDocumentation(_, _, _, _, _, _, _) = ()
- }
- let mainDescription, docs = FSharpAsyncQuickInfoSource.BuildSingleQuickInfoItem documentationBuilder quickInfo
- let mainTextItems =
- mainDescription
- |> Seq.map (fun x -> x.Text)
- let docTextItems =
- docs
- |> Seq.map (fun x -> x.Text)
- System.String.Join(System.String.Empty, (Seq.concat [mainTextItems; docTextItems]))
- | _ -> ""
-
-let GetQuickInfoTextFromCode (code:string) =
- use project = SingleFileProject code
- let fileName, caretPosition = project.GetCaretPosition()
- GetQuickInfoText project fileName caretPosition
-
-let expectedLines (lines:string list) = System.String.Join("\n", lines)
-
-// migrated from legacy test
-[]
-let ``Automation.EnumDUInterfacefromFSBrowse.InsideComputationExpression`` () =
- let code = """
-namespace FsTest
-
-type MyColors =
- | Red = 0
- | Green = 1
- | Blue = 2
-
-module Test =
- let test() =
- let x =
- seq {
- for i in 1..10 do
- let f = MyColors.Re$$d
- yield f
- }
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "MyColors.Red: MyColors = 0"
- Assert.AreEqual(expected, quickInfo)
-
-// migrated from legacy test
-[]
-let ``Automation.EnumDUInterfacefromFSBrowse.InsideMatch`` () =
- let code = """
-namespace FsTest
-
-type MyDistance =
- | Kilometers of float
- | Miles of float
- | NauticalMiles of float
-
-module Test =
- let test() =
- let myDuList = (fun x ->
- match x with
- | 0 -> MyDistanc$$e.Kilometers
- | 1 -> MyDistance.Miles
- | _ -> MyDistance.NauticalMiles
- )
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected =
- expectedLines [ "type MyDistance ="
- " | Kilometers of float"
- " | Miles of float"
- " | NauticalMiles of float"
- "Full name: FsTest.MyDistance" ]
- Assert.AreEqual(expected, quickInfo)
-
-// migrated from legacy test
-[]
-let ``Automation.EnumDUInterfacefromFSBrowse.InsideLambda`` () =
- let code = """
-namespace FsTest
-
-type IMyInterface =
- interface
- abstract Represent : unit -> string
- end
-
-type MyTestType() =
- []
- val mutable field : int
-
- interface IMyInterface with
- member this.Represent () = "Implement Interface"
-
-module Test =
- let test() =
- let s = new MyTestType()
- |> fun (x:MyTestType) -> x :> IMyInterface
- |> fun (x:IMyInterface) -> x.Represen$$t()
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "abstract member IMyInterface.Represent : unit -> string"
- Assert.AreEqual(expected, quickInfo)
-
-// migrated from legacy test
-[]
-let ``Automation.RecordAndInterfaceFromFSProj.InsideComputationExpression``() =
- let code = """
-namespace FsTest
-
-type MyEmployee =
- { mutable Name : string;
- mutable Age : int;
- mutable IsFTE : bool }
-
-module Test =
- let test() =
- let construct =
- seq {
- for i in 1..10 do
- let a = MyEmploye$$e.MakeDummy()
- ()
- }
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected =
- expectedLines [ "type MyEmployee ="
- " { mutable Name: string"
- " mutable Age: int"
- " mutable IsFTE: bool }"
- "Full name: FsTest.MyEmployee" ]
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.RecordAndInterfaceFromFSProj.InsideQuotation``() =
- let code = """
-namespace FsTest
-
-type MyEmployee =
- { mutable Name : string;
- mutable Age : int;
- mutable IsFTE : bool }
-
-module Test =
- let test() =
- let aa = { Name: "name";
- Age: 1;
- IsFTE: false; }
- let b = <@ a$$a.Name @>
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val aa : MyEmployee"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.RecordAndInterfaceFromFSProj.InsideLambda``() =
- let code = """
-namespace FsTest
-
-type MyEmployee =
- { mutable Name : string;
- mutable Age : int;
- mutable IsFTE : bool }
-
-module Test =
- let test() =
- let aa = { Name: "name";
- Age: 1;
- IsFTE: false; }
- let b =
- [ aa ]
- |> List.filter (fun e -> e.IsFT$$E)
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "MyEmployee.IsFTE: bool"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.TupleRecordFromFSBrowse.InsideComputationExpression``() =
- let code = """
-namespace FsTest
-
-module Test =
- let GenerateTuple =
- fun x ->
- let tuple = (x, x.ToString(), (float)x, (fun y -> (y.ToString(), y + 1)))
- tuple
- let test() =
- let mySeq =
- seq {
- for i in 1..9 do
- let my$$Tuple = GenerateTuple i
- yield myTuple
- }
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val myTuple : int * string * float * (int -> string * int)"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.TupleRecordFromFSBrowse.SequenceOfMethods``() =
- let code = """
-namespace FsTest
-
-module Test =
- let GenerateTuple =
- fun x ->
- let tuple = (x, x.ToString(), (float)x, (fun y -> (y.ToString(), y + 1)))
- tuple
- let GetTupleMethod tuple =
- let (_intInTuple, _stringInTuple, _floatInTuple, methodInTuple) = tuple
- methodInTuple
- let test() =
- let mySeq =
- seq {
- for i in 1..9 do
- let myTuple = GenerateTuple i
- yield myTuple
- }
- let method$$Seq = Seq.map GetTupleMethod mySeq
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val methodSeq : seq<(int -> string * int)>"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.MatchExpression``() =
- let code = """
-namespace FsTest
-
-[]
-type MyPoint(x:int, y:int) =
- member this.X = x
- member this.Y = y
-
-module Test =
- let test() =
- let p1 = MyPoint(1, 2)
- match p$$1 with
- | p3 when p3.X = 1 -> 0
- | _ -> 1
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val p1 : MyPoint"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.MatchPattern``() =
- let code = """
-namespace FsTest
-
-[]
-type MyPoint(x:int, y:int) =
- member this.X = x
- member this.Y = y
-
-module Test =
- let test() =
- let p1 = MyPoint(1, 2)
- match p1 with
- | p$$3 when p3.X = 1 -> 0
- | _ -> 1
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val p3 : MyPoint"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.UnionIfPredicate``() =
- let code = """
-namespace FsTest
-
-type MyDistance =
- | Kilometers of float
- | Miles of float
- | NauticalMiles of float
-
-module Test =
- let test() =
- let dd = MyDistance.Kilometers 1.0
- if MyDistance.toMiles d$$d > 0 then ()
- else ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val dd : MyDistance"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.UnionForPattern``() =
- let code = """
-namespace FsTest
-
-type MyDistance =
- | Kilometers of float
- | Miles of float
- | NauticalMiles of float
-
-module Test =
- let test() =
- let distances = [ MyDistance.Kilometers 1.0; MyDistance.Miles 1.0 ]
- for dist$$ance in distances do
- ()
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "val distance : MyDistance"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.UnionMethodPatternMatch``() =
- let code = """
-namespace FsTest
-
-type MyDistance =
- | Kilometers of float
- | Miles of float
- | NauticalMiles of float
- static member toMiles x =
- Miles(
- match x with
- | Miles x -> x
- | Kilometers x -> x / 1.6
- | NauticalMiles x -> x * 1.15
- )
-
-module Test =
- let test() =
- let dd = MyDistance.Kilometers 1.0
- match MyDistance.to$$Miles dd with
- | Miles x -> 0
- | _ -> 1
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "static member MyDistance.toMiles : x:MyDistance -> MyDistance"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.UnionMethodPatternMatchBody``() =
- let code = """
-namespace FsTest
-
-type MyDistance =
- | Kilometers of float
- | Miles of float
- | NauticalMiles of float
- member this.IncreaseBy dist =
- match this with
- | Kilometers x -> Kilometers (x + dist)
- | Miles x -> Miles (x + dist)
- | NauticalMiles x -> NauticalMiles (x + dist)
-
-module Test =
- let test() =
- let dd = MyDistance.Kilometers 1.0
- match dd.toMiles() with
- | Miles x -> dd.Increase$$By 1.0
- | _ -> dd
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "member MyDistance.IncreaseBy : dist:float -> MyDistance"
- Assert.AreEqual(expected, quickInfo)
- ()
-
-// migrated from legacy test
-[]
-let ``Automation.UnionAndStructFromFSProj.UnionPropertyInComputationExpression``() =
- let code = """
-namespace FsTest
-
-type MyDistance =
- | Kilometers of float
- | Miles of float
- | NauticalMiles of float
- member this.asNautical =
- NauticalMiles(
- match this with
- | Kilometers x -> x / 1.852
- | Miles x -> x / 1.15
- | NauticalMiles x -> x
- )
-
-module Test =
- let test() =
- let dd = MyDistance.Kilometers 1.0
- async {
- let r = dd.as$$Nautical
- return r
- }
-"""
- let quickInfo = GetQuickInfoTextFromCode code
- let expected = "property MyDistance.asNautical: MyDistance with get"
- Assert.AreEqual(expected, quickInfo)
- ()
diff --git a/fcs/FSharp.Compiler.Service.Tests/RoslynSourceTextTests.fs b/fcs/FSharp.Compiler.Service.Tests/RoslynSourceTextTests.fs
deleted file mode 100644
index 9a817df977..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/RoslynSourceTextTests.fs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
-
-open System
-open NUnit.Framework
-
-open Microsoft.VisualStudio.FSharp.Editor
-open FSharp.Compiler.Text
-open Microsoft.CodeAnalysis.Text
-
-[]
-module RoslynSourceTextTests =
-
- []
- let SourceText () =
- let text = "test\ntest2\r\ntest3\n\ntest4\ntest5\rtest6\n"
- let sourceText = SourceText.From(text).ToFSharpSourceText()
-
- Assert.AreEqual("test", sourceText.GetLineString(0))
- Assert.AreEqual("test2", sourceText.GetLineString(1))
- Assert.AreEqual("test3", sourceText.GetLineString(2))
- Assert.AreEqual("", sourceText.GetLineString(3))
- Assert.AreEqual("test4", sourceText.GetLineString(4))
- Assert.AreEqual("test5", sourceText.GetLineString(5))
- Assert.AreEqual("test6", sourceText.GetLineString(6))
- Assert.AreEqual("", sourceText.GetLineString(7))
- Assert.AreEqual(8, sourceText.GetLineCount())
-
- let (count, length) = sourceText.GetLastCharacterPosition()
- Assert.AreEqual(8, count)
- Assert.AreEqual(0, length)
-
- Assert.True(sourceText.SubTextEquals("test", 0))
- Assert.True(sourceText.SubTextEquals("test2", 5))
- Assert.True(sourceText.SubTextEquals("test3", 12))
-
- Assert.Throws(fun () -> sourceText.SubTextEquals("test", -1) |> ignore) |> ignore
- Assert.Throws(fun () -> sourceText.SubTextEquals("test", text.Length) |> ignore) |> ignore
- Assert.Throws(fun () -> sourceText.SubTextEquals("", 0) |> ignore) |> ignore
- Assert.Throws(fun () -> sourceText.SubTextEquals(text + text, 0) |> ignore) |> ignore
-
- Assert.False(sourceText.SubTextEquals("test", 1))
- Assert.False(sourceText.SubTextEquals("test", 4))
- Assert.False(sourceText.SubTextEquals("test", 11))
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.Tests/SemanticColorizationServiceTests.fs b/fcs/FSharp.Compiler.Service.Tests/SemanticColorizationServiceTests.fs
deleted file mode 100644
index e1591ed0cb..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/SemanticColorizationServiceTests.fs
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
-
-open System
-open NUnit.Framework
-open Microsoft.VisualStudio.FSharp.Editor
-open FSharp.Compiler.SourceCodeServices
-open FSharp.Compiler
-open Microsoft.CodeAnalysis.Text
-open Microsoft.CodeAnalysis.Classification
-
-[]
-type SemanticClassificationServiceTests() =
- let filePath = "C:\\test.fs"
-
- let projectOptions = {
- ProjectFileName = "C:\\test.fsproj"
- ProjectId = None
- SourceFiles = [| filePath |]
- ReferencedProjects = [| |]
- OtherOptions = [| |]
- IsIncompleteTypeCheckEnvironment = true
- UseScriptResolutionRules = false
- LoadTime = DateTime.MaxValue
- UnresolvedReferences = None
- OriginalLoadReferences = []
- ExtraProjectInfo = None
- Stamp = None
- }
-
- let checker = FSharpChecker.Create()
- let perfOptions = { LanguageServicePerformanceOptions.Default with AllowStaleCompletionResults = false }
-
- let getRanges (source: string) : struct (Range.range * SemanticClassificationType) list =
- asyncMaybe {
-
- let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, 0, SourceText.From(source), projectOptions, perfOptions, "")
- return checkFileResults.GetSemanticClassification(None)
- }
- |> Async.RunSynchronously
- |> Option.toList
- |> List.collect Array.toList
-
- let verifyClassificationAtEndOfMarker(fileContents: string, marker: string, classificationType: string) =
- let text = SourceText.From(fileContents)
- let ranges = getRanges fileContents
- let line = text.Lines.GetLinePosition (fileContents.IndexOf(marker) + marker.Length - 1)
- let markerPos = Range.mkPos (Range.Line.fromZ line.Line) (line.Character + marker.Length - 1)
- match ranges |> List.tryFind (fun struct (range, _) -> Range.rangeContainsPos range markerPos) with
- | None -> Assert.Fail("Cannot find colorization data for end of marker")
- | Some(_, ty) -> Assert.AreEqual(classificationType, FSharpClassificationTypes.getClassificationTypeName ty, "Classification data doesn't match for end of marker")
-
- let verifyNoClassificationDataAtEndOfMarker(fileContents: string, marker: string, classificationType: string) =
- let text = SourceText.From(fileContents)
- let ranges = getRanges fileContents
- let line = text.Lines.GetLinePosition (fileContents.IndexOf(marker) + marker.Length - 1)
- let markerPos = Range.mkPos (Range.Line.fromZ line.Line) (line.Character + marker.Length - 1)
- let anyData = ranges |> List.exists (fun struct (range, sct) -> Range.rangeContainsPos range markerPos && ((FSharpClassificationTypes.getClassificationTypeName sct) = classificationType))
- Assert.False(anyData, "Classification data was found when it wasn't expected.")
-
- []
- []
- []
- []
- []
- []
- []
- member __.Measured_Types(marker: string, classificationType: string) =
- verifyClassificationAtEndOfMarker(
- """#light (*Light*)
- open System
-
- [] type (*1*)Guid<[] 'm> = Guid
- [] type (*2*)string<[] 'm> = string
-
- let inline cast<'a, 'b> (a : 'a) : 'b = (# "" a : 'b #)
-
- type Uom =
- static member inline tag<[]'m> (x : Guid) : (*3*)Guid<'m> = cast x
- static member inline tag<[]'m> (x : string) : (*4*)string<'m> = cast x
-
- type [] Ms
-
- let i: (*5*)int = 1
- let g: (*6*)Guid = Uom.tag Guid.Empty
- let s: (*7*)string = Uom.tag "foo" """,
- marker,
- classificationType)
-
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- member __.MutableValues(marker: string, classificationType: string) =
- let sourceText ="""
-type R1 = { mutable (*1*)Doop: int}
-let r1 = { (*2*)Doop = 12 }
-r1.Doop
-
-let mutable (*3*)first = 12
-
-printfn "%d" (*4*)first
-
-let g ((*5*)xRef: outref) = (*6*)xRef <- 12
-
-let f() =
- let (*7*)second = &first
- let (*8*)third: outref = &first
- printfn "%d%d" (*9*)second (*10*)third
-
-type R = { (*11*)MutableField: int ref }
-let r = { (*12*)MutableField = ref 12 }
-r.MutableField
-r.MutableField := 3
-"""
- verifyClassificationAtEndOfMarker(sourceText, marker, classificationType)
-
-
- []
- []
- []
- []
- []
- []
- member __.NoInrefsExpected(marker: string, classificationType: string) =
- let sourceText = """
-let f (item: (*1*)inref) = printfn "%d" (*2*)item
-let g() =
- let x = 1
- let y = 2
- let (*3*)xRef = &x
- let (*4*)yRef: inref = &y
- f (*5*)&xRef
- f (*6*)&yRef
-"""
- verifyNoClassificationDataAtEndOfMarker(sourceText, marker, classificationType)
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.Tests/SyntacticColorizationServiceTests.fs b/fcs/FSharp.Compiler.Service.Tests/SyntacticColorizationServiceTests.fs
deleted file mode 100644
index 05b0d39e7a..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/SyntacticColorizationServiceTests.fs
+++ /dev/null
@@ -1,1056 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
-
-open System
-open System.Threading
-
-open NUnit.Framework
-
-open Microsoft.CodeAnalysis.Classification
-open Microsoft.CodeAnalysis
-open Microsoft.CodeAnalysis.Text
-open Microsoft.VisualStudio.FSharp.Editor
-
-[][]
-type SyntacticClassificationServiceTests() =
-
- member private this.ExtractMarkerData(fileContents: string, marker: string, defines: string list, isScriptFile: Option) =
- let textSpan = TextSpan(0, fileContents.Length)
- let fileName = if isScriptFile.IsSome && isScriptFile.Value then "test.fsx" else "test.fs"
- let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId())
- let tokens = Tokenizer.getClassifiedSpans(documentId, SourceText.From(fileContents), textSpan, Some(fileName), defines, CancellationToken.None)
- let markerPosition = fileContents.IndexOf(marker)
- Assert.IsTrue(markerPosition >= 0, "Cannot find marker '{0}' in file contents", marker)
- (tokens, markerPosition)
-
- member private this.VerifyColorizerAtStartOfMarker(fileContents: string, marker: string, defines: string list, classificationType: string, ?isScriptFile: bool) =
- let (tokens, markerPosition) = this.ExtractMarkerData(fileContents, marker, defines, isScriptFile)
- match tokens |> Seq.tryFind(fun token -> token.TextSpan.Contains(markerPosition)) with
- | None -> Assert.Fail("Cannot find colorization data for start of marker")
- | Some(classifiedSpan) -> Assert.AreEqual(classificationType, classifiedSpan.ClassificationType, "Classification data doesn't match for start of marker")
-
- member private this.VerifyColorizerAtEndOfMarker(fileContents : string, marker: string, defines: string list, classificationType: string, ?isScriptFile: bool) =
- let (tokens, markerPosition) = this.ExtractMarkerData(fileContents, marker, defines, isScriptFile)
- match tokens |> Seq.tryFind(fun token -> token.TextSpan.Contains(markerPosition + marker.Length - 1)) with
- | None -> Assert.Fail("Cannot find colorization data for end of marker")
- | Some(classifiedSpan) -> Assert.AreEqual(classificationType, classifiedSpan.ClassificationType, "Classification data doesn't match for end of marker")
-
- []
- member this.Comment_SingleLine() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- let simplefunction x y = x + y // Test1SimpleComment""",
- marker = "// Test1",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Conment_SingleLine_MultiConments() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- let x = // Test2SimpleComment // 1""",
- marker = "// Test2",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_MultiLine_AfterAnExpression() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- let mutliLine x = 5(* Test1MultiLine
- Test2MultiLine <@@asdf@@>
- Test3MultiLine*) + 1(*Test4*)""",
- marker = "Test1",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_MultiLine_WithLineBreakAndATab() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- let mutliLine x = 5(* Test1MultiLine
- Test2MultiLine <@@asdf@@>
- Test3MultiLine*) + 1(*Test4*)
- """,
- marker = "Test2",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_MultiLine_WithLineBreakAfterQuotExp() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- let mutliLine x = 5(* Test1MultiLine
- Test2MultiLine <@@asdf@@>
- Test3MultiLine*) + 1(*Test4*)
- """,
- marker = "Test3",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_MultiLine_AfterANumber() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let mutliLine x = 5(* Test1MultiLine
- Test2MultiLine <@@asdf@@>
- Test3MultiLine*) + 1(*Test4*)
- """,
- marker = "1(*Test4*)",
- defines = [],
- classificationType = ClassificationTypeNames.NumericLiteral)
-
- []
- member this.Comment_Nested_Nested01() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- (* L1Nesting
- (* L2Nesting
- (* L3 Nesting
- let l3code = 3
- *)
- let l2code = 2
- *)
- let l1code = 1
- *)
- let l0code = 0
- """,
- marker = "let l3",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_Nested_Nested02() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- (* L1Nesting
- (* L2Nesting
- (* L3 Nesting
- let l3code = 3
- *)
- let l2code = 2
- *)
- let l1code = 1
- *)
- let l0code = 0
- """,
- marker = "let l2",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_Nested_Nested03() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- (* L1Nesting
- (* L2Nesting
- (* L3 Nesting
- let l3code = 3
- *)
- let l2code = 2
- *)
- let l1code = 1
- *)
- let l0code = 0
- """,
- marker = "let l1",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_Nested_IdentAfterNestedComments() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- (* L1Nesting
- (* L2Nesting
- (* L3 Nesting
- let l3code = 3
- *)
- let l2code = 2
- *)
- let l1code = 1
- *)
- let l0code = 0
- """,
- marker = "let l0",
- defines = [],
- classificationType = ClassificationTypeNames.Identifier)
-
- []
- member this.Comment_CommentInString() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- let commentsInString = "...(*test1_comment_in_string_literal*)..."
- )""",
- marker = "test1",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.Comment_StringInComment() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = """
- (*
- let commentsInString2 = "...*)test2_stringliteral_in_comment(*..."
- *)""",
- marker = "test2",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_Unterminated_KeywordBeforeComment() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- type IPeekPoke = interface(*ML Comment Start
- abstract member Peek: unit -> int
- abstract member Poke: int -> unit
- end
- """,
- marker = "face(*ML Comment Start",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Comment_Unterminated_KeywordInComment() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- type IPeekPoke = interface(*ML Comment Start
- abstract member Peek: unit -> int
- abstract member Poke: int -> unit
- end
-
- type wodget = class
- val mutable state: int
- interface IPeekPoke with(*Few Lines Later2*)
- member x.Poke(n) = x.state <- x.state + n
- member x.Peek() = x.state
- end
- end(*Few Lines Later3*)""",
- marker = "with(*Few Lines Later2*)",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.Comment_Unterminated_NestedComments() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- type IPeekPoke = interface(*ML Comment Start
- abstract member Peek: unit -> int
- abstract member Poke: int -> unit
- end
-
- type wodget = class
- val mutable state: int
- interface IPeekPoke with(*Few Lines Later2*)
- member x.Poke(n) = x.state <- x.state + n
- member x.Peek() = x.state
- end
- member x.HasBeenPoked = (x.state <> 0)
- new() = { state = 0 }
- end(*Few Lines Later3*)""",
- marker = "nd(*Few Lines Later3*)",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
- []
- member this.String_AtEnd() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let stringone = "simple string test"(*Simple String*) """,
- marker = """est"(*Simple String*)""",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.String_MultiLines() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let stringtwo = "simple test(*MultiLine - First*)
- string test"(*MultiLine - Second*)""",
- marker = "st(*MultiLine - First*)",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.String_MultiLines_LineBreak() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let stringtwo = "simple test(*MultiLine - First*)
- string test"(*MultiLine - Second*) """,
- marker = "\"(*MultiLine - Second*) ",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.String_Literal() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let stringthree = @"literal test"(*Literal String*)""",
- marker = """st"(*Literal String*)""",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.ByteString_AtEnd() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let bytestringone = "abcdefg"B(*Byte String*)""",
- marker = "B(*Byte String*)",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.ByteString_MultiLines() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let bytestringtwo = "simple(*MultiLineB - First*)
- string"B(*MultiLineB - Second*)""",
- marker = """ing"B(*MultiLineB - Second*)""",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.ByteString_Literal() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let bytestringthree = @"literal"B(*Literal Byte*)""",
- marker = """al"B(*Literal Byte*)""",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.EscapedIdentifier_word() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""",
- marker = "this",
- defines = [],
- classificationType = ClassificationTypeNames.Identifier)
-
- []
- member this.EscapedIdentifier_SpecialChar() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""",
- marker = "3ASDF@#",
- defines = [],
- classificationType = ClassificationTypeNames.Identifier)
-
- []
- member this.EscapedIdentifier_EscapeChar() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""",
- marker = "\"``",
- defines = [],
- classificationType = ClassificationTypeNames.Identifier)
-
- /// Regression for 3609 - Colorizer: __SOURCE__ and others colorized as a string
- []
- member this.PredefinedIdentifier_SOURCE_DIRECTORY() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let x = __SOURCE_DIRECTORY__(*Test1*)""",
- marker = "__(*Test1*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.PredefinedIdentifier_SOURCE_FILE() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let y = __SOURCE_FILE__(*Test2*))""",
- marker = "__(*Test2*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.PredefinedIdentifier_LINE() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let z = __LINE__(*Test3*)""",
- marker = "__(*Test3*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- // Regression Test for FSB 3566, F# colorizer does not respect numbers
- []
- member this.Number_InAnExpression() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """let f x = x + 9""",
- marker = "9",
- defines = [],
- classificationType = ClassificationTypeNames.NumericLiteral)
-
- // Regression Test for FSB 1778 - Colorization seems to be confused after parsing a comment that contains a verbatim string that contains a \
- []
- member this.Number_AfterCommentWithBackSlash() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """let f (* @"\\" *)x = x + 19(*Marker1*)""",
- marker = "9(*Marker1*)",
- defines = [],
- classificationType = ClassificationTypeNames.NumericLiteral)
-
- // Regression Test for FSharp1.0:2539 -- lexing @"" strings inside (* *) comments?
- []
- member this.Keyword_AfterCommentWithLexingStrings() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- (*
- let x = @"\\"
- *)
-
- let(*Marker1*) y = 1
- """,
- marker = "t(*Marker1*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- // Regression Test for FSB 1380 - Language Service colorizes anything followed by a bang as a keyword
- []
- member this.Keyword_LetBang() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let seqExpr =
- seq {
- let! x = [1 .. 10](*Marker1*)
- yield! x(*Marker2*)
- do! - = ()(*Marker3*)
- }""",
- marker = "! x = [1 .. 10](*Marker1*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_Yield() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let seqExpr =
- seq {
- let! x = [1 .. 10](*Marker1*)
- yield! x(*Marker2*)
- do! - = ()(*Marker3*)
- }""",
- marker = "! x(*Marker2*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_Do() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let seqExpr =
- seq {
- let! x = [1 .. 10](*Marker1*)
- yield! x(*Marker2*)
- do! - = ()(*Marker3*)
- }""",
- marker = "! - = ()(*Marker3*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_Invalid_Bang() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let seqExpr =
- seq {
- foo! = true(*Marker1*)
- }""",
- marker = "! = true(*Marker1*)",
- defines = [],
- classificationType = ClassificationTypeNames.Identifier)
-
- []
- []
- []
- //This test case Verify that the color of const is the keyword color
- member this.TypeProvider_StaticParameters_Keyword_const() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- type foo = N1.T< const(*Marker1*) "Hello World",2>""",
- marker = "t(*Marker1*)",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- // Regression test for FSB 3696 - Colorization doesn't treat #if/else/endif correctly when embedded in a string literal
- []
- member this.PreProcessor_InStringLiteral01() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED
- let x = "#elseMarker1"
- let y = "#endifMarker2"
- #else//Marker3
- let x = "#elseMarker4"
- let y = "#endifMarker5"
- #endif""",
- marker = "eMarker1",
- defines = [],
- classificationType = ClassificationTypeNames.ExcludedCode)
-
- []
- member this.PreProcessor_InStringLiteral02() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED
- let x = "#elseMarker1"
- let y = "#endifMarker2"
- #else//Marker3
- let x = "#elseMarker4"
- let y = "#endifMarker5"
- #endif""",
- marker = "fMarker2",
- defines = [],
- classificationType = ClassificationTypeNames.ExcludedCode)
-
- []
- member this.PreProcessor_ElseKeyword() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED
- let x = "#elseMarker1"
- let y = "#endifMarker2"
- #else//Marker3
- let x = "#elseMarker4"
- let y = "#endifMarker5"
- #endif""",
- marker = "e//Marker3",
- defines = [],
- classificationType = ClassificationTypeNames.PreprocessorKeyword)
-
- []
- member this.PreProcessor_InStringLiteral03() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED
- let x = "#elseMarker1"
- let y = "#endifMarker2"
- #else//Marker3
- let x = "#elseMarker4"
- let y = "#endifMarker5"
- #endif""",
- marker = "eMarker4",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- []
- member this.PreProcessor_InStringLiteral04() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED
- let x = "#elseMarker1"
- let y = "#endifMarker2"
- #else//Marker3
- let x = "#elseMarker4"
- let y = "#endifMarker5"
- #endif""",
- marker = "fMarker5",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
- // Regression test for FSHARP1.0:4279
- []
- member this.Keyword_OCaml_asr() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(asr, b) -> ()
- |_ -> ()""",
- marker = "asr",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_land() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(land, b) -> ()
- |_ -> ()""",
- marker = "land",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_lor() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(lor, b) -> ()
- |_ -> ()""",
- marker = "lor",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_lsl() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(lsl, b) -> ()
- |_ -> ()""",
- marker = "lsl",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_lsr() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(lsr, b) -> ()
- |_ -> ()""",
- marker = "lsr",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_lxor() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(lxor, b) -> ()
- |_ -> ()""",
- marker = "lxor",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_mod() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(mod, b) -> ()
- |_ -> ()""",
- marker = "mod",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- member this.Keyword_OCaml_sig() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- let foo a =
- match a with
- | Some(sig, b) -> ()
- |_ -> ()""",
- marker = "sig",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- member this.InactiveCode(marker: string, classificationType: string) =
- let fileContents = """
- #if UNDEFINED
- (*Inactive Code1*)let notLegit1 x = x
- #else
- #if UNDEFINED
- (*Inactive Code2*)let notLegit2 x = x
- #else
- #if UNDEFINED
- (*Inactive Code3*)let notLegit3 x = x
- #else
- #if UNDEFINED
- (*Inactive Code4*)let notLegit4 x = x
- #else
- #if UNDEFINED
- (*Inactive Code5*)let notLegit5 x = x
- #else
- (*Active Code5*)let legitCode5 x = x
- #endif
- (*Active Code4*)let legitCode4 x = x
- #endif
- (*Active Code3*)let legitCode3 x = x
- #endif
-
- (*Active Code2*)let legitCode2 x = x
- #endif
- (*Active Code1*)let legitCode1 x = x
- #endif
-
- #if DEFINED
- (*Active Code6*)let legitCode6 x = x
- #if DEFINED
- (*Active Code7*)let legitCode7 x = x
- #else
- (*Inactive Code7*)let notLegit7 x = x
- #endif
- #else
- (*Inactive Code6*)let notLegit6 x = x
- #endif
- """
-
- this.VerifyColorizerAtEndOfMarker(fileContents, marker, ["DEFINED"], classificationType)
-
-
- []
- member public this.Colorizer_AtString() =
- this.VerifyColorizerAtEndOfMarker("let s = @\"Bob\"",
- marker = "let s = @\"B",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
-
- []
- []
- []
- member public this.Regression_Bug4860(marker: string, classificationType: string) =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = "
- let x = __SOURCE_DIRECTORY__(*Test1*)
- let y = __SOURCE_FILE__(*Test2*)
- let z = __LINE__(*Test3*)",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- member public this.Number_Regression_Bug3566(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "let n = 123
- let l = [12..15]
- let l2 = [12 .. 15]
- let l3 = [ 12 .. 15 ]
- // comment1: 1234
- (* comment2: 1234 *)
- let other = 0x4, 0b0100, 4L, 4UL, 4u, 4s, 4us, 4y, 4uy, 4.0, 4.0f, 4N, 4I, 1M, 123",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- /// FEATURE: Hash commands in .fsx files are colorized in PreprocessorKeyword color
- []
- member public this.Preprocessor_InFsxFile_StartOfMarker(marker: string, classificationType: string) =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#reference @\"\"
- #load @\"\"
- #I <--hash I
- #time @\"\"",
- marker = marker,
- defines = [],
- classificationType = classificationType,
- isScriptFile = true)
-
-
- /// FEATURE: Hash commands in .fsx files are colorized in PreprocessorKeyword color
- []
- []
- []
- member public this.Preprocessor_InFsxFile_EndOfMarker(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "#reference @\"\"
- #load @\"\"
- #I <--hash I
- #time @\"\"",
- marker = marker,
- defines = [],
- classificationType = classificationType,
- isScriptFile = true)
-
-
- /// FEATURE: Script-specific hash commands do not show up in blue in .fs files.
- []
- member public this.Preprocessor_InFsFile_StartOfMarker(marker: string, classificationType: string) =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#reference @\"\"
- #load @\"\"
- #I <--hash I
- #time @\"\"",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- /// FEATURE: Script-specific hash commands do not show up in blue in .fs files.
- []
- []
- []
- member public this.Preprocessor_InFsFile_EndOfMarker(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "#reference @\"\"
- #load @\"\"
- #I <--hash I
- #time @\"\"",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
- /// FEATURE: Nested (* *) comments are allowed and will be colorized with CommentColor. Only the final *) causes the comment to close.
- []
- []
- []
- member public this.Comment_AfterCommentBlock(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "(*Bob*)type Bob() = class end
- (*
- (*
- (*Alice*)type Alice() = class end
- *)
- *)
- (*Charles*)type Charles() = class end",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- /// BUG: The comment used to be colored in black.
- []
- member public this.Regression_Bug1596() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = " let 2d (* Identifiers cannot start with numbers *)",
- marker = "let 2d (* Ide",
- defines = [],
- classificationType = ClassificationTypeNames.Comment)
-
-
- /// FEATURE: Code inside #if\#else\#endif blocks is colored with InactiveCodeColor depending on defines. This works for nested #if blocks as well.
- []
- []
- []
- []
- []
- []
- member public this.Preprocessor_AfterPreprocessorBlock(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "(*Bob*)type Bob() = class end
- #if UNDEFINED
- #if UNDEFINED
- (*Alice*)type Alice() = class end
- #else
- (*Tom*)type Tom() = class end
- #endif
- #else
- #if UNDEFINED
- (*Maurice*)type Maurice() = class end
- #else
- (*Larry*)type Larry() = class end
- #endif
- #endif
- (*Charles*)type Charles() = class end",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- // Wrong "#else" in "#if" should be ignored
- []
- []
- member public this.Preprocessor_InvalidElseDirectiveIgnored(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "#if UNDEFINED
- (*Alice*)type Alice() = class end
- (**) #else
- (*Larry*)type Larry() = class end
- #endif",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- /// FEATURE: Code inside #if\#else\#endif blocks is colored with InactiveCodeColor depending on defines. This works for nested #if blocks as well.
- []
- []
- []
- []
- []
- []
- member public this.Preprocessor_AfterPreprocessorBlockWithDefines(marker: string, classificationType: string) =
- this.VerifyColorizerAtEndOfMarker(
- fileContents =
- "(*Bob*)type Bob() = class end
- #if UNDEFINED
- #if UNDEFINED
- (*Alice*)type Alice() = class end
- #else
- (*Tom*)type Tom() = class end
- #endif
- #else
- #if UNDEFINED
- (*Maurice*)type Maurice() = class end
- #else
- (*Larry*)type Larry() = class end
- #endif
- #endif
- (*Charles*)type Charles() = class end",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- /// FEATURE: Preprocessor keywords #light\#if\#else\#endif are colored with the PreprocessorKeyword color.
- /// FEATURE: All code in the inactive side of #if\#else\#endif is colored with with InactiveCode color.
- []
- []
- []
- []
- []
- []
- []
- []
- []
- []
- member public this.Preprocessor_Keywords(marker: string, classificationType: string) =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#light (*Light*)
- #if UNDEFINED //(*If*)
- let x = 1(*Inactive*)
- #else //(*Else*)
- let(*Active*) x = 1
- #endif //(*Endif*)",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- /// FEATURE: Preprocessor extended grammar basic check.
- /// FEATURE: More extensive grammar test is done in compiler unit tests
- []
- member public this.Preprocesso_ExtendedIfGrammar_Basic01() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED || !UNDEFINED // Extended #if
- let x = "activeCode"
- #else
- let x = "inactiveCode"
- #endif
- """,
- marker = "activeCode",
- defines = [],
- classificationType = ClassificationTypeNames.StringLiteral)
-
-
- []
- member public this.Preprocessor_ExtendedIfGrammar_Basic02() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents = """
- #if UNDEFINED || !UNDEFINED // Extended #if
- let x = "activeCode"
- #else
- let x = "inactiveCode"
- #endif
- """,
- marker = "inactiveCode",
- defines = [],
- classificationType = ClassificationTypeNames.ExcludedCode)
-
-
- /// #else / #endif in multiline strings is ignored
- []
- member public this.Preprocessor_DirectivesInString() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#light
-
- #if DEFINED
- let s = \"
- #else
- \"
- let testme = 1
- #endif",
- marker = "let testme",
- defines = ["DEFINED"],
- classificationType = ClassificationTypeNames.Keyword)
-
-
- /// Bug 2076 - String literals were causing the endif stack information to be discarded
- []
- []
- []
- member public this.Preprocessor_KeywordsWithStrings(marker: string, classificationType: string) =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#light (*Light*)
- let x1 = \"string1\"
- #if UNDEFINED //(*If*)
- let x2 = \"string2\"
- #else //(*Else*)
- let x3 = \"string3\"
- #endif //(*Endif*)
- let x4 = \"string4\"",
- marker = marker,
- defines = [],
- classificationType = classificationType)
-
-
- []
- member public this.Comment_VerbatimStringInComment_Bug1778() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#light
- (* @\"\\\" *) let a = 0",
- marker = "le",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
-
-
- []
- member public this.Preprocessor_KeywordsWrongIf_Bug1577() =
- this.VerifyColorizerAtStartOfMarker(
- fileContents =
- "#if !!!!!!!!!!!!!!!COMPILED
- #endif",
- marker = "!!COMPILED",
- defines = [],
- classificationType = ClassificationTypeNames.Identifier)
-
-
- // This was an off-by-one bug in the replacement Colorizer
- []
- member public this.Keyword_LastCharacterOfKeyword() =
- this.VerifyColorizerAtEndOfMarker(
- fileContents = "(*Bob*)type Bob() = int",
- marker = "(*Bob*)typ",
- defines = [],
- classificationType = ClassificationTypeNames.Keyword)
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.Tests/app.runsettings b/fcs/FSharp.Compiler.Service.Tests/app.runsettings
deleted file mode 100644
index 009d9b6977..0000000000
--- a/fcs/FSharp.Compiler.Service.Tests/app.runsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- 1
-
-
-
diff --git a/fcs/FSharp.Compiler.Service.sln b/fcs/FSharp.Compiler.Service.sln
deleted file mode 100644
index 03f557f601..0000000000
--- a/fcs/FSharp.Compiler.Service.sln
+++ /dev/null
@@ -1,143 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29418.71
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{B6B68AE6-E7A4-4D43-9B34-FFA74BFE192B}"
- ProjectSection(SolutionItems) = preProject
- build.cmd = build.cmd
- build.fsx = build.fsx
- build.sh = build.sh
- paket.dependencies = paket.dependencies
- README.md = README.md
- RELEASE_NOTES.md = RELEASE_NOTES.md
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docsrc", "docsrc", "{83FEE492-6701-4E59-9184-16B1D30E91F8}"
- ProjectSection(SolutionItems) = preProject
- docsrc\content\caches.fsx = docsrc\content\caches.fsx
- docsrc\content\corelib.fsx = docsrc\content\corelib.fsx
- docsrc\content\devnotes.md = docsrc\content\devnotes.md
- docsrc\content\editor.fsx = docsrc\content\editor.fsx
- docsrc\content\filesystem.fsx = docsrc\content\filesystem.fsx
- docsrc\content\fsharp-readme.md = docsrc\content\fsharp-readme.md
- docsrc\content\index.md = docsrc\content\index.md
- docsrc\content\interactive.fsx = docsrc\content\interactive.fsx
- docsrc\content\project.fsx = docsrc\content\project.fsx
- docsrc\content\queue.fsx = docsrc\content\queue.fsx
- docsrc\content\symbols.fsx = docsrc\content\symbols.fsx
- docsrc\content\tokenizer.fsx = docsrc\content\tokenizer.fsx
- docsrc\content\typedtree.fsx = docsrc\content\typedtree.fsx
- docsrc\content\untypedtree.fsx = docsrc\content\untypedtree.fsx
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0554567F-1DCB-46A5-9EF2-E1938A3D4F14}"
- ProjectSection(SolutionItems) = preProject
- docsrc\tools\generate.fsx = docsrc\tools\generate.fsx
- docsrc\tools\templates\template.cshtml = docsrc\tools\templates\template.cshtml
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E396742E-B4E5-4584-A9E4-CC1A491F5BC1}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "EditorService", "samples\EditorService\EditorService.fsproj", "{A40507D6-FA48-43D3-B18A-AE3DAACE4020}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "InteractiveService", "samples\InteractiveService\InteractiveService.fsproj", "{067E95E5-E3DC-4CA7-813A-4D1E277D2D52}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tokenizer", "samples\Tokenizer\Tokenizer.fsproj", "{92793069-816F-4F69-84AC-0966F8275E65}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "UntypedTree", "samples\UntypedTree\UntypedTree.fsproj", "{C816728D-BBEA-472D-9F6C-E8913957A673}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharp_Analysis", "FSharp.Compiler.Service.Tests\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{098D1C35-D0FB-4720-83DD-8002293EA237}"
- ProjectSection(SolutionItems) = preProject
- .gitattributes = .gitattributes
- .gitignore = .gitignore
- .travis.yml = .travis.yml
- appveyor.yml = appveyor.yml
- NuGet.Config = NuGet.Config
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{9020E136-794A-473F-9B1B-9623C97B7161}"
- ProjectSection(SolutionItems) = preProject
- nuget\FSharp.Compiler.Service.template = nuget\FSharp.Compiler.Service.template
- EndProjectSection
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.MSBuild.v12", "FSharp.Compiler.Service.MSBuild.v12\FSharp.Compiler.Service.MSBuild.v12.fsproj", "{8157B50E-397D-4232-A4E0-1977AFC7076D}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
-EndProject
-Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}"
-EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.DependencyManager.Nuget", "..\src\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj", "{C75A2B88-DA11-4DF7-826F-92E6CDBA47BD}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020}.Release|Any CPU.Build.0 = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52}.Release|Any CPU.Build.0 = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {92793069-816F-4F69-84AC-0966F8275E65}.Release|Any CPU.Build.0 = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.Build.0 = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0 = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.Build.0 = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F9540CA8-1CE0-4546-A23A-A461E416E95B}.Release|Any CPU.Build.0 = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8157B50E-397D-4232-A4E0-1977AFC7076D}.Release|Any CPU.Build.0 = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
- {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.Build.0 = Release|Any CPU
- {C75A2B88-DA11-4DF7-826F-92E6CDBA47BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C75A2B88-DA11-4DF7-826F-92E6CDBA47BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C75A2B88-DA11-4DF7-826F-92E6CDBA47BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C75A2B88-DA11-4DF7-826F-92E6CDBA47BD}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {0554567F-1DCB-46A5-9EF2-E1938A3D4F14} = {83FEE492-6701-4E59-9184-16B1D30E91F8}
- {A40507D6-FA48-43D3-B18A-AE3DAACE4020} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {067E95E5-E3DC-4CA7-813A-4D1E277D2D52} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {92793069-816F-4F69-84AC-0966F8275E65} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {C816728D-BBEA-472D-9F6C-E8913957A673} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {C94C257C-3C0A-4858-B5D8-D746498D1F08} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- {F9540CA8-1CE0-4546-A23A-A461E416E95B} = {E396742E-B4E5-4584-A9E4-CC1A491F5BC1}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {9E9BAC7B-3834-497C-B7AC-6B7988778D1A}
- EndGlobalSection
-EndGlobal
diff --git a/fcs/FSharp.Compiler.Service.sln.DotSettings b/fcs/FSharp.Compiler.Service.sln.DotSettings
deleted file mode 100644
index 59e0b85499..0000000000
--- a/fcs/FSharp.Compiler.Service.sln.DotSettings
+++ /dev/null
@@ -1,780 +0,0 @@
-
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True~
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service/.gitignore b/fcs/FSharp.Compiler.Service/.gitignore
deleted file mode 100644
index 722f2e9b83..0000000000
--- a/fcs/FSharp.Compiler.Service/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-net4*/
-netstandard*/
diff --git a/fcs/FSharp.Compiler.Service/AssemblyInfo.fs b/fcs/FSharp.Compiler.Service/AssemblyInfo.fs
deleted file mode 100644
index 90521fefd5..0000000000
--- a/fcs/FSharp.Compiler.Service/AssemblyInfo.fs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-namespace Microsoft.FSharp
-open System.Reflection
-open System.Runtime.InteropServices
-
-[]
-[]
-[]
-[]
-[]
-[]
-
-#if NO_STRONG_NAMES
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[