Skip to content

Commit d12d208

Browse files
authored
Merge pull request #926 from baronfel/project-options-fixes
Additional rebased commits on top of the january merge
2 parents dbbd46a + f878196 commit d12d208

File tree

71 files changed

+1413
-693
lines changed

Some content is hidden

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

71 files changed

+1413
-693
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ osx_image: xcode11.2
99
mono:
1010
- weekly
1111
- latest
12-
- 6.0.0
12+
- 6.6.0
1313

14-
dotnet: 3.0.100
14+
dotnet: 3.1.100
1515

1616
sudo: false
1717

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<!-- Used as a diagnostic tool to view the state of the NuGet package cache as it existed immediately after a restore/build. -->
4+
5+
<PropertyGroup>
6+
<TargetFramework>netcoreapp3.1</TargetFramework>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageRootFiles Include="$(NuGetPackageRoot)/**" />
11+
</ItemGroup>
12+
13+
<Target Name="_DumpPackageRootDirectoryListing"
14+
AfterTargets="Build">
15+
<PropertyGroup>
16+
<PackageRootArtifactDirectory>$(ArtifactsDir)NugetPackageRootContents</PackageRootArtifactDirectory>
17+
<PackageRootContentsFile>$(PackageRootArtifactDirectory)/package_contents.txt</PackageRootContentsFile>
18+
</PropertyGroup>
19+
<MakeDir Directories="$(PackageRootArtifactDirectory)" Condition="!Exists('$(PackageRootArtifactDirectory)')" />
20+
<WriteLinesToFile File="$(PackageRootContentsFile)" Lines="@(PackageRootFiles)" />
21+
</Target>
22+
</Project>

eng/Version.Details.xml

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

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<NUnitVersion>3.11.0</NUnitVersion>
184184
<NUnit3TestAdapterVersion>3.11.2</NUnit3TestAdapterVersion>
185185
<NUnitLiteVersion>3.11.0</NUnitLiteVersion>
186-
<NunitXmlTestLoggerVersion>2.1.36</NunitXmlTestLoggerVersion>
186+
<NunitXmlTestLoggerVersion>2.1.41</NunitXmlTestLoggerVersion>
187187
<RoslynToolsSignToolVersion>1.0.0-beta2-dev3</RoslynToolsSignToolVersion>
188188
<StrawberryPerlVersion>5.28.0.1</StrawberryPerlVersion>
189189
<StreamJsonRpcVersion>2.0.187</StreamJsonRpcVersion>

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

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\netfx.props" />
3+
<Import Project="..\..\eng\Versions.props"/> <!-- keep our test deps in line with the overall compiler -->
34
<PropertyGroup>
45
<TargetFrameworks>$(FcsTargetNetFxFramework);netcoreapp3.0</TargetFrameworks>
56
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
@@ -66,6 +67,9 @@
6667
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\TreeVisitorTests.fs">
6768
<Link>TreeVisitorTests.fs</Link>
6869
</Compile>
70+
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\ScriptOptionsTests.fs">
71+
<Link>ScriptOptionsTests.fs</Link>
72+
</Compile>
6973
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\Program.fs" Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
7074
<Link>Program.fs</Link>
7175
</Compile>
@@ -77,10 +81,10 @@
7781
<ItemGroup>
7882
<PackageReference Include="FSharp.Core" Version="$(FcsFSharpCorePkgVersion)" />
7983
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
80-
<PackageReference Include="NUnit" Version="3.9.0" />
81-
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
82-
<PackageReference Include="NunitXml.TestLogger" Version="2.1.36" />
8384
<PackageReference Include="Dotnet.ProjInfo" Version="0.20.0" />
85+
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
86+
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnit3TestAdapterVersion)" />
87+
<PackageReference Include="NunitXml.TestLogger" Version="$(NunitXmlTestLoggerVersion)" />
8488
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
8589
</ItemGroup>
8690
<ItemGroup Condition="'$(TargetFramework)' == '$(FcsTargetNetFxFramework)'">

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
2323
open System
2424
open System.Collections.Generic
2525
open System.IO
26-
open System.Linq
26+
open System.Linq
2727
open System.Reflection
2828

2929
open NUnit.Framework

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

+16-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ open System.IO
55
open System.Xml.Linq
66
open FSharp.Compiler.SourceCodeServices
77

8+
module FileSystemHelpers =
9+
let safeDeleteFile (path: string) =
10+
try
11+
File.Delete(path)
12+
with
13+
| _ -> ()
14+
15+
let safeDeleteDirectory (path: string) =
16+
try
17+
Directory.Delete(path)
18+
with
19+
| _ -> ()
20+
821
type FSharpProject =
922
{
1023
Directory: string
@@ -29,9 +42,10 @@ type FSharpProject =
2942
member this.Dispose() =
3043
// delete each source file
3144
this.Files
32-
|> List.iter (fun (path, _contents) -> File.Delete(path))
45+
|> List.map fst
46+
|> List.iter FileSystemHelpers.safeDeleteFile
3347
// delete the directory
34-
Directory.Delete(this.Directory)
48+
FileSystemHelpers.safeDeleteDirectory (this.Directory)
3549
// project file doesn't really exist, nothing to delete
3650
()
3751

fcs/RELEASE_NOTES.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#### 34.0.0
1+
#### 34.0.1
22

3-
Contains commits from 32b124966 to 5a0117048 from dotnet/fsharp. Notable changes include:
3+
Contains commits from 32b124966 to d7018737c from dotnet/fsharp. Notable changes include:
44

5-
* lowered allocations for large strings and char arrays (notable source file texts)
5+
* lowered allocations for large strings and char arrays (notably source file texts)
66
* improved support for byreflike rules with regards to type abbreviations
77
* better support for scopes in recursive modules
88
* better location of .net core reference assemblies
@@ -11,8 +11,9 @@ Contains commits from 32b124966 to 5a0117048 from dotnet/fsharp. Notable changes
1111
* FSharpChecker learned how to keep background symbol uses
1212
* Project cracker/project cracker tool were removed
1313
* Better support for consuming C# inref parameters
14-
* preview-level functionality for #r "nuget" in scripts
1514
* new services around simplifing names and finding unused declarations
15+
* package management in scripts (in preview)
16+
* and-bang syntax support (in preview)
1617

1718
#### 33.0.1
1819

fcs/build.fsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@ Target.create "BuildVersion" (fun _ ->
6464

6565
Target.create "Build" (fun _ ->
6666
runDotnet __SOURCE_DIRECTORY__ "build" "../src/buildtools/buildtools.proj -v n -c Proto"
67-
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp2.1/fslex.dll"
68-
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp2.1/fsyacc.dll"
67+
let fslexPath = Path.GetFullPath <| Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fslex/Proto/netcoreapp3.1/fslex.dll")
68+
let fsyaccPath = Path.GetFullPath <| Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fsyacc/Proto/netcoreapp3.1/fsyacc.dll")
6969
runDotnet __SOURCE_DIRECTORY__ "build" (sprintf "FSharp.Compiler.Service.sln -nodereuse:false -v n -c Release /p:DisableCompilerRedirection=true /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)
7070
)
7171

7272
Target.create "Test" (fun _ ->
7373
// This project file is used for the netcoreapp2.0 tests to work out reference sets
7474
runDotnet __SOURCE_DIRECTORY__ "build" "../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -nodereuse:false -v n /restore /p:DisableCompilerRedirection=true"
7575

76-
// Now run the tests
77-
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml")
78-
runDotnet __SOURCE_DIRECTORY__ "test" (sprintf "FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -nodereuse:false -v n -c Release --test-adapter-path . --logger \"nunit;LogFilePath=%s\"" logFilePath)
76+
// Now run the tests (different output files per TFM)
77+
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.{framework}.xml")
78+
runDotnet __SOURCE_DIRECTORY__ "test" (sprintf "FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -nodereuse:false -v n -c Release --logger \"nunit;LogFilePath=%s\"" logFilePath)
7979
)
8080

8181
Target.create "NuGet" (fun _ ->

fcs/global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.0.100"
3+
"version": "3.1.100"
44
}
55
}

fcs/samples/FscExe/FscMain.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ open System.IO
88
open System.Reflection
99
open System.Runtime.CompilerServices
1010
open FSharp.Compiler.SourceCodeServices
11-
open FSharp.Compiler.AbstractIL.IL // runningOnMono
11+
open FSharp.Compiler.AbstractIL.Internal.Utils // runningOnMono
1212
open FSharp.Compiler.AbstractIL.Internal.Library
1313
open FSharp.Compiler.ErrorLogger
1414

global.json

+1-1
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.19616.5",
13+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20077.3",
1414
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
1515
}
1616
}

0 commit comments

Comments
 (0)