Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae11e8e

Browse files
KevinRansombaronfel
authored andcommitted
Merge pull request #9886 from KevinRansom/merge-16.7intomaster
Merge 16.7intomaster
2 parents 0c95edd + 0e6ff77 commit ae11e8e

File tree

12 files changed

+48
-11
lines changed

12 files changed

+48
-11
lines changed

eng/build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,14 @@ function BuildSolution {
201201

202202
InitializeToolset
203203
local toolset_build_proj=$_InitializeToolset
204-
204+
205205
local bl=""
206206
if [[ "$binary_log" = true ]]; then
207207
bl="/bl:\"$log_dir/Build.binlog\""
208208
fi
209-
210-
local projects="$repo_root/$solution"
211-
209+
210+
local projects="$repo_root/$solution"
211+
212212
# https://github.com/dotnet/roslyn/issues/23736
213213
local enable_analyzers=!$skip_analyzers
214214
UNAME="$(uname)"
@@ -294,6 +294,7 @@ BuildSolution
294294

295295
if [[ "$test_core_clr" == true ]]; then
296296
coreclrtestframework=netcoreapp3.1
297+
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework
297298
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework
298299
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
299300
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@
559559
<Compile Include="$(FSharpSourcesRoot)/fsharp/Microsoft.DotNet.DependencyManager/DependencyProvider.fsi">
560560
<Link>Driver/DependencyProvider.fsi</Link>
561561
</Compile>
562+
<Compile Include="$(FSharpSourcesRoot)/fsharp/Microsoft.DotNet.DependencyManager/DependencyProvider.fsi">
563+
<Link>Driver/DependencyProvider.fsi</Link>
564+
</Compile>
562565
<Compile Include="$(FSharpSourcesRoot)/fsharp/Microsoft.DotNet.DependencyManager/DependencyProvider.fs">
563566
<Link>Driver/DependencyProvider.fs</Link>
564567
</Compile>

fcs/build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let withDotnetExe =
3131
let runDotnet workingDir command args =
3232
let result = DotNet.exec (DotNet.Options.withWorkingDirectory workingDir >> withDotnetExe) command args
3333

34-
if result.ExitCode <> 0 then failwithf "dotnet %s failed with errors: %s" args (result.Errors |> String.concat "\n")
34+
if result.ExitCode <> 0 then failwithf "dotnet %s %s failed with code %d and errors:\n%s" command args result.ExitCode (result.Errors |> String.concat "\n")
3535

3636
// --------------------------------------------------------------------------------------
3737
// The rest of the code is standard F# build script

src/fsharp/AccessibilityLogic.fs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,11 @@ let IsMethInfoAccessible amap m ad minfo = IsTypeAndMethInfoAccessible amap m ad
364364

365365
let IsPropInfoAccessible g amap m ad = function
366366
| ILProp ilpinfo -> IsILPropInfoAccessible g amap m ad ilpinfo
367-
| FSProp (_, _, Some vref, _)
368-
| FSProp (_, _, _, Some vref) -> IsValAccessible ad vref
367+
| FSProp (_, _, Some vref, None)
368+
| FSProp (_, _, None, Some vref) -> IsValAccessible ad vref
369+
| FSProp (_, _, Some vrefGet, Some vrefSet) ->
370+
// pick most accessible
371+
IsValAccessible ad vrefGet || IsValAccessible ad vrefSet
369372
#if !NO_EXTENSIONTYPING
370373
| ProvidedProp (amap, tppi, m) as pp->
371374
let access =

src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ type FSharpScript(?additionalArgs: string[], ?quiet: bool, ?langVersion: LangVer
4242
let fsi = FsiEvaluationSession.Create (config, argv, stdin, stdout, stderr)
4343

4444
member __.ValueBound = fsi.ValueBound
45-
4645
member __.Fsi = fsi
4746

4847
member __.Eval(code: string, ?cancellationToken: CancellationToken) =

src/fsharp/FSharp.Core/async.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,7 @@ namespace Microsoft.FSharp.Control
14051405
static member Sleep (millisecondsDueTime: int32) : Async<unit> =
14061406
Async.Sleep (millisecondsDueTime |> int64)
14071407

1408+
[<Experimental(ExperimentalAttributeMessages.RequiresPreview)>]
14081409
static member Sleep (dueTime: TimeSpan) =
14091410
if dueTime < TimeSpan.Zero then
14101411
raise (ArgumentOutOfRangeException("dueTime"))

src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
<PackageProjectUrl>https://github.com/fsharp/FSharp.Compiler.Service</PackageProjectUrl>
2727
<PackageIcon>logo.png</PackageIcon>
2828
<PackageTags>F#, fsharp, interactive, compiler, editor</PackageTags>
29+
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
30+
<IsPackable>true</IsPackable>
31+
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
32+
<AssemblyName>Microsoft.DotNet.DependencyManager</AssemblyName>
33+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
34+
<AssemblyName>FSharp.DependencyManager.Nuget</AssemblyName>
35+
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
36+
<AllowCrossTargeting>true</AllowCrossTargeting>
37+
<OtherFlags>$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
38+
<Tailcalls>true</Tailcalls> <!-- .tail annotations always emitted for this binary, even in debug mode -->
2939
</PropertyGroup>
3040

3141
<Target Name="CopyToBuiltBin" BeforeTargets="BuiltProjectOutputGroup" AfterTargets="CoreCompile">
@@ -35,6 +45,15 @@
3545
</Target>
3646

3747
<ItemGroup>
48+
<EmbeddedText Include="DependencyManager.txt" />
49+
<Compile Include="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs" />
50+
<Compile Include="AssemblyResolveHandler.fsi" />
51+
<Compile Include="AssemblyResolveHandler.fs" />
52+
<Compile Include="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs" />
53+
<Compile Include="NativeDllResolveHandler.fsi" />
54+
<Compile Include="NativeDllResolveHandler.fs" />
55+
<Compile Include="DependencyProvider.fsi" />
56+
<Compile Include="DependencyProvider.fs" />
3857
<EmbeddedText Include="FSDependencyManager.txt" />
3958
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.ProjectFile.fs" />
4059
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Utilities.fs" />
@@ -48,6 +67,7 @@
4867

4968
<ItemGroup>
5069
<PackageReference Include="FSharp.Core" Version="$(FcsFSharpCorePkgVersion)" />
70+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
5171
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
5272
</ItemGroup>
5373

@@ -64,6 +84,7 @@
6484
<PackageReference Include="System.Reflection.TypeExtensions" Version="$(SystemReflectionTypeExtensionsVersion)" />
6585
<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)" />
6686
<PackageReference Include="System.Runtime.InteropServices" Version="$(SystemRuntimeInteropServicesVersion)" />
87+
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
6788
<PackageReference Include="System.Security.Claims" Version="$(SystemSecurityClaimsVersion)" />
6889
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="$(SystemSecurityCryptographyAlgorithmsVersion)" />
6990
<PackageReference Include="System.Security.Principal" Version="$(SystemSecurityPrincipalVersion)" />

src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ type FSharpDependencyManager (outputDir:string option) =
168168
sprintf """ #r "nuget:FSharp.Data";; // %s 'FSharp.Data' %s""" (SR.loadNugetPackage()) (SR.highestVersion())
169169
|]
170170

171-
member _.ResolveDependencies(scriptExt:string, packageManagerTextLines:string seq, tfm: string, rid: string) : obj =
171+
member __.ResolveDependencies(scriptExt:string, packageManagerTextLines:string seq, tfm: string) : bool * string list * string list =
172172

173173
let scriptExt, poundRprefix =
174174
match scriptExt with

src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<IsPackable>true</IsPackable>
99
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
1010
<AssemblyName>Microsoft.DotNet.DependencyManager</AssemblyName>
11+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
12+
<AssemblyName>FSharp.DependencyManager.Nuget</AssemblyName>
1113
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
1214
<AllowCrossTargeting>true</AllowCrossTargeting>
1315
<OtherFlags>$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
@@ -30,6 +32,11 @@
3032
<Compile Include="NativeDllResolveHandler.fs" />
3133
<Compile Include="DependencyProvider.fsi" />
3234
<Compile Include="DependencyProvider.fs" />
35+
<EmbeddedText Include="FSDependencyManager.txt" />
36+
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.ProjectFile.fs" />
37+
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Utilities.fs" />
38+
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.fsi" />
39+
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.fs" />
3340
</ItemGroup>
3441

3542
<ItemGroup>

src/fsharp/PrettyNaming.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,4 +762,5 @@ let FSharpSignatureDataResourceName = "FSharpSignatureData."
762762
// don't complain when they see the resource. The prefix of these names must not be 'FSharpOptimizationData'
763763
// or 'FSharpSignatureData'
764764
let FSharpOptimizationDataResourceName2 = "FSharpOptimizationInfo."
765-
let FSharpSignatureDataResourceName2 = "FSharpSignatureInfo."
765+
let FSharpSignatureDataResourceName2 = "FSharpSignatureInfo."
766+

src/fsharp/service/SemanticClassification.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ module TcResolutionsExtensions =
227227
add m SemanticClassificationType.ExtensionMethod
228228
else
229229
add m SemanticClassificationType.Method
230-
231230
// Special case measures for struct types
232231
| Item.Types(_, TType_app(tyconRef, TType_measure _ :: _) :: _), LegitTypeOccurence, _, _, _, m when isStructTyconRef tyconRef ->
233232
add m SemanticClassificationType.ValueType

tests/service/ExprTests.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ let test{0}ToStringOperator (e1:{1}) = string e1
709709
"""
710710

711711
/// This test is run in unison with its optimized counterpart below
712+
[<Test>]
712713
let ``Test Unoptimized Declarations Project1`` () =
713714
let wholeProjectResults = exprChecker.ParseAndCheckProject(snd Project1.options.Value) |> Async.RunSynchronously
714715

@@ -841,6 +842,7 @@ let ``Test Unoptimized Declarations Project1`` () =
841842
()
842843

843844
/// This test is run in unison with its unoptimized counterpart below
845+
[<Test>]
844846
let ``Test Optimized Declarations Project1`` () =
845847
let wholeProjectResults = exprChecker.ParseAndCheckProject(snd Project1.options.Value) |> Async.RunSynchronously
846848

0 commit comments

Comments
 (0)