Skip to content

Commit

Permalink
Merge pull request #926 from baronfel/project-options-fixes
Browse files Browse the repository at this point in the history
Additional rebased commits on top of the january merge
  • Loading branch information
baronfel authored Feb 6, 2020
2 parents dbbd46a + f878196 commit d12d208
Show file tree
Hide file tree
Showing 71 changed files with 1,413 additions and 693 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ osx_image: xcode11.2
mono:
- weekly
- latest
- 6.0.0
- 6.6.0

dotnet: 3.0.100
dotnet: 3.1.100

sudo: false

Expand Down
22 changes: 22 additions & 0 deletions eng/DumpPackageRoot/DumpPackageRoot.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- Used as a diagnostic tool to view the state of the NuGet package cache as it existed immediately after a restore/build. -->

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageRootFiles Include="$(NuGetPackageRoot)/**" />
</ItemGroup>

<Target Name="_DumpPackageRootDirectoryListing"
AfterTargets="Build">
<PropertyGroup>
<PackageRootArtifactDirectory>$(ArtifactsDir)NugetPackageRootContents</PackageRootArtifactDirectory>
<PackageRootContentsFile>$(PackageRootArtifactDirectory)/package_contents.txt</PackageRootContentsFile>
</PropertyGroup>
<MakeDir Directories="$(PackageRootArtifactDirectory)" Condition="!Exists('$(PackageRootArtifactDirectory)')" />
<WriteLinesToFile File="$(PackageRootContentsFile)" Lines="@(PackageRootFiles)" />
</Target>
</Project>
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="5.0.0-beta.20057.5">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20077.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>d0833c8e5e58cfc507ce3c8da364e55931190263</Sha>
<Sha>69a67461460d99125742d5c2dd94dad83add84a3</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<NUnitVersion>3.11.0</NUnitVersion>
<NUnit3TestAdapterVersion>3.11.2</NUnit3TestAdapterVersion>
<NUnitLiteVersion>3.11.0</NUnitLiteVersion>
<NunitXmlTestLoggerVersion>2.1.36</NunitXmlTestLoggerVersion>
<NunitXmlTestLoggerVersion>2.1.41</NunitXmlTestLoggerVersion>
<RoslynToolsSignToolVersion>1.0.0-beta2-dev3</RoslynToolsSignToolVersion>
<StrawberryPerlVersion>5.28.0.1</StrawberryPerlVersion>
<StreamJsonRpcVersion>2.0.187</StreamJsonRpcVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\netfx.props" />
<Import Project="..\..\eng\Versions.props"/> <!-- keep our test deps in line with the overall compiler -->
<PropertyGroup>
<TargetFrameworks>$(FcsTargetNetFxFramework);netcoreapp3.0</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
Expand Down Expand Up @@ -66,6 +67,9 @@
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\TreeVisitorTests.fs">
<Link>TreeVisitorTests.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\ScriptOptionsTests.fs">
<Link>ScriptOptionsTests.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\Program.fs" Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Link>Program.fs</Link>
</Compile>
Expand All @@ -77,10 +81,10 @@
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="$(FcsFSharpCorePkgVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="NunitXml.TestLogger" Version="2.1.36" />
<PackageReference Include="Dotnet.ProjInfo" Version="0.20.0" />
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnit3TestAdapterVersion)" />
<PackageReference Include="NunitXml.TestLogger" Version="$(NunitXmlTestLoggerVersion)" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(FcsTargetNetFxFramework)'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn
open System
open System.Collections.Generic
open System.IO
open System.Linq
open System.Linq
open System.Reflection

open NUnit.Framework
Expand Down
18 changes: 16 additions & 2 deletions fcs/FSharp.Compiler.Service.Tests/ProjectOptionsBuilder.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ 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
Expand All @@ -29,9 +42,10 @@ type FSharpProject =
member this.Dispose() =
// delete each source file
this.Files
|> List.iter (fun (path, _contents) -> File.Delete(path))
|> List.map fst
|> List.iter FileSystemHelpers.safeDeleteFile
// delete the directory
Directory.Delete(this.Directory)
FileSystemHelpers.safeDeleteDirectory (this.Directory)
// project file doesn't really exist, nothing to delete
()

Expand Down
9 changes: 5 additions & 4 deletions fcs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#### 34.0.0
#### 34.0.1

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

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

#### 33.0.1

Expand Down
10 changes: 5 additions & 5 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ Target.create "BuildVersion" (fun _ ->

Target.create "Build" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "build" "../src/buildtools/buildtools.proj -v n -c Proto"
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp2.1/fslex.dll"
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp2.1/fsyacc.dll"
let fslexPath = Path.GetFullPath <| Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fslex/Proto/netcoreapp3.1/fslex.dll")
let fsyaccPath = Path.GetFullPath <| Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fsyacc/Proto/netcoreapp3.1/fsyacc.dll")
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)
)

Target.create "Test" (fun _ ->
// This project file is used for the netcoreapp2.0 tests to work out reference sets
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"

// Now run the tests
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml")
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)
// Now run the tests (different output files per TFM)
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.{framework}.xml")
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)
)

Target.create "NuGet" (fun _ ->
Expand Down
2 changes: 1 addition & 1 deletion fcs/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.0.100"
"version": "3.1.100"
}
}
2 changes: 1 addition & 1 deletion fcs/samples/FscExe/FscMain.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ open System.IO
open System.Reflection
open System.Runtime.CompilerServices
open FSharp.Compiler.SourceCodeServices
open FSharp.Compiler.AbstractIL.IL // runningOnMono
open FSharp.Compiler.AbstractIL.Internal.Utils // runningOnMono
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.ErrorLogger

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.19616.5",
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20077.3",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
Loading

0 comments on commit d12d208

Please sign in to comment.