Skip to content

Commit 4e4b1ff

Browse files
committed
Merge remote-tracking branch 'upstream/main' into add-test
* upstream/main: Simplify sequence point display (dotnet#81104) [main] Update dependencies from dotnet/arcade (dotnet#81129) [main] Update dependencies from dotnet/arcade (dotnet#81105) Target typed conditional expression recovery (dotnet#81025) dotnet#81118: Fix dropdown in "Move static members" dialog (dotnet#81119) Don't emit DebuggerStepThroughAttribute for runtime async methods (dotnet#81035)
2 parents e3e8ee4 + 0544ad5 commit 4e4b1ff

File tree

51 files changed

+751
-219
lines changed

Some content is hidden

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

51 files changed

+751
-219
lines changed

eng/Version.Details.props

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ This file should be imported by eng/Versions.props
3737
<SystemTextJsonPackageVersion>9.0.0</SystemTextJsonPackageVersion>
3838
<SystemThreadingTasksDataflowPackageVersion>9.0.0</SystemThreadingTasksDataflowPackageVersion>
3939
<SystemWindowsExtensionsPackageVersion>9.0.0</SystemWindowsExtensionsPackageVersion>
40+
<!-- dotnet/sdk dependencies -->
41+
<MicrosoftDotNetFileBasedProgramsPackageVersion>10.0.200-preview.0.25556.104</MicrosoftDotNetFileBasedProgramsPackageVersion>
4042
<!-- dotnet/arcade dependencies -->
41-
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25556.3</MicrosoftDotNetArcadeSdkPackageVersion>
42-
<MicrosoftDotNetHelixSdkPackageVersion>11.0.0-beta.25556.3</MicrosoftDotNetHelixSdkPackageVersion>
43-
<MicrosoftDotNetXliffTasksPackageVersion>11.0.0-beta.25556.3</MicrosoftDotNetXliffTasksPackageVersion>
43+
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25560.1</MicrosoftDotNetArcadeSdkPackageVersion>
44+
<MicrosoftDotNetHelixSdkPackageVersion>11.0.0-beta.25560.1</MicrosoftDotNetHelixSdkPackageVersion>
45+
<MicrosoftDotNetXliffTasksPackageVersion>11.0.0-beta.25560.1</MicrosoftDotNetXliffTasksPackageVersion>
4446
<!-- dotnet/symreader dependencies -->
4547
<MicrosoftDiaSymReaderPackageVersion>2.0.0</MicrosoftDiaSymReaderPackageVersion>
4648
<!-- dotnet/arcade-services dependencies -->
4749
<MicrosoftDotNetDarcLibPackageVersion>1.1.0-beta.25503.1</MicrosoftDotNetDarcLibPackageVersion>
48-
<!-- dotnet/sdk dependencies -->
49-
<MicrosoftDotNetFileBasedProgramsPackageVersion>10.0.200-preview.0.25556.104</MicrosoftDotNetFileBasedProgramsPackageVersion>
5050
<!-- dotnet/roslyn-analyzers dependencies -->
5151
<MicrosoftCodeAnalysisAnalyzersPackageVersion>3.11.0</MicrosoftCodeAnalysisAnalyzersPackageVersion>
5252
<MicrosoftCodeAnalysisAnalyzerUtilitiesPackageVersion>3.3.0</MicrosoftCodeAnalysisAnalyzerUtilitiesPackageVersion>
@@ -86,6 +86,8 @@ This file should be imported by eng/Versions.props
8686
<SystemTextJsonVersion>$(SystemTextJsonPackageVersion)</SystemTextJsonVersion>
8787
<SystemThreadingTasksDataflowVersion>$(SystemThreadingTasksDataflowPackageVersion)</SystemThreadingTasksDataflowVersion>
8888
<SystemWindowsExtensionsVersion>$(SystemWindowsExtensionsPackageVersion)</SystemWindowsExtensionsVersion>
89+
<!-- dotnet/sdk dependencies -->
90+
<MicrosoftDotNetFileBasedProgramsVersion>$(MicrosoftDotNetFileBasedProgramsPackageVersion)</MicrosoftDotNetFileBasedProgramsVersion>
8991
<!-- dotnet/arcade dependencies -->
9092
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
9193
<MicrosoftDotNetHelixSdkVersion>$(MicrosoftDotNetHelixSdkPackageVersion)</MicrosoftDotNetHelixSdkVersion>

eng/Version.Details.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,19 @@
113113
<Uri>https://github.com/dotnet/runtime</Uri>
114114
<Sha>9d5a6a9aa463d6d10b0b0ba6d5982cc82f363dc3</Sha>
115115
</Dependency>
116+
<Dependency Name="Microsoft.DotNet.FileBasedPrograms" Version="10.0.200-preview.0.25556.104">
117+
<Uri>https://github.com/dotnet/sdk</Uri>
118+
<Sha>cc979c006a27c251782bee45e8887213c24bf806</Sha>
119+
</Dependency>
116120
</ProductDependencies>
117121
<ToolsetDependencies>
118-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25556.3">
122+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25560.1">
119123
<Uri>https://github.com/dotnet/arcade</Uri>
120-
<Sha>36fa2ff1495d2b55b5cb9e2a42514d94c6af10b9</Sha>
124+
<Sha>3a7f017be1c42a4ecc516446977cf55d429cf390</Sha>
121125
</Dependency>
122-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="11.0.0-beta.25556.3">
126+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="11.0.0-beta.25560.1">
123127
<Uri>https://github.com/dotnet/arcade</Uri>
124-
<Sha>36fa2ff1495d2b55b5cb9e2a42514d94c6af10b9</Sha>
128+
<Sha>3a7f017be1c42a4ecc516446977cf55d429cf390</Sha>
125129
</Dependency>
126130
<Dependency Name="Microsoft.DiaSymReader" Version="2.0.0">
127131
<Uri>https://github.com/dotnet/symreader</Uri>
@@ -131,9 +135,9 @@
131135
<Uri>https://github.com/dotnet/roslyn</Uri>
132136
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
133137
</Dependency>
134-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="11.0.0-beta.25556.3">
138+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="11.0.0-beta.25560.1">
135139
<Uri>https://github.com/dotnet/arcade</Uri>
136-
<Sha>36fa2ff1495d2b55b5cb9e2a42514d94c6af10b9</Sha>
140+
<Sha>3a7f017be1c42a4ecc516446977cf55d429cf390</Sha>
137141
</Dependency>
138142
<Dependency Name="Microsoft.DotNet.DarcLib" Version="1.1.0-beta.25503.1">
139143
<Uri>https://github.com/dotnet/arcade-services</Uri>

eng/common/core-templates/steps/source-index-stage1-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ steps:
1414
workingDirectory: $(Agent.TempDirectory)
1515

1616
- script: |
17-
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
18-
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
17+
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
18+
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
1919
displayName: "Source Index: Download netsourceindex Tools"
2020
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
2121
workingDirectory: $(Agent.TempDirectory)

eng/common/native/install-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ case "$os" in
2727
libssl-dev libkrb5-dev pigz cpio
2828

2929
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
30-
elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ]; then
30+
elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ] || [ "$ID" = "centos"]; then
3131
pkg_mgr="$(command -v tdnf 2>/dev/null || command -v dnf)"
3232
$pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio
3333
elif [ "$ID" = "amzn" ]; then

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"xcopy-msbuild": "17.14.16"
1414
},
1515
"msbuild-sdks": {
16-
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25556.3",
17-
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.25556.3",
16+
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25560.1",
17+
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.25560.1",
1818
"Microsoft.Build.Traversal": "3.4.0"
1919
}
2020
}

src/Compilers/CSharp/Portable/Binder/Binder.ValueChecks.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ private BoundExpression CheckValue(BoundExpression expr, BindValueKind valueKind
805805

806806
case BoundKind.UnconvertedObjectCreationExpression:
807807
case BoundKind.UnconvertedCollectionExpression:
808+
case BoundKind.UnconvertedConditionalOperator:
808809
case BoundKind.TupleLiteral:
809810
if (valueKind == BindValueKind.RValue)
810811
{

src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,22 @@ internal BoundExpression BindToNaturalType(BoundExpression expression, BindingDi
321321
Debug.Assert(op.NoCommonTypeError != 0);
322322
type = CreateErrorType();
323323
hasErrors = true;
324-
object trueArg = op.Consequence.Display;
325-
object falseArg = op.Alternative.Display;
326-
if (op.NoCommonTypeError == ErrorCode.ERR_InvalidQM && trueArg is Symbol trueSymbol && falseArg is Symbol falseSymbol)
324+
325+
if (!op.HasAnyErrors)
327326
{
328-
// ERR_InvalidQM is an error that there is no conversion between the two types. They might be the same
329-
// type name from different assemblies, so we disambiguate the display.
330-
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.Compilation, trueSymbol, falseSymbol);
331-
trueArg = distinguisher.First;
332-
falseArg = distinguisher.Second;
333-
}
327+
object trueArg = op.Consequence.Display;
328+
object falseArg = op.Alternative.Display;
329+
if (op.NoCommonTypeError == ErrorCode.ERR_InvalidQM && trueArg is Symbol trueSymbol && falseArg is Symbol falseSymbol)
330+
{
331+
// ERR_InvalidQM is an error that there is no conversion between the two types. They might be the same
332+
// type name from different assemblies, so we disambiguate the display.
333+
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.Compilation, trueSymbol, falseSymbol);
334+
trueArg = distinguisher.First;
335+
falseArg = distinguisher.Second;
336+
}
334337

335-
diagnostics.Add(op.NoCommonTypeError, op.Syntax.Location, trueArg, falseArg);
338+
diagnostics.Add(op.NoCommonTypeError, op.Syntax.Location, trueArg, falseArg);
339+
}
336340
}
337341

338342
result = ConvertConditionalExpression(op, type, conversionIfTargetTyped: null, diagnostics, hasErrors);

src/Compilers/CSharp/Portable/Symbols/Source/SourceMethodSymbol.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,12 @@ internal static void AddSynthesizedAttributes(MethodSymbol target, PEModuleBuild
168168
// Regular async (not async-iterator) kick-off method calls MoveNext, which contains user code.
169169
// This means we need to emit DebuggerStepThroughAttribute in order
170170
// to have correct stepping behavior during debugging.
171-
AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDebuggerStepThroughAttribute());
171+
// However, when runtime async is enabled, no state machine is generated and the kickoff method
172+
// directly contains the async logic, so the attribute should not be added.
173+
if (!compilation.IsRuntimeAsyncEnabledIn(target))
174+
{
175+
AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDebuggerStepThroughAttribute());
176+
}
172177
}
173178
}
174179

src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenAsyncEHTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ .locals init (int V_0,
13421342
IL_01c6: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
13431343
IL_01cb: nop
13441344
IL_01cc: ret
1345-
}", sequencePoints: "Test+<G>d__1.MoveNext");
1345+
}", sequencePointDisplay: SequencePointDisplayMode.Minimal);
13461346

13471347
var comp = CreateRuntimeAsyncCompilation(source, TestOptions.ReleaseExe);
13481348
var verifier = CompileAndVerify(comp, expectedOutput: RuntimeAsyncTestHelpers.ExpectedOutput(expected), verify: Verification.Fails with

src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenAsyncIteratorTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ .maxstack 1
26162616
IL_0000: ldc.i4.s -2
26172617
IL_0002: newobj ""C.<M>d__0..ctor(int)""
26182618
IL_0007: ret
2619-
}", sequencePoints: "C.M", source: source);
2619+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
26202620

26212621
if (options == TestOptions.DebugExe)
26222622
{
@@ -2637,7 +2637,7 @@ .maxstack 2
26372637
IL_001a: call ""int System.Environment.CurrentManagedThreadId.get""
26382638
IL_001f: stfld ""int C.<M>d__0.<>l__initialThreadId""
26392639
IL_0024: ret
2640-
}", sequencePoints: "C+<M>d__0..ctor", source: source);
2640+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
26412641
}
26422642
else
26432643
{
@@ -2657,7 +2657,7 @@ .maxstack 2
26572657
IL_0019: call ""int System.Environment.CurrentManagedThreadId.get""
26582658
IL_001e: stfld ""int C.<M>d__0.<>l__initialThreadId""
26592659
IL_0023: ret
2660-
}", sequencePoints: "C+<M>d__0..ctor", source: source);
2660+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
26612661
}
26622662

26632663
verifier.VerifyIL("C.<M>d__0.System.Collections.Generic.IAsyncEnumerator<int>.get_Current()", @"
@@ -2984,7 +2984,7 @@ .locals init (int V_0,
29842984
IL_0149: call ""void System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<bool>.SetResult(bool)""
29852985
IL_014e: nop
29862986
IL_014f: ret
2987-
}", sequencePoints: "C+<M>d__0.MoveNext", source: source);
2987+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
29882988
}
29892989
else
29902990
{
@@ -3131,7 +3131,7 @@ .locals init (int V_0,
31313131
IL_0133: ldc.i4.1
31323132
IL_0134: call ""void System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<bool>.SetResult(bool)""
31333133
IL_0139: ret
3134-
}", sequencePoints: "C+<M>d__0.MoveNext", source: source);
3134+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
31353135
}
31363136
}
31373137
}
@@ -3398,7 +3398,7 @@ .locals init (int V_0,
33983398
IL_0150: ldc.i4.1
33993399
IL_0151: call ""void System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<bool>.SetResult(bool)""
34003400
IL_0156: ret
3401-
}", sequencePoints: "C+<M>d__0.MoveNext", source: source);
3401+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
34023402
}
34033403

34043404
[Theory]
@@ -3666,7 +3666,7 @@ .locals init (int V_0,
36663666
IL_0150: ldc.i4.1
36673667
IL_0151: call ""void System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<bool>.SetResult(bool)""
36683668
IL_0156: ret
3669-
}", sequencePoints: "C+<M>d__0.MoveNext", source: source);
3669+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
36703670
}
36713671

36723672
[Fact]
@@ -3935,7 +3935,7 @@ .locals init (int V_0,
39353935
IL_0150: ldc.i4.1
39363936
IL_0151: call ""void System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<bool>.SetResult(bool)""
39373937
IL_0156: ret
3938-
}", sequencePoints: "C+<<M>g__local|0_0>d.MoveNext", source: source);
3938+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
39393939
}
39403940

39413941
[Fact]
@@ -4154,7 +4154,7 @@ .locals init (int V_0,
41544154
IL_0149: ldc.i4.1
41554155
IL_014a: call ""void System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<bool>.SetResult(bool)""
41564156
IL_014f: ret
4157-
}", sequencePoints: "C+<M>d__0.MoveNext", source: source);
4157+
}", sequencePointDisplay: SequencePointDisplayMode.Enhanced);
41584158
}
41594159

41604160
private static void VerifyStateMachineFields(CSharpCompilation comp, string methodName, string[] expectedFields)

0 commit comments

Comments
 (0)