Skip to content

Commit

Permalink
Merge branch 'main' into accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRansom authored Aug 11, 2023
2 parents d026610 + 5f56a42 commit 23de074
Show file tree
Hide file tree
Showing 29 changed files with 292 additions and 200 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

ARG VARIANT=8.0.100-preview.6-bookworm-slim-amd64
ARG VARIANT=8.0.100-preview.7-bookworm-slim-amd64
FROM mcr.microsoft.com/dotnet/sdk:${VARIANT}

# Avoid warnings by switching to noninteractive
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0, 7.0
// Append -bullseye(-slim), -focal, or -jammy to pin to an OS version.
"VARIANT": "8.0.100-preview.6-bookworm-slim-amd64"
"VARIANT": "8.0.100-preview.7-bookworm-slim-amd64"
}
},
"hostRequirements": {
Expand Down
18 changes: 2 additions & 16 deletions eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -514,19 +514,6 @@ try {
TryDownloadDotnetFrameworkSdk

$nativeTools = InitializeNativeTools
if (-not (Test-Path variable:NativeToolsOnMachine)) {
$env:PERL5Path = Join-Path $nativeTools "perl\5.32.1.1\perl\bin\perl.exe"
write-host "variable:NativeToolsOnMachine = unset or false"
$nativeTools
write-host "Path = $env:PERL5Path"
}
else {
$env:PERL5Path = Join-Path $nativeTools["perl"] "perl\bin\perl.exe"
write-host "variable:NativeToolsOnMachine = $variable:NativeToolsOnMachine"
$nativeTools.values
write-host "Path = $env:PERL5Path"
}

$dotnetPath = InitializeDotNetCli
$env:DOTNET_ROOT = "$dotnetPath"
Get-Item -Path Env:
Expand Down Expand Up @@ -565,7 +552,7 @@ try {
$bgJob = TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -asBackgroundJob $true

TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\"
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.UnitTests\"
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\"
TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\"
TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\"
Expand Down Expand Up @@ -605,8 +592,7 @@ try {
$env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
write-host "Exec-Console $env:PERL5Path"
Exec-Console $env:PERL5Path """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
Exec-Console "perl.exe" """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
write-host "Exec-Console finished"
Pop-Location
}
Expand Down
6 changes: 3 additions & 3 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
These will go away when repo updates targeting to net8.0
Tracked with https://github.com/dotnet/fsharp/issues/14765
-->
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/7.0.8" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/7.0.8" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/7.0.8" />
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/7.0.9" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/7.0.9" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/7.0.9" />
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/7.0.0" />
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/7.0.0" />
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/7.0.0" />
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23407.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23408.2">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>b0cef4cffdd83138fa76c8a6430f7f8c2aa09f07</Sha>
<Sha>41f1a158d460e11ded6cffd6340f9e671e2b0a5c</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23217-02">
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "8.0.100-preview.6.23330.14",
"version": "8.0.100-preview.7.23376.3",
"allowPrerelease": true,
"rollForward": "latestMajor"
},
"tools": {
"dotnet": "8.0.100-preview.6.23330.14",
"dotnet": "8.0.100-preview.7.23376.3",
"vs": {
"version": "17.6",
"components": [
Expand All @@ -15,7 +15,7 @@
"xcopy-msbuild": "17.6.0-2"
},
"native-tools": {
"perl": "5.32.1.1"
"perl": "latest"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23402.2",
Expand Down
8 changes: 4 additions & 4 deletions src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,9 @@ type cenv = TcFileState
let CopyAndFixupTypars g m rigid tpsorig =
FreshenAndFixupTypars g m rigid [] [] tpsorig

let UnifyTypes (cenv: cenv) (env: TcEnv) m actualTy expectedTy =
let UnifyTypes (cenv: cenv) (env: TcEnv) m expectedTy actualTy =
let g = cenv.g
AddCxTypeEqualsType env.eContextInfo env.DisplayEnv cenv.css m (tryNormalizeMeasureInType g actualTy) (tryNormalizeMeasureInType g expectedTy)
AddCxTypeEqualsType env.eContextInfo env.DisplayEnv cenv.css m (tryNormalizeMeasureInType g expectedTy) (tryNormalizeMeasureInType g actualTy)

// If the overall type admits subsumption or type directed conversion, and the original unify would have failed,
// then allow subsumption or type directed conversion.
Expand Down Expand Up @@ -5884,10 +5884,10 @@ and CheckTupleIsCorrectLength g (env: TcEnv) m tupleTy (args: 'a list) tcArgs =
if args.Length <> ptys.Length then
let argTys = NewInferenceTypes g args
suppressErrorReporting (fun () -> tcArgs argTys)
let expectedTy = TType_tuple (tupInfo, argTys)
let actualTy = TType_tuple (tupInfo, argTys)

// We let error recovery handle this exception
error (ErrorFromAddingTypeEquation(g, env.DisplayEnv, tupleTy, expectedTy,
error (ErrorFromAddingTypeEquation(g, env.DisplayEnv, tupleTy, actualTy,
(ConstraintSolverTupleDiffLengths(env.DisplayEnv, env.eContextInfo, ptys, argTys, m, m)), m))

and TcExprTuple (cenv: cenv) overallTy env tpenv (isExplicitStruct, args, m) =
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckExpressions.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ val TranslateSynValInfo:
val TranslatePartialValReprInfo: tps: Typar list -> PrelimValReprInfo -> ValReprInfo

/// Constrain two types to be equal within this type checking context
val UnifyTypes: cenv: TcFileState -> env: TcEnv -> m: range -> actualTy: TType -> expectedTy: TType -> unit
val UnifyTypes: cenv: TcFileState -> env: TcEnv -> m: range -> expectedTy: TType -> actualTy: TType -> unit

val TcRuntimeTypeTest:
isCast: bool ->
Expand Down
14 changes: 7 additions & 7 deletions src/Compiler/Checking/ConstraintSolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ exception ConstraintSolverError of string * range * range

exception ErrorFromApplyingDefault of tcGlobals: TcGlobals * displayEnv: DisplayEnv * Typar * TType * error: exn * range: range

exception ErrorFromAddingTypeEquation of tcGlobals: TcGlobals * displayEnv: DisplayEnv * actualTy: TType * expectedTy: TType * error: exn * range: range
exception ErrorFromAddingTypeEquation of tcGlobals: TcGlobals * displayEnv: DisplayEnv * expectedTy: TType * actualTy: TType * error: exn * range: range

exception ErrorsFromAddingSubsumptionConstraint of tcGlobals: TcGlobals * displayEnv: DisplayEnv * actualTy: TType * expectedTy: TType * error: exn * ctxtInfo: ContextInfo * parameterRange: range
exception ErrorsFromAddingSubsumptionConstraint of tcGlobals: TcGlobals * displayEnv: DisplayEnv * expectedTy: TType * actualTy: TType * error: exn * ctxtInfo: ContextInfo * parameterRange: range

exception ErrorFromAddingConstraint of displayEnv: DisplayEnv * error: exn * range: range

Expand Down Expand Up @@ -2732,12 +2732,12 @@ and SolveTypeSubsumesTypeWithWrappedContextualReport (csenv: ConstraintSolverEnv
and SolveTypeSubsumesTypeWithReport (csenv: ConstraintSolverEnv) ndeep m trace cxsln origTy1 ty1 ty2 =
SolveTypeSubsumesTypeWithWrappedContextualReport csenv ndeep m trace cxsln origTy1 ty1 ty2 id

and SolveTypeEqualsTypeWithReport (csenv: ConstraintSolverEnv) ndeep m trace cxsln actualTy expectedTy =
and SolveTypeEqualsTypeWithReport (csenv: ConstraintSolverEnv) ndeep m trace cxsln expectedTy actualTy =
TryD
(fun () -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m trace cxsln actualTy expectedTy)
(fun () -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m trace cxsln expectedTy actualTy)
(function
| AbortForFailedMemberConstraintResolution as err -> ErrorD err
| res -> ErrorD (ErrorFromAddingTypeEquation(csenv.g, csenv.DisplayEnv, actualTy, expectedTy, res, m)))
| res -> ErrorD (ErrorFromAddingTypeEquation(csenv.g, csenv.DisplayEnv, expectedTy, actualTy, res, m)))

and ArgsMustSubsumeOrConvert
(csenv: ConstraintSolverEnv)
Expand Down Expand Up @@ -3478,10 +3478,10 @@ let EliminateConstraintsForGeneralizedTypars (denv: DisplayEnv) css m (trace: Op
// No error recovery here: we do that on a per-expression basis.
//-------------------------------------------------------------------------

let AddCxTypeEqualsType contextInfo denv css m actual expected =
let AddCxTypeEqualsType contextInfo denv css m expected actual =
let csenv = MakeConstraintSolverEnv contextInfo css m denv
PostponeOnFailedMemberConstraintResolution csenv NoTrace
(fun csenv -> SolveTypeEqualsTypeWithReport csenv 0 m NoTrace None actual expected)
(fun csenv -> SolveTypeEqualsTypeWithReport csenv 0 m NoTrace None expected actual)
ErrorD
|> RaiseOperationResult

Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/Checking/ConstraintSolver.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ exception ErrorFromApplyingDefault of
exception ErrorFromAddingTypeEquation of
tcGlobals: TcGlobals *
displayEnv: DisplayEnv *
actualTy: TType *
expectedTy: TType *
actualTy: TType *
error: exn *
range: range

exception ErrorsFromAddingSubsumptionConstraint of
tcGlobals: TcGlobals *
displayEnv: DisplayEnv *
actualTy: TType *
expectedTy: TType *
actualTy: TType *
error: exn *
ctxtInfo: ContextInfo *
parameterRange: range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
<Compile Include="..\service\CSharpProjectAnalysis.fs">
<Link>CSharpProjectAnalysis.fs</Link>
</Compile>
<Compile Include="..\service\StructureTests.fs">
<Link>StructureTests.fs</Link>
</Compile>
<Compile Include="..\service\ServiceUntypedParseTests.fs">
<Link>ServiceUntypedParseTests.fs</Link>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@
<Compile Include="..\..\tests\service\CSharpProjectAnalysis.fs">
<Link>CompilerService\CSharpProjectAnalysis.fs</Link>
</Compile>
<Compile Include="..\..\tests\service\StructureTests.fs">
<Link>CompilerService\StructureTests.fs</Link>
</Compile>
<Compile Include="StructureTests.fs" />
<Compile Include="..\..\tests\service\AssemblyContentProviderTests.fs">
<Link>CompilerService\AssemblyContentProviderTests.fs</Link>
</Compile>
Expand Down
Loading

0 comments on commit 23de074

Please sign in to comment.