Skip to content

Commit 6091711

Browse files
authored
Integrate dotnet/fsharp from 25560f4 to 5a8f454 (#907)
Integrate dotnet/fsharp from 25560f4 to 5a8f454 This syncs up the repositories as of 6-28 and includes a variety of changes around performance improvements FCS APIs for FSComp and Implement Interface line directive handling improved performance when computing quickfix suggestions This was a relatively straightforward merge, but as a result of fslex/fsyacc building against the local-repo version of FSharp.Core I had to re-include FSharp.Core directories into this repo.
2 parents 17ad2ae + ca0f175 commit 6091711

File tree

226 files changed

+56459
-3966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+56459
-3966
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ tests/fsharpqa/Source/*FSharpQA_Failures.env
183183
tests/fsharpqa/Source/*FSharpQA_Failures.lst
184184
*.csproj.user
185185
*.fsproj.user
186+
*.vbproj.user
186187
*.sln.DotSettings.user
187188
*.log
188189
*.jrs
@@ -233,4 +234,4 @@ msbuild.binlog
233234
/fcs/FSharp.Compiler.Service.netstandard/*.fsi
234235

235236
.ionide
236-
.vscode
237+
.vscode

FSharpBuild.Directory.Build.targets

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,30 @@
55
<Import Project="eng\targets\NGenBinaries.targets" />
66
<Import Project="FSharp.Profiles.props" />
77

8-
<Target Name="CopyAndSubstituteTextFiles"
9-
Inputs="@(CopyAndSubstituteText)"
10-
Outputs="@(CopyAndSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
11-
BeforeTargets="BeforeBuild">
8+
<Target Name="NoneSubstituteTextFiles"
9+
Inputs="@(NoneSubstituteText)"
10+
Outputs="@(NoneSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
11+
BeforeTargets="AssignTargetPaths;BeforeBuild">
1212

1313
<PropertyGroup>
14-
<__TargetFilePath>@(CopyAndSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')</__TargetFilePath>
15-
<__TargetFileName>@(CopyAndSubstituteText->'%(Filename)%(Extension)')</__TargetFileName>
14+
<__TargetFilePath>@(NoneSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')</__TargetFilePath>
15+
<__TargetFileName>@(NoneSubstituteText->'%(Filename)%(Extension)')</__TargetFileName>
1616

17-
<_ReplacementText>$([System.IO.File]::ReadAllText('%(CopyAndSubstituteText.FullPath)'))</_ReplacementText>
18-
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern1)', '%(CopyAndSubstituteText.Replacement1)'))</_ReplacementText>
19-
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern2)', '%(CopyAndSubstituteText.Replacement2)'))</_ReplacementText>
17+
<_ReplacementText>$([System.IO.File]::ReadAllText('%(NoneSubstituteText.FullPath)'))</_ReplacementText>
18+
<_ReplacementText Condition="'%(NoneSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern1)', '%(NoneSubstituteText.Replacement1)'))</_ReplacementText>
19+
<_ReplacementText Condition="'%(NoneSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern2)', '%(NoneSubstituteText.Replacement2)'))</_ReplacementText>
20+
21+
<_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' != ''">%(NoneSubstituteText.CopyToOutputDirectory)</_CopyToOutputDirectory>
22+
<_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' == ''">Never</_CopyToOutputDirectory>
2023
</PropertyGroup>
2124

22-
<MakeDir
23-
Directories="$(IntermediateOutputPath)"
24-
Condition="!Exists('$(IntermediateOutputPath)')" />
25+
<MakeDir Directories="$(IntermediateOutputPath)"
26+
Condition="!Exists('$(IntermediateOutputPath)')" />
2527
<WriteLinesToFile File="$(__TargetFilePath)" Lines="$(_ReplacementText)" Overwrite="true" WriteOnlyWhenDifferent="true" />
2628

2729
<!-- Make sure it will get cleaned -->
2830
<ItemGroup >
29-
<None Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' == 'App.config'" CopyToOutputDirectory="Never" />
30-
<None Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' != 'App.config'" CopyToOutputDirectory="PreserveNewest" />
31+
<None Include="$(__TargetFilePath)" CopyToOutputDirectory="$(_CopyToOutputDirectory)" />
3132
<FileWrites Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' != 'App.config'" />
3233
</ItemGroup>
3334
</Target>

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,34 @@ Stable builds are available in the NuGet Gallery:
6161

6262
All AppVeyor builds are available using the NuGet feed: https://ci.appveyor.com/nuget/fsgit-fsharp-compiler-service
6363

64-
If using Paket, add the source at the top of `paket.dependencies`.
64+
* [The F# Compiler Technical Guide](https://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html)
65+
* [The F# Language Specification](https://fsharp.org/specs/language-spec/)
6566

6667
## License
6768

68-
This project is subject to the MIT License. A copy of this license can be found in [License.txt](License.txt) at the root of this repo.
69+
This project is subject to the MIT License. A copy of this license is in [License.txt](License.txt).
6970

70-
## Maintainers
71+
## Code of Conduct
72+
73+
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).
74+
75+
## Get In Touch
76+
77+
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.
78+
79+
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.
7180

7281
The maintainers of this repository are:
7382

7483
- [Don Syme](http://github.com/dsyme)
7584
- [Tomas Petricek](http://github.com/tpetricek)
7685
- [Enrico Sada](http://github.com/enricosada)
7786
- [Chet Husk](http://github.com/baronfel)
78-
- 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
87+
- 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
88+
89+
## About F\#
90+
91+
* [What is F#](https://docs.microsoft.com/dotnet/fsharp/what-is-fsharp)
92+
* [Get started with F#](https://docs.microsoft.com/dotnet/fsharp/get-started/)
93+
* [F# Software Foundation](https://fsharp.org)
94+
* [F# Testimonials](https://fsharp.org/testimonials)

RoslynPackageVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0-beta4-19170-01
1+
3.1.0-beta3-19222-02

eng/Build.ps1

Lines changed: 62 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ param (
5353
[switch]$testVs,
5454
[switch]$testAll,
5555
[string]$officialSkipTests = "false",
56+
[switch]$noVisualStudio,
5657

5758
[parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
5859

@@ -95,6 +96,7 @@ function Print-Usage() {
9596
Write-Host " -procdump Monitor test runs with procdump"
9697
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
9798
Write-Host " -useGlobalNuGetCache Use global NuGet cache."
99+
Write-Host " -noVisualStudio Only build fsc and fsi as .NET Core applications. No Visual Studio required. '-configuration', '-verbosity', '-norestore', '-rebuild' are supported."
98100
Write-Host ""
99101
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
100102
}
@@ -143,8 +145,19 @@ function Process-Arguments() {
143145
}
144146

145147
function Update-Arguments() {
146-
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc.exe")) {
147-
$script:bootstrap = $True
148+
if ($script:noVisualStudio) {
149+
$script:bootstrapTfm = "netcoreapp2.1"
150+
$script:msbuildEngine = "dotnet"
151+
}
152+
153+
if ($bootstrapTfm -eq "netcoreapp2.1") {
154+
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
155+
$script:bootstrap = $True
156+
}
157+
} else {
158+
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.exe") -or (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
159+
$script:bootstrap = $True
160+
}
148161
}
149162
}
150163

@@ -226,10 +239,37 @@ function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
226239
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject)
227240
$testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
228241
$testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
229-
$args = "test $testProject --no-restore --no-build -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
242+
$args = "test $testProject -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
243+
244+
if (-not $noVisualStudio -or $norestore) {
245+
$args += " --no-restore"
246+
}
247+
248+
if (-not $noVisualStudio) {
249+
$args += " --no-build"
250+
}
251+
230252
Exec-Console $dotnetExe $args
231253
}
232254

255+
function BuildCompiler() {
256+
if ($bootstrapTfm -eq "netcoreapp2.1") {
257+
$dotnetPath = InitializeDotNetCli
258+
$dotnetExe = Join-Path $dotnetPath "dotnet.exe"
259+
$fscProject = "$RepoRoot\src\fsharp\fsc\fsc.fsproj"
260+
$fsiProject = "$RepoRoot\src\fsharp\fsi\fsi.fsproj"
261+
262+
$argNoRestore = if ($norestore) { " --no-restore" } else { "" }
263+
$argNoIncremental = if ($rebuild) { " --no-incremental" } else { "" }
264+
265+
$args = "build $fscProject -c $configuration -v $verbosity -f netcoreapp2.1" + $argNoRestore + $argNoIncremental
266+
Exec-Console $dotnetExe $args
267+
268+
$args = "build $fsiProject -c $configuration -v $verbosity -f netcoreapp2.1" + $argNoRestore + $argNoIncremental
269+
Exec-Console $dotnetExe $args
270+
}
271+
}
272+
233273
function Prepare-TempDir() {
234274
Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.props") $TempDir
235275
Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.targets") $TempDir
@@ -258,7 +298,11 @@ try {
258298
}
259299

260300
if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish) {
261-
BuildSolution
301+
if ($noVisualStudio) {
302+
BuildCompiler
303+
} else {
304+
BuildSolution
305+
}
262306
}
263307

264308
if ($build) {
@@ -268,21 +312,23 @@ try {
268312
$desktopTargetFramework = "net472"
269313
$coreclrTargetFramework = "netcoreapp2.1"
270314

271-
if ($testDesktop) {
315+
if ($testDesktop -and -not $noVisualStudio) {
272316
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
317+
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.LanguageServer.UnitTests\FSharp.Compiler.LanguageServer.UnitTests.fsproj" -targetFramework $desktopTargetFramework
273318
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework
274319
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
275320
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
276321
}
277322

278323
if ($testCoreClr) {
279324
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
325+
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.LanguageServer.UnitTests\FSharp.Compiler.LanguageServer.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
280326
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
281327
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
282328
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
283329
}
284330

285-
if ($testFSharpQA) {
331+
if ($testFSharpQA -and -not $noVisualStudio) {
286332
Push-Location "$RepoRoot\tests\fsharpqa\source"
287333
$resultsRoot = "$ArtifactsDir\TestResults\$configuration"
288334
$resultsLog = "test-net40-fsharpqa-results.log"
@@ -301,21 +347,27 @@ try {
301347
}
302348

303349
if ($testFSharpCore) {
304-
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
350+
if (-not $noVisualStudio) {
351+
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
352+
}
305353
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
306354
}
307355

308356
if ($testCompiler) {
309-
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
357+
if (-not $noVisualStudio) {
358+
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
359+
}
310360
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
311361
}
312362

313363
if ($testCambridge) {
314-
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
364+
if (-not $noVisualStudio) {
365+
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
366+
}
315367
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
316368
}
317369

318-
if ($testVs) {
370+
if ($testVs -and -not $noVisualStudio) {
319371
TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\GetTypesVS.UnitTests\GetTypesVS.UnitTests.fsproj" -targetFramework $desktopTargetFramework
320372
TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework
321373
}

eng/Signing.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
3+
<ItemGroup>
4+
<FileSignInfo Include="Nerdbank.Streams.dll" CertificateName="None" />
5+
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="None" />
6+
</ItemGroup>
7+
8+
</Project>

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19264.13">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19323.4">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b</Sha>
8+
<Sha>9946534da4f73e6242ca105f6798ab58119c9ab0</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

0 commit comments

Comments
 (0)