Skip to content

Commit c8d34ea

Browse files
authored
Merge pull request #928 from baronfel/integrate
Integrate more dotnet/fsharp changes
2 parents ff4d182 + 21fc7b6 commit c8d34ea

File tree

96 files changed

+3681
-1412
lines changed

Some content is hidden

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

96 files changed

+3681
-1412
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ The maintainers of this repository are:
9393
* [Get started with F#](https://docs.microsoft.com/dotnet/fsharp/get-started/)
9494
* [F# Software Foundation](https://fsharp.org)
9595
* [F# Testimonials](https://fsharp.org/testimonials)
96+

clean.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#! /usr/bin/env bash
2+
3+
DEAD_DIRS=(
4+
"azure-pipelines.yml"
5+
"DEVGUIDE.md"
6+
"eng/common/templates"
7+
"FSharp.sln"
8+
"src/fsharp/fsc/fsc.fsproj"
9+
"src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec"
10+
"src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj"
11+
"src/fsharp/fsi/fsi.fsproj"
12+
"src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj"
13+
"src/fsharp/Interactive.DependencyManager/xlf"
14+
"src/fsharp/xlf"
15+
"TESTGUIDE.md"
16+
"tests/EndToEndBuildTests"
17+
"tests/FSharp.Compiler.Private.Scripting.UnitTests"
18+
"tests/FSharp.Compiler.UnitTests"
19+
"tests/FSharp.Core.UnitTests"
20+
"tests/fsharp/Compiler"
21+
"tests/fsharp/conformance"
22+
"tests/fsharp/core"
23+
"tests/fsharp/test-framework.fs"
24+
"tests/fsharp/tests.fs"
25+
"tests/fsharp/typecheck"
26+
"tests/fsharpqa"
27+
"VisualFSharp.sln"
28+
"vsintegration"
29+
)
30+
31+
git rm -rf --ignore-unmatch ${DEAD_DIRS[*]}

eng/Build.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
256256
$args += " --no-build"
257257
}
258258

259+
if ($env:RunningAsPullRequest -ne "true") {
260+
$args += " --filter TestCategory!=PullRequest"
261+
}
262+
259263
Exec-Console $dotnetExe $args
260264
}
261265

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.20077.3">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20113.5">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>69a67461460d99125742d5c2dd94dad83add84a3</Sha>
8+
<Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/Versions.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
<SystemThreadingThreadPoolVersion>4.3.0</SystemThreadingThreadPoolVersion>
9797
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
9898
<SystemBuffersVersion>4.5.0</SystemBuffersVersion>
99+
<SystemMemoryVersion>4.5.3</SystemMemoryVersion>
99100
<!-- Roslyn packages -->
100101
<MicrosoftCodeAnalysisEditorFeaturesVersion>$(RoslynVersion)</MicrosoftCodeAnalysisEditorFeaturesVersion>
101102
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>$(RoslynVersion)</MicrosoftCodeAnalysisEditorFeaturesTextVersion>

eng/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,15 @@ function TestUsingNUnit() {
181181
exit 1
182182
fi
183183

184+
filterArgs=""
185+
if [[ "${RunningAsPullRequest:-}" != "true" ]]; then
186+
filterArgs=" --filter TestCategory!=PullRequest"
187+
fi
188+
184189
projectname=$(basename -- "$testproject")
185190
projectname="${projectname%.*}"
186191
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
187-
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\""
192+
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\"$filterArgs"
188193
"$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
189194
}
190195

fcs/FSharp.Compiler.Service.Tests/SemanticColorizationServiceTests.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type SemanticClassificationServiceTests() =
3030
let checker = FSharpChecker.Create()
3131
let perfOptions = { LanguageServicePerformanceOptions.Default with AllowStaleCompletionResults = false }
3232

33-
let getRanges (source: string) : (Range.range * SemanticClassificationType) list =
33+
let getRanges (source: string) : struct (Range.range * SemanticClassificationType) list =
3434
asyncMaybe {
3535

3636
let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, 0, SourceText.From(source), projectOptions, perfOptions, "")
@@ -45,7 +45,7 @@ type SemanticClassificationServiceTests() =
4545
let ranges = getRanges fileContents
4646
let line = text.Lines.GetLinePosition (fileContents.IndexOf(marker) + marker.Length - 1)
4747
let markerPos = Range.mkPos (Range.Line.fromZ line.Line) (line.Character + marker.Length - 1)
48-
match ranges |> List.tryFind (fun (range, _) -> Range.rangeContainsPos range markerPos) with
48+
match ranges |> List.tryFind (fun struct (range, _) -> Range.rangeContainsPos range markerPos) with
4949
| None -> Assert.Fail("Cannot find colorization data for end of marker")
5050
| Some(_, ty) -> Assert.AreEqual(classificationType, FSharpClassificationTypes.getClassificationTypeName ty, "Classification data doesn't match for end of marker")
5151

@@ -54,7 +54,7 @@ type SemanticClassificationServiceTests() =
5454
let ranges = getRanges fileContents
5555
let line = text.Lines.GetLinePosition (fileContents.IndexOf(marker) + marker.Length - 1)
5656
let markerPos = Range.mkPos (Range.Line.fromZ line.Line) (line.Character + marker.Length - 1)
57-
let anyData = ranges |> List.exists (fun (range, sct) -> Range.rangeContainsPos range markerPos && ((FSharpClassificationTypes.getClassificationTypeName sct) = classificationType))
57+
let anyData = ranges |> List.exists (fun struct (range, sct) -> Range.rangeContainsPos range markerPos && ((FSharpClassificationTypes.getClassificationTypeName sct) = classificationType))
5858
Assert.False(anyData, "Classification data was found when it wasn't expected.")
5959

6060
[<TestCase("(*1*)", FSharpClassificationTypes.ValueType)>]

fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
<EmbeddedText Include="$(FSharpSourcesRoot)\fsharp\FSComp.txt">
5050
<Link>FSComp.txt</Link>
5151
</EmbeddedText>
52+
<EmbeddedText Include="$(FSharpSourcesRoot)\fsharp\Interactive.DependencyManager\InteractiveDependencyManager.txt">
53+
<Link>InteractiveDependencyManager.txt</Link>
54+
</EmbeddedText>
5255
<EmbeddedText Include="$(FSharpSourcesRoot)\fsharp\fsi\FSIstrings.txt">
5356
<Link>FSIstrings.txt</Link>
5457
</EmbeddedText>
@@ -522,11 +525,11 @@
522525
<Compile Include="$(FSharpSourcesRoot)/fsharp/DotNetFrameworkDependencies.fs">
523526
<Link>Driver\DotNetFrameworkDependencies.fs</Link>
524527
</Compile>
525-
<Compile Include="$(FSharpSourcesRoot)/fsharp/DependencyManager.Integration.fsi">
526-
<Link>Driver/DependencyManager.Integration.fsi</Link>
528+
<Compile Include="$(FSharpSourcesRoot)/fsharp/Interactive.DependencyManager/DependencyManager.fsi">
529+
<Link>Driver/DependencyManager.fsi</Link>
527530
</Compile>
528-
<Compile Include="$(FSharpSourcesRoot)/fsharp/DependencyManager.Integration.fs">
529-
<Link>Driver/DependencyManager.Integration.fs</Link>
531+
<Compile Include="$(FSharpSourcesRoot)/fsharp/Interactive.DependencyManager/DependencyManager.fs">
532+
<Link>Driver/DependencyManager.fs</Link>
530533
</Compile>
531534
<Compile Include="$(FSharpSourcesRoot)/fsharp/CompileOps.fsi">
532535
<Link>Driver/CompileOps.fsi</Link>
@@ -576,6 +579,18 @@
576579
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\Reactor.fs">
577580
<Link>Service/Reactor.fs</Link>
578581
</Compile>
582+
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\SemanticClassification.fsi">
583+
<Link>Service/SemanticClassification.fsi</Link>
584+
</Compile>
585+
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\SemanticClassification.fs">
586+
<Link>Service/SemanticClassification.fs</Link>
587+
</Compile>
588+
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ItemKey.fsi">
589+
<Link>Service/ItemKey.fsi</Link>
590+
</Compile>
591+
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ItemKey.fs">
592+
<Link>Service/ItemKey.fs</Link>
593+
</Compile>
579594
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\IncrementalBuild.fsi">
580595
<Link>Service/IncrementalBuild.fsi</Link>
581596
</Compile>
@@ -636,7 +651,7 @@
636651
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ExternalSymbol.fs">
637652
<Link>Service/ExternalSymbol.fs</Link>
638653
</Compile>
639-
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\QuickParse.fsi">
654+
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\QuickParse.fsi">
640655
<Link>Service/QuickParse.fsi</Link>
641656
</Compile>
642657
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\QuickParse.fs">
@@ -684,6 +699,7 @@
684699
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
685700
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
686701
<PackageReference Include="System.Buffers" Version="4.5.0" />
702+
<PackageReference Include="System.Memory" Version="4.5.3" />
687703
</ItemGroup>
688704
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
689705
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />

fcs/RELEASE_NOTES.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
1+
#### 34.1.0
2+
3+
From dotnet/fsharp:3af8959b6..9d69b49b7:
4+
5+
* set default script TFM to netcoreapp3.1 if none found
6+
* improve C#-nullable and optional interop (RFC FS-1075)
7+
* Add type name to `undefined name error` if known
8+
* improve printing via %A/fsi
9+
* misc. improvements to DependencyManager
10+
* improve type provider support for .netcoreapp3.1 target frameworks.
11+
* New, optimized find-all-references API with reduced memory usage.
12+
* better error messages for failed overload resolution
13+
114
#### 34.0.1
215

316
Contains commits from 32b124966 to d7018737c from dotnet/fsharp. Notable changes include:
417

518
* lowered allocations for large strings and char arrays (notably source file texts)
6-
* improved support for byreflike rules with regards to type abbreviations
19+
* improved support for byref-like rules with regards to type abbreviations
720
* better support for scopes in recursive modules
821
* better location of .net core reference assemblies
922
* lowered allocations for several internal compiler structures
1023
* better error messages for anonymous record mismatches
1124
* FSharpChecker learned how to keep background symbol uses
1225
* Project cracker/project cracker tool were removed
13-
* Better support for consuming C# inref parameters
14-
* new services around simplifing names and finding unused declarations
26+
* Better support for consuming C# in-ref parameters
27+
* new services around simplifying names and finding unused declarations
1528
* package management in scripts (in preview)
1629
* and-bang syntax support (in preview)
1730

@@ -25,7 +38,6 @@ Integrate dotnet/fsharp from 4f5f08320 to 7b25d7f82. Notable changes include:
2538
* Support for Literal values in signature files
2639
* Using memory-mapped files cross-platform to read IL.
2740

28-
2941
#### 33.0.0
3042

3143
Integrate dotnet/fsharp from 48f932cf8 to 085985140. Notable changes include:

fcs/build.fsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,19 @@ Target.create "GenerateDocsJa" (fun _ ->
9696
runDotnet "docsrc/tools" "fake" "run generate.ja.fsx"
9797
)
9898

99+
open Fake.IO.Globbing.Operators
100+
99101
Target.create "PublishNuGet" (fun _ ->
100-
let apikey = Environment.environVarOrDefault "nuget-apikey" (UserInput.getUserPassword "Nuget API Key: ")
101-
Paket.push (fun p ->
102-
{ p with
103-
ApiKey = apikey
104-
WorkingDir = releaseDir })
102+
let apikey = lazy(Environment.environVarOrDefault "nuget-apikey" (UserInput.getUserPassword "Nuget API Key: "))
103+
!! (sprintf "%s/*.%s.nupkg" releaseDir release.NugetVersion)
104+
|> Seq.iter (fun nupkg ->
105+
DotNet.nugetPush (fun p -> {
106+
p with
107+
PushParams = { p.PushParams with
108+
ApiKey = Some apikey.Value
109+
Source = Some "https://api.nuget.org/v3/index.json" }
110+
}) nupkg
111+
)
105112
)
106113

107114
// --------------------------------------------------------------------------------------

fcs/docsrc/tools/templates/template.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<li><a href="@Properties["project-nuget"]">Get Library via NuGet</a></li>
5050
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
5151
<li><a href="@Properties["project-github"]/blob/master/LICENSE">License</a></li>
52-
<li><a href="@Properties["project-github"]/blob/master/RELEASE_NOTES.md">Release Notes</a></li>
52+
<li><a href="@Properties["project-github"]/blob/master/fcs/RELEASE_NOTES.md">Release Notes</a></li>
5353

5454
<li class="nav-header">Getting started</li>
5555
<li><a href="@Root/index.html">Home page</a></li>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"msbuild-sdks": {
13-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20077.3",
13+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20113.5",
1414
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
1515
}
1616
}

src/absil/il.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ type ILVersionInfo =
309309
new (major, minor, build, revision) =
310310
{ Major = major; Minor = minor; Build = build; Revision = revision }
311311

312+
/// For debugging
313+
override x.ToString() = sprintf "ILVersionInfo: %u %u %u %u" (x.Major) (x.Minor) (x.Build) (x.Revision)
314+
315+
312316
type Locale = string
313317

314318
[<StructuralEquality; StructuralComparison>]

0 commit comments

Comments
 (0)