Skip to content

Commit

Permalink
Merge pull request #928 from baronfel/integrate
Browse files Browse the repository at this point in the history
Integrate more dotnet/fsharp changes
  • Loading branch information
baronfel authored Feb 20, 2020
2 parents ff4d182 + 21fc7b6 commit c8d34ea
Show file tree
Hide file tree
Showing 96 changed files with 3,681 additions and 1,412 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ The maintainers of this repository are:
* [Get started with F#](https://docs.microsoft.com/dotnet/fsharp/get-started/)
* [F# Software Foundation](https://fsharp.org)
* [F# Testimonials](https://fsharp.org/testimonials)

31 changes: 31 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! /usr/bin/env bash

DEAD_DIRS=(
"azure-pipelines.yml"
"DEVGUIDE.md"
"eng/common/templates"
"FSharp.sln"
"src/fsharp/fsc/fsc.fsproj"
"src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec"
"src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj"
"src/fsharp/fsi/fsi.fsproj"
"src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj"
"src/fsharp/Interactive.DependencyManager/xlf"
"src/fsharp/xlf"
"TESTGUIDE.md"
"tests/EndToEndBuildTests"
"tests/FSharp.Compiler.Private.Scripting.UnitTests"
"tests/FSharp.Compiler.UnitTests"
"tests/FSharp.Core.UnitTests"
"tests/fsharp/Compiler"
"tests/fsharp/conformance"
"tests/fsharp/core"
"tests/fsharp/test-framework.fs"
"tests/fsharp/tests.fs"
"tests/fsharp/typecheck"
"tests/fsharpqa"
"VisualFSharp.sln"
"vsintegration"
)

git rm -rf --ignore-unmatch ${DEAD_DIRS[*]}
4 changes: 4 additions & 0 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
$args += " --no-build"
}

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

Exec-Console $dotnetExe $args
}

Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20077.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20113.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>69a67461460d99125742d5c2dd94dad83add84a3</Sha>
<Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
<SystemThreadingThreadPoolVersion>4.3.0</SystemThreadingThreadPoolVersion>
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
<SystemBuffersVersion>4.5.0</SystemBuffersVersion>
<SystemMemoryVersion>4.5.3</SystemMemoryVersion>
<!-- Roslyn packages -->
<MicrosoftCodeAnalysisEditorFeaturesVersion>$(RoslynVersion)</MicrosoftCodeAnalysisEditorFeaturesVersion>
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>$(RoslynVersion)</MicrosoftCodeAnalysisEditorFeaturesTextVersion>
Expand Down
7 changes: 6 additions & 1 deletion eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,15 @@ function TestUsingNUnit() {
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\""
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 $?
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type SemanticClassificationServiceTests() =
let checker = FSharpChecker.Create()
let perfOptions = { LanguageServicePerformanceOptions.Default with AllowStaleCompletionResults = false }

let getRanges (source: string) : (Range.range * SemanticClassificationType) list =
let getRanges (source: string) : struct (Range.range * SemanticClassificationType) list =
asyncMaybe {

let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, 0, SourceText.From(source), projectOptions, perfOptions, "")
Expand All @@ -45,7 +45,7 @@ type SemanticClassificationServiceTests() =
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 (range, _) -> Range.rangeContainsPos range markerPos) with
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")

Expand All @@ -54,7 +54,7 @@ type SemanticClassificationServiceTests() =
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 (range, sct) -> Range.rangeContainsPos range markerPos && ((FSharpClassificationTypes.getClassificationTypeName sct) = classificationType))
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.")

[<TestCase("(*1*)", FSharpClassificationTypes.ValueType)>]
Expand Down
26 changes: 21 additions & 5 deletions fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<EmbeddedText Include="$(FSharpSourcesRoot)\fsharp\FSComp.txt">
<Link>FSComp.txt</Link>
</EmbeddedText>
<EmbeddedText Include="$(FSharpSourcesRoot)\fsharp\Interactive.DependencyManager\InteractiveDependencyManager.txt">
<Link>InteractiveDependencyManager.txt</Link>
</EmbeddedText>
<EmbeddedText Include="$(FSharpSourcesRoot)\fsharp\fsi\FSIstrings.txt">
<Link>FSIstrings.txt</Link>
</EmbeddedText>
Expand Down Expand Up @@ -522,11 +525,11 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/DotNetFrameworkDependencies.fs">
<Link>Driver\DotNetFrameworkDependencies.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/DependencyManager.Integration.fsi">
<Link>Driver/DependencyManager.Integration.fsi</Link>
<Compile Include="$(FSharpSourcesRoot)/fsharp/Interactive.DependencyManager/DependencyManager.fsi">
<Link>Driver/DependencyManager.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/DependencyManager.Integration.fs">
<Link>Driver/DependencyManager.Integration.fs</Link>
<Compile Include="$(FSharpSourcesRoot)/fsharp/Interactive.DependencyManager/DependencyManager.fs">
<Link>Driver/DependencyManager.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/CompileOps.fsi">
<Link>Driver/CompileOps.fsi</Link>
Expand Down Expand Up @@ -576,6 +579,18 @@
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\Reactor.fs">
<Link>Service/Reactor.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\SemanticClassification.fsi">
<Link>Service/SemanticClassification.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\SemanticClassification.fs">
<Link>Service/SemanticClassification.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ItemKey.fsi">
<Link>Service/ItemKey.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ItemKey.fs">
<Link>Service/ItemKey.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\IncrementalBuild.fsi">
<Link>Service/IncrementalBuild.fsi</Link>
</Compile>
Expand Down Expand Up @@ -636,7 +651,7 @@
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\ExternalSymbol.fs">
<Link>Service/ExternalSymbol.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\QuickParse.fsi">
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\QuickParse.fsi">
<Link>Service/QuickParse.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\fsharp\service\QuickParse.fs">
Expand Down Expand Up @@ -684,6 +699,7 @@
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
<PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Memory" Version="4.5.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
Expand Down
20 changes: 16 additions & 4 deletions fcs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
#### 34.1.0

From dotnet/fsharp:3af8959b6..9d69b49b7:

* set default script TFM to netcoreapp3.1 if none found
* improve C#-nullable and optional interop (RFC FS-1075)
* Add type name to `undefined name error` if known
* improve printing via %A/fsi
* misc. improvements to DependencyManager
* improve type provider support for .netcoreapp3.1 target frameworks.
* New, optimized find-all-references API with reduced memory usage.
* better error messages for failed overload resolution

#### 34.0.1

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

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

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


#### 33.0.0

Integrate dotnet/fsharp from 48f932cf8 to 085985140. Notable changes include:
Expand Down
17 changes: 12 additions & 5 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,19 @@ Target.create "GenerateDocsJa" (fun _ ->
runDotnet "docsrc/tools" "fake" "run generate.ja.fsx"
)

open Fake.IO.Globbing.Operators

Target.create "PublishNuGet" (fun _ ->
let apikey = Environment.environVarOrDefault "nuget-apikey" (UserInput.getUserPassword "Nuget API Key: ")
Paket.push (fun p ->
{ p with
ApiKey = apikey
WorkingDir = releaseDir })
let apikey = lazy(Environment.environVarOrDefault "nuget-apikey" (UserInput.getUserPassword "Nuget API Key: "))
!! (sprintf "%s/*.%s.nupkg" releaseDir release.NugetVersion)
|> Seq.iter (fun nupkg ->
DotNet.nugetPush (fun p -> {
p with
PushParams = { p.PushParams with
ApiKey = Some apikey.Value
Source = Some "https://api.nuget.org/v3/index.json" }
}) nupkg
)
)

// --------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion fcs/docsrc/tools/templates/template.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<li><a href="@Properties["project-nuget"]">Get Library via NuGet</a></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]/blob/master/LICENSE">License</a></li>
<li><a href="@Properties["project-github"]/blob/master/RELEASE_NOTES.md">Release Notes</a></li>
<li><a href="@Properties["project-github"]/blob/master/fcs/RELEASE_NOTES.md">Release Notes</a></li>

<li class="nav-header">Getting started</li>
<li><a href="@Root/index.html">Home page</a></li>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20077.3",
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20113.5",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
4 changes: 4 additions & 0 deletions src/absil/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ type ILVersionInfo =
new (major, minor, build, revision) =
{ Major = major; Minor = minor; Build = build; Revision = revision }

/// For debugging
override x.ToString() = sprintf "ILVersionInfo: %u %u %u %u" (x.Major) (x.Minor) (x.Build) (x.Revision)


type Locale = string

[<StructuralEquality; StructuralComparison>]
Expand Down
Loading

0 comments on commit c8d34ea

Please sign in to comment.