Skip to content

Commit 0716cbc

Browse files
authored
Merge branch 'main' into dev/vlza/csharp-class-fields-srtp
2 parents 65fffab + 66beb38 commit 0716cbc

34 files changed

Lines changed: 281 additions & 224 deletions

docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Fixed
22

33
* Fix `YieldFromFinal`/`ReturnFromFinal` being incorrectly called in non-tail positions (`for`, `use`, `use!`, `try/with` handler). ([Issue #19402](https://github.com/dotnet/fsharp/issues/19402), [PR #19403](https://github.com/dotnet/fsharp/pull/19403))
4+
* Fixed how the source ranges of warn directives are reported (as trivia) in the parser output (by not reporting leading spaces). ([Issue #19405](https://github.com/dotnet/fsharp/issues/19405), [PR #19408]((https://github.com/dotnet/fsharp/pull/19408)))
45

56
### Added
67

eng/Version.Details.props

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ This file should be imported by eng/Versions.props
55
-->
66
<Project>
77
<PropertyGroup>
8-
<!-- dotnet/msbuild dependencies -->
9-
<MicrosoftBuildPackageVersion>18.6.0-preview-26156-02</MicrosoftBuildPackageVersion>
10-
<MicrosoftBuildFrameworkPackageVersion>18.6.0-preview-26156-02</MicrosoftBuildFrameworkPackageVersion>
11-
<MicrosoftBuildTasksCorePackageVersion>18.6.0-preview-26156-02</MicrosoftBuildTasksCorePackageVersion>
12-
<MicrosoftBuildUtilitiesCorePackageVersion>18.6.0-preview-26156-02</MicrosoftBuildUtilitiesCorePackageVersion>
13-
<!-- dotnet/roslyn dependencies -->
8+
<!-- dotnet-arcade dependencies -->
9+
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26153.3</MicrosoftDotNetArcadeSdkPackageVersion>
10+
<!-- dotnet-msbuild dependencies -->
11+
<MicrosoftBuildPackageVersion>18.6.0-preview-26159-05</MicrosoftBuildPackageVersion>
12+
<MicrosoftBuildFrameworkPackageVersion>18.6.0-preview-26159-05</MicrosoftBuildFrameworkPackageVersion>
13+
<MicrosoftBuildTasksCorePackageVersion>18.6.0-preview-26159-05</MicrosoftBuildTasksCorePackageVersion>
14+
<MicrosoftBuildUtilitiesCorePackageVersion>18.6.0-preview-26159-05</MicrosoftBuildUtilitiesCorePackageVersion>
15+
<!-- dotnet-optimization dependencies -->
16+
<optimizationlinuxarm64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationlinuxarm64MIBCRuntimePackageVersion>
17+
<optimizationlinuxx64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationlinuxx64MIBCRuntimePackageVersion>
18+
<optimizationwindows_ntarm64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationwindows_ntarm64MIBCRuntimePackageVersion>
19+
<optimizationwindows_ntx64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationwindows_ntx64MIBCRuntimePackageVersion>
20+
<optimizationwindows_ntx86MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationwindows_ntx86MIBCRuntimePackageVersion>
21+
<!-- dotnet-roslyn dependencies -->
1422
<MicrosoftCodeAnalysisPackageVersion>5.6.0-2.26157.2</MicrosoftCodeAnalysisPackageVersion>
1523
<MicrosoftCodeAnalysisCompilersPackageVersion>5.6.0-2.26157.2</MicrosoftCodeAnalysisCompilersPackageVersion>
1624
<MicrosoftCodeAnalysisCSharpPackageVersion>5.6.0-2.26157.2</MicrosoftCodeAnalysisCSharpPackageVersion>
@@ -19,23 +27,28 @@ This file should be imported by eng/Versions.props
1927
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.6.0-2.26157.2</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
2028
<MicrosoftCodeAnalysisFeaturesPackageVersion>5.6.0-2.26157.2</MicrosoftCodeAnalysisFeaturesPackageVersion>
2129
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.6.0-2.26157.2</MicrosoftVisualStudioLanguageServicesPackageVersion>
22-
<!-- dotnet/arcade dependencies -->
23-
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26153.3</MicrosoftDotNetArcadeSdkPackageVersion>
24-
<!-- _git/dotnet-optimization dependencies -->
25-
<optimizationlinuxarm64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationlinuxarm64MIBCRuntimePackageVersion>
26-
<optimizationlinuxx64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationlinuxx64MIBCRuntimePackageVersion>
27-
<optimizationwindows_ntarm64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationwindows_ntarm64MIBCRuntimePackageVersion>
28-
<optimizationwindows_ntx64MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationwindows_ntx64MIBCRuntimePackageVersion>
29-
<optimizationwindows_ntx86MIBCRuntimePackageVersion>1.0.0-prerelease.26153.1</optimizationwindows_ntx86MIBCRuntimePackageVersion>
30+
<!-- dotnet-runtime dependencies -->
31+
<SystemCollectionsImmutablePackageVersion>10.0.2</SystemCollectionsImmutablePackageVersion>
32+
<SystemCompositionPackageVersion>10.0.2</SystemCompositionPackageVersion>
33+
<SystemDiagnosticsDiagnosticSourcePackageVersion>10.0.2</SystemDiagnosticsDiagnosticSourcePackageVersion>
34+
<SystemReflectionMetadataPackageVersion>10.0.2</SystemReflectionMetadataPackageVersion>
3035
</PropertyGroup>
3136
<!--Property group for alternate package version names-->
3237
<PropertyGroup>
33-
<!-- dotnet/msbuild dependencies -->
38+
<!-- dotnet-arcade dependencies -->
39+
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
40+
<!-- dotnet-msbuild dependencies -->
3441
<MicrosoftBuildVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildVersion>
3542
<MicrosoftBuildFrameworkVersion>$(MicrosoftBuildFrameworkPackageVersion)</MicrosoftBuildFrameworkVersion>
3643
<MicrosoftBuildTasksCoreVersion>$(MicrosoftBuildTasksCorePackageVersion)</MicrosoftBuildTasksCoreVersion>
3744
<MicrosoftBuildUtilitiesCoreVersion>$(MicrosoftBuildUtilitiesCorePackageVersion)</MicrosoftBuildUtilitiesCoreVersion>
38-
<!-- dotnet/roslyn dependencies -->
45+
<!-- dotnet-optimization dependencies -->
46+
<optimizationlinuxarm64MIBCRuntimeVersion>$(optimizationlinuxarm64MIBCRuntimePackageVersion)</optimizationlinuxarm64MIBCRuntimeVersion>
47+
<optimizationlinuxx64MIBCRuntimeVersion>$(optimizationlinuxx64MIBCRuntimePackageVersion)</optimizationlinuxx64MIBCRuntimeVersion>
48+
<optimizationwindows_ntarm64MIBCRuntimeVersion>$(optimizationwindows_ntarm64MIBCRuntimePackageVersion)</optimizationwindows_ntarm64MIBCRuntimeVersion>
49+
<optimizationwindows_ntx64MIBCRuntimeVersion>$(optimizationwindows_ntx64MIBCRuntimePackageVersion)</optimizationwindows_ntx64MIBCRuntimeVersion>
50+
<optimizationwindows_ntx86MIBCRuntimeVersion>$(optimizationwindows_ntx86MIBCRuntimePackageVersion)</optimizationwindows_ntx86MIBCRuntimeVersion>
51+
<!-- dotnet-roslyn dependencies -->
3952
<MicrosoftCodeAnalysisVersion>$(MicrosoftCodeAnalysisPackageVersion)</MicrosoftCodeAnalysisVersion>
4053
<MicrosoftCodeAnalysisCompilersVersion>$(MicrosoftCodeAnalysisCompilersPackageVersion)</MicrosoftCodeAnalysisCompilersVersion>
4154
<MicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisCSharpVersion>
@@ -44,13 +57,10 @@ This file should be imported by eng/Versions.props
4457
<MicrosoftCodeAnalysisExternalAccessFSharpVersion>$(MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion)</MicrosoftCodeAnalysisExternalAccessFSharpVersion>
4558
<MicrosoftCodeAnalysisFeaturesVersion>$(MicrosoftCodeAnalysisFeaturesPackageVersion)</MicrosoftCodeAnalysisFeaturesVersion>
4659
<MicrosoftVisualStudioLanguageServicesVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion)</MicrosoftVisualStudioLanguageServicesVersion>
47-
<!-- dotnet/arcade dependencies -->
48-
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
49-
<!-- _git/dotnet-optimization dependencies -->
50-
<optimizationlinuxarm64MIBCRuntimeVersion>$(optimizationlinuxarm64MIBCRuntimePackageVersion)</optimizationlinuxarm64MIBCRuntimeVersion>
51-
<optimizationlinuxx64MIBCRuntimeVersion>$(optimizationlinuxx64MIBCRuntimePackageVersion)</optimizationlinuxx64MIBCRuntimeVersion>
52-
<optimizationwindows_ntarm64MIBCRuntimeVersion>$(optimizationwindows_ntarm64MIBCRuntimePackageVersion)</optimizationwindows_ntarm64MIBCRuntimeVersion>
53-
<optimizationwindows_ntx64MIBCRuntimeVersion>$(optimizationwindows_ntx64MIBCRuntimePackageVersion)</optimizationwindows_ntx64MIBCRuntimeVersion>
54-
<optimizationwindows_ntx86MIBCRuntimeVersion>$(optimizationwindows_ntx86MIBCRuntimePackageVersion)</optimizationwindows_ntx86MIBCRuntimeVersion>
60+
<!-- dotnet-runtime dependencies -->
61+
<SystemCollectionsImmutableVersion>$(SystemCollectionsImmutablePackageVersion)</SystemCollectionsImmutableVersion>
62+
<SystemCompositionVersion>$(SystemCompositionPackageVersion)</SystemCompositionVersion>
63+
<SystemDiagnosticsDiagnosticSourceVersion>$(SystemDiagnosticsDiagnosticSourcePackageVersion)</SystemDiagnosticsDiagnosticSourceVersion>
64+
<SystemReflectionMetadataVersion>$(SystemReflectionMetadataPackageVersion)</SystemReflectionMetadataVersion>
5565
</PropertyGroup>
5666
</Project>

eng/Version.Details.xml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="fsharp" Sha="357ce6ebe894f50bdc4ffd7c26c86710789fe060" BarId="304778" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="fsharp" Sha="5121846aac455d48f990a10e569c90e3ab1e359a" BarId="305296" />
44
<ProductDependencies>
5-
<Dependency Name="Microsoft.Build" Version="18.6.0-preview-26156-02">
5+
<Dependency Name="Microsoft.Build" Version="18.6.0-preview-26159-05">
66
<Uri>https://github.com/dotnet/msbuild</Uri>
7-
<Sha>6500dd278aed2749db445942790934e3c0d8c729</Sha>
7+
<Sha>ef957b7daa9e0ea5339305953e2c1fdefeb8a14c</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.Build.Framework" Version="18.6.0-preview-26156-02">
9+
<Dependency Name="Microsoft.Build.Framework" Version="18.6.0-preview-26159-05">
1010
<Uri>https://github.com/dotnet/msbuild</Uri>
11-
<Sha>6500dd278aed2749db445942790934e3c0d8c729</Sha>
11+
<Sha>ef957b7daa9e0ea5339305953e2c1fdefeb8a14c</Sha>
1212
</Dependency>
13-
<Dependency Name="Microsoft.Build.Tasks.Core" Version="18.6.0-preview-26156-02">
13+
<Dependency Name="Microsoft.Build.Tasks.Core" Version="18.6.0-preview-26159-05">
1414
<Uri>https://github.com/dotnet/msbuild</Uri>
15-
<Sha>6500dd278aed2749db445942790934e3c0d8c729</Sha>
15+
<Sha>ef957b7daa9e0ea5339305953e2c1fdefeb8a14c</Sha>
1616
</Dependency>
17-
<Dependency Name="Microsoft.Build.Utilities.Core" Version="18.6.0-preview-26156-02">
17+
<Dependency Name="Microsoft.Build.Utilities.Core" Version="18.6.0-preview-26159-05">
1818
<Uri>https://github.com/dotnet/msbuild</Uri>
19-
<Sha>6500dd278aed2749db445942790934e3c0d8c729</Sha>
19+
<Sha>ef957b7daa9e0ea5339305953e2c1fdefeb8a14c</Sha>
2020
</Dependency>
2121
<Dependency Name="Microsoft.CodeAnalysis" Version="5.6.0-2.26157.2">
2222
<Uri>https://github.com/dotnet/roslyn</Uri>
@@ -50,6 +50,30 @@
5050
<Uri>https://github.com/dotnet/roslyn</Uri>
5151
<Sha>43acf64dec4f26625357486891c73d97cf4ba695</Sha>
5252
</Dependency>
53+
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
54+
<Dependency Name="System.Collections.Immutable" Version="10.0.2">
55+
<Uri>https://github.com/dotnet/runtime</Uri>
56+
<Sha>
57+
</Sha>
58+
</Dependency>
59+
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
60+
<Dependency Name="System.Composition" Version="10.0.2">
61+
<Uri>https://github.com/dotnet/runtime</Uri>
62+
<Sha>
63+
</Sha>
64+
</Dependency>
65+
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
66+
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="10.0.2">
67+
<Uri>https://github.com/dotnet/runtime</Uri>
68+
<Sha>
69+
</Sha>
70+
</Dependency>
71+
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
72+
<Dependency Name="System.Reflection.Metadata" Version="10.0.2">
73+
<Uri>https://github.com/dotnet/runtime</Uri>
74+
<Sha>
75+
</Sha>
76+
</Dependency>
5377
</ProductDependencies>
5478
<ToolsetDependencies>
5579
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26153.3">

eng/Versions.props

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,7 @@
8989
<SystemBuffersVersion>4.6.1</SystemBuffersVersion>
9090
<SystemMemoryVersion>4.6.3</SystemMemoryVersion>
9191
<SystemRuntimeCompilerServicesUnsafeVersion>6.1.2</SystemRuntimeCompilerServicesUnsafeVersion>
92-
<!-- System.* packages from dotnet/runtime, aligned with MSBuild and Roslyn deps. -->
93-
<SystemPackagesVersion>10.0.2</SystemPackagesVersion>
94-
<SystemCollectionsImmutableVersion>$(SystemPackagesVersion)</SystemCollectionsImmutableVersion>
95-
<SystemCompositionVersion>$(SystemPackagesVersion)</SystemCompositionVersion>
96-
<SystemDiagnosticsDiagnosticSourceVersion>$(SystemPackagesVersion)</SystemDiagnosticsDiagnosticSourceVersion>
97-
<SystemReflectionMetadataVersion>$(SystemPackagesVersion)</SystemReflectionMetadataVersion>
92+
<!-- System.* packages from dotnet/runtime are managed in Version.Details.xml / Version.Details.props for source-build. -->
9893
</PropertyGroup>
9994

10095
<PropertyGroup>

src/Compiler/SyntaxTree/WarnScopes.fs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ module internal WarnScopes =
117117
let startPos = lexbuf.StartPos
118118

119119
let mGroups = (regex.Match text).Groups
120-
let totalLength = mGroups[0].Length
120+
let indentation = mGroups[1].Length
121+
let directiveLength = mGroups[0].Length - indentation
121122
let dIdent = mGroups[2].Value
122123
let argCaptures = [ for c in mGroups[3].Captures -> c ]
123124

@@ -128,7 +129,7 @@ module internal WarnScopes =
128129
positions lexbuf.StartPos.Line offset length
129130
||> mkFileIndexRange startPos.FileIndex
130131

131-
let directiveRange = mkRange 0 totalLength
132+
let directiveRange = mkRange indentation directiveLength
132133

133134
if argCaptures.IsEmpty then
134135
errorR (Error(FSComp.SR.lexWarnDirectiveMustHaveArgs (), directiveRange))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let x =
2+
#nowarn 20
3+
()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ImplFile
2+
(ParsedImplFileInput
3+
("/root/WarnScope/IndentedWarnDirective.fs", false,
4+
QualifiedNameOfFile IndentedWarnDirective, [],
5+
[SynModuleOrNamespace
6+
([IndentedWarnDirective], false, AnonModule,
7+
[Let
8+
(false,
9+
[SynBinding
10+
(None, Normal, false, false, [],
11+
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector),
12+
SynValData
13+
(None, SynValInfo ([], SynArgInfo ([], false, None)), None),
14+
Named (SynIdent (x, None), false, None, (1,4--1,5)), None,
15+
Const (Unit, (3,4--3,6)), (1,4--1,5), Yes (1,0--3,6),
16+
{ LeadingKeyword = Let (1,0--1,3)
17+
InlineKeyword = None
18+
EqualsRange = Some (1,6--1,7) })], (1,0--3,6),
19+
{ InKeyword = None })], PreXmlDocEmpty, [], None, (1,0--4,0),
20+
{ LeadingKeyword = None })], (true, true),
21+
{ ConditionalDirectives = []
22+
WarnDirectives = [Nowarn (2,4--2,14)]
23+
CodeComments = [] }, set []))

tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs.bsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ ImplFile
1717
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
1818
(1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
1919
{ ConditionalDirectives = []
20-
WarnDirectives = [Nowarn (3,0--3,17); Warnon (5,0--5,30)]
20+
WarnDirectives = [Nowarn (3,4--3,17); Warnon (5,4--5,30)]
2121
CodeComments = [] }, set []))

vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.cs.xlf

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.de.xlf

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)