Skip to content

Commit 825d557

Browse files
authored
Merge branch 'main' into ber.a/diagnosticData
2 parents 7a7e9bc + 26b8772 commit 825d557

File tree

52 files changed

+804
-325
lines changed

Some content is hidden

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

52 files changed

+804
-325
lines changed

.github/workflows/add_to_project.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,6 @@ jobs:
3030
gh api -X GET "$_UrlPath/$_CurrentWorkflowID/runs" --paginate \
3131
| jq '.workflow_runs[] | select(.status == "completed") | .id' \
3232
| xargs -I{} gh api -X DELETE "/repos/$GITHUB_REPOSITORY/actions/runs"/{}
33-
add_to_project:
34-
name: Add issue to project
35-
runs-on: ubuntu-latest
36-
permissions:
37-
issues: write
38-
repository-projects: write
39-
steps:
40-
- uses: actions/[email protected]
41-
with:
42-
project-url: https://github.com/orgs/dotnet/projects/126/
43-
github-token: ${{ secrets.REPO_PROJECT_PAT }}
4433
apply-label:
4534
runs-on: ubuntu-latest
4635
if: github.event_name != 'pull_request_target'

FSharp.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ EndProject
103103
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D58BFE8B-7C85-4D3B-B5F3-9A7BB90FF1EE}"
104104
ProjectSection(SolutionItems) = preProject
105105
src\Compiler\FSComp.txt = src\Compiler\FSComp.txt
106+
src\Compiler\FSCompCheck.fsx = src\Compiler\FSCompCheck.fsx
106107
EndProjectSection
107108
EndProject
108109
Global

azure-pipelines.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ stages:
249249
continueOnError: true
250250
condition: not(succeeded())
251251

252-
# Check code formatting
252+
# Check FSComp.txt error code sorting and code formatting
253253
- job: CheckCodeFormatting
254254
pool:
255255
vmImage: $(UbuntuMachineQueueName)
@@ -270,6 +270,10 @@ stages:
270270
env:
271271
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
272272
displayName: Install tools
273+
- script: dotnet fsi src/Compiler/FSCompCheck.fsx
274+
env:
275+
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
276+
displayName: Check error code sorting in src/Compiler/FSComp.txt
273277
- script: dotnet fantomas . -r --check
274278
env:
275279
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1

docs/debug-emit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The intended debug points for constructs are determined by syntax as follows. P
8787

8888
* The bodies of functions, methods, lambdas and initialization code for top-level-bindings are all processed as control flow
8989

90-
* Each CAPITAL-EXPR below is processed as control-flow (the bodies of loops, conditionals etc.)
90+
* Each Upper-Cased EXPR below is processed as control-flow (the bodies of loops, conditionals etc.)
9191

9292
* Leaf expressions are the other composite expressions like applications that are not covered by the other constructs.
9393

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23424.1">
4+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23451.1">
55
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
6-
<Sha>93c23409e630c4f267234540b0e3557b76a53ef4</Sha>
6+
<Sha>0030d238c7929b0e9b06576837b60ad90037b1d2</Sha>
77
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
88
</Dependency>
99
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23217-02">
@@ -29,14 +29,14 @@
2929
</Dependency>
3030
</ProductDependencies>
3131
<ToolsetDependencies>
32-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23422.1">
32+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23451.1">
3333
<Uri>https://github.com/dotnet/arcade</Uri>
34-
<Sha>4d9945d230fdd8324ce16a31c7dbd74e27a0fc9b</Sha>
34+
<Sha>4665b3d04e1da3796b965c3c3e3b97f55c449a6e</Sha>
3535
<SourceBuild RepoName="arcade" ManagedOnly="true" />
3636
</Dependency>
37-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23418.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
37+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23426.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
3838
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
39-
<Sha>bb654cd4736e7e8cb99f1c355ce2b8f0a686ba74</Sha>
39+
<Sha>194f32828726c3f1f63f79f3dc09b9e99c157b11</Sha>
4040
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
4141
</Dependency>
4242
</ToolsetDependencies>

eng/common/cross/toolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ elseif(ILLUMOS)
207207
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp")
208208
elseif(HAIKU)
209209
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
210+
set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin")
210211

211212
set(TOOLSET_PREFIX ${TOOLCHAIN}-)
212213
function(locate_toolchain_exec exec var)
@@ -217,7 +218,6 @@ elseif(HAIKU)
217218
endif()
218219

219220
find_program(EXEC_LOCATION_${exec}
220-
PATHS "${CROSS_ROOTFS}/cross-tools-x86_64/bin"
221221
NAMES
222222
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
223223
"${TOOLSET_PREFIX}${exec}")

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"perl": "5.38.0.1"
1919
},
2020
"msbuild-sdks": {
21-
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23422.1",
21+
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23451.1",
2222
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
2323
}
2424
}

release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ Contains commits from 32b124966 to d7018737c from dotnet/fsharp. Notable changes
11181118
* lowered allocations for several internal compiler structures
11191119
* better error messages for anonymous record mismatches
11201120
* FSharpChecker learned how to keep background symbol uses
1121-
* Project cracker/project cracker tool were removed
1121+
* The tool for parsing projects was removed
11221122
* Better support for consuming C# in-ref parameters
11231123
* new services around simplifying names and finding unused declarations
11241124
* package management in scripts (in preview)

src/Compiler/Checking/AttributeChecking.fs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m =
281281
| Some _ ->
282282
do! WarnD(ObsoleteWarning("", m))
283283
| None ->
284-
do! CompleteD
284+
()
285285

286286
match TryFindFSharpAttribute g g.attrib_CompilerMessageAttribute attribs with
287287
| Some(Attrib(_, _, [ AttribStringArg s ; AttribInt32Arg n ], namedArgs, _, _, _)) ->
@@ -292,11 +292,14 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m =
292292
| _ -> false
293293
// If we are using a compiler that supports nameof then error 3501 is always suppressed.
294294
// See attribute on FSharp.Core 'nameof'
295-
if n = 3501 then do! CompleteD
296-
elif isError && (not g.compilingFSharpCore || n <> 1204) then do! ErrorD msg
297-
else do! WarnD msg
295+
if n = 3501 then
296+
()
297+
elif isError && (not g.compilingFSharpCore || n <> 1204) then
298+
do! ErrorD msg
299+
else
300+
do! WarnD msg
298301
| _ ->
299-
do! CompleteD
302+
()
300303

301304
match TryFindFSharpAttribute g g.attrib_ExperimentalAttribute attribs with
302305
| Some(Attrib(_, _, [ AttribStringArg(s) ], _, _, _, _)) ->
@@ -305,20 +308,18 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m =
305308
true
306309
else
307310
g.langVersion.IsPreviewEnabled && (s.IndexOf(langVersionPrefix, StringComparison.OrdinalIgnoreCase) >= 0)
308-
if isExperimentalAttributeDisabled s then
309-
do! CompleteD
310-
else
311+
if not (isExperimentalAttributeDisabled s) then
311312
do! WarnD(Experimental(s, m))
312313
| Some _ ->
313314
do! WarnD(Experimental(FSComp.SR.experimentalConstruct (), m))
314315
| _ ->
315-
do! CompleteD
316+
()
316317

317318
match TryFindFSharpAttribute g g.attrib_UnverifiableAttribute attribs with
318319
| Some _ ->
319320
do! WarnD(PossibleUnverifiableCode(m))
320321
| _ ->
321-
do! CompleteD
322+
()
322323
}
323324

324325
#if !NO_TYPEPROVIDERS
@@ -418,7 +419,8 @@ let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
418419
trackErrors {
419420
match stripTyEqns g minfo.ApparentEnclosingAppType with
420421
| TType_app(tcref, _, _) -> do! CheckEntityAttributes g tcref m
421-
| _ -> do! CompleteD
422+
| _ -> ()
423+
422424
let search =
423425
BindMethInfoAttributes m minfo
424426
(fun ilAttribs -> Some(CheckILAttributes g false ilAttribs m))
@@ -428,8 +430,6 @@ let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
428430
do! CheckFSharpAttributes g fsAttribs m
429431
if Option.isNone tyargsOpt && HasFSharpAttribute g g.attrib_RequiresExplicitTypeArgumentsAttribute fsAttribs then
430432
do! ErrorD(Error(FSComp.SR.tcFunctionRequiresExplicitTypeArguments(minfo.LogicalName), m))
431-
else
432-
do! CompleteD
433433
}
434434

435435
Some res)
@@ -440,7 +440,7 @@ let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
440440
#endif
441441
match search with
442442
| Some res -> do! res
443-
| None -> do! CompleteD // no attribute = no errors
443+
| None -> () // no attribute = no errors
444444
}
445445

446446
/// Indicate if a method has 'Obsolete', 'CompilerMessageAttribute' or 'TypeProviderEditorHideMethodsAttribute'.

src/Compiler/Checking/CheckExpressions.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@ let rec TcSynRationalConst c =
757757
| SynRationalConst.Integer(value = i) -> intToRational i
758758
| SynRationalConst.Negate(rationalConst = c2) -> NegRational (TcSynRationalConst c2)
759759
| SynRationalConst.Rational(numerator = p; denominator = q) -> DivRational (intToRational p) (intToRational q)
760+
| SynRationalConst.Paren(rationalConst = c) -> TcSynRationalConst c
760761

761762
/// Typecheck constant terms in expressions and patterns
762763
let TcConst (cenv: cenv) (overallTy: TType) m env synConst =

0 commit comments

Comments
 (0)