Skip to content

Commit 7fb0864

Browse files
authored
Merge 'main' into UserDefinedCompoundAssignment (#78262)
2 parents 96a2dcd + 3ca1d1e commit 7fb0864

File tree

365 files changed

+4354
-2753
lines changed

Some content is hidden

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

365 files changed

+4354
-2753
lines changed

.vscode/launch.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,51 @@
6262
"stopAtEntry": false,
6363
"console": "internalConsole"
6464
},
65+
{
66+
"name": "Launch Microsoft.Build.Tasks.CodeAnalysis.dll via MSBuild.exe (netfx)",
67+
"type": "clr",
68+
"request": "launch",
69+
"preLaunchTask": "build toolset",
70+
"program": "C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/amd64/MSBuild.exe",
71+
"args": [
72+
"-restore",
73+
"-p:RoslynTargetsPath=${workspaceFolder}/artifacts/bin/Microsoft.Net.Compilers.Toolset.Package/Debug/tasks/net472",
74+
],
75+
// A simple project that can be used to debug the build tasks against.
76+
"cwd": "${workspaceFolder}/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator",
77+
"stopAtEntry": false,
78+
"console": "internalConsole"
79+
},
80+
{
81+
"name": "Launch Microsoft.Build.Tasks.CodeAnalysis.dll via MSBuild.exe (netcore)",
82+
"type": "clr",
83+
"request": "launch",
84+
"preLaunchTask": "build toolset",
85+
"program": "C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/amd64/MSBuild.exe",
86+
"args": [
87+
"-restore",
88+
"-p:RoslynTargetsPath=${workspaceFolder}/artifacts/bin/Microsoft.Net.Compilers.Toolset.Package/Debug/tasks/netcore",
89+
],
90+
// A simple project that can be used to debug the build tasks against.
91+
"cwd": "${workspaceFolder}/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator",
92+
"stopAtEntry": false,
93+
"console": "internalConsole"
94+
},
95+
{
96+
"name": "Launch Microsoft.Build.Tasks.CodeAnalysis.dll via dotnet build",
97+
"type": "coreclr",
98+
"request": "launch",
99+
"preLaunchTask": "build toolset",
100+
"program": "dotnet",
101+
"args": [
102+
"build",
103+
"-p:RoslynTargetsPath=${workspaceFolder}/artifacts/bin/Microsoft.Net.Compilers.Toolset.Package/Debug/tasks/netcore",
104+
],
105+
// A simple project that can be used to debug the build tasks against.
106+
"cwd": "${workspaceFolder}/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator",
107+
"stopAtEntry": false,
108+
"console": "internalConsole"
109+
},
65110
{
66111
"name": ".NET Core Launch (console)",
67112
"type": "coreclr",

.vscode/tasks.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@
9797
"problemMatcher": "$msCompile",
9898
"group": "build"
9999
},
100+
{
101+
"label": "build toolset",
102+
"type": "shell",
103+
"command": "dotnet",
104+
"args": [
105+
"build",
106+
"-p:GenerateFullPaths=true",
107+
"${workspaceFolder}/src/NuGet/Microsoft.Net.Compilers.Toolset/AnyCpu/Microsoft.Net.Compilers.Toolset.Package.csproj"
108+
],
109+
"problemMatcher": "$msCompile",
110+
"group": "build"
111+
},
100112
{
101113
"label": "msbuild current project",
102114
"type": "shell",

azure-pipelines-official.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ parameters:
4444
type: boolean
4545
default: true
4646

47+
# An optional VS commit SHA that will be automatically cherry-picked
48+
# to the insertion PR created by this build.
49+
- name: VisualStudioCherryPickSHA
50+
type: string
51+
default: '(default)'
52+
4753
schedules:
4854
- cron: "0 8 23-29 * 0"
4955
displayName: "Monthly smoke test"
@@ -394,6 +400,7 @@ extends:
394400
publishDataURI: "https://dev.azure.com/dnceng/internal/_apis/git/repositories/dotnet-roslyn/items?path=eng/config/PublishData.json&api-version=6.0"
395401
publishDataAccessToken: "$(System.AccessToken)"
396402
dropPath: '$(Pipeline.Workspace)\VSSetup'
403+
cherryPick: ${{ parameters.VisualStudioCherryPickSHA }}
397404

398405
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
399406
- template: /eng/common/templates-official/post-build/post-build.yml@self

azure-pipelines-pr-validation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ parameters:
2222
- name: OptionalTitlePrefix
2323
type: string
2424
default: '[PR Validation]'
25+
- name: VisualStudioCherryPickSHA
26+
type: string
27+
default: '(default)'
2528
- name: InsertToolset
2629
type: boolean
2730
default: true
@@ -323,6 +326,7 @@ extends:
323326
queueSpeedometerValidation: true
324327
dropPath: '$(Pipeline.Workspace)\VSSetup'
325328
retainInsertedBuild: false
329+
cherryPick: ${{ parameters.VisualStudioCherryPickSHA }}
326330
# Arcade is done so we can set BuildNumber back
327331
- powershell: Write-Host "##vso[build.updatebuildnumber]$(FancyBuildNumber)"
328332
displayName: Reset BuildNumber

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
1414
</Dependency>
1515
<!-- Intermediate is necessary for source build. -->
16-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="10.0.620702">
16+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="10.0.621601">
1717
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
18-
<Sha>8a21184a27103ca3e365b21553e32f2a1c0661d3</Sha>
18+
<Sha>4b566314cf9602b77f25538a88b9c8175231c106</Sha>
1919
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
2020
</Dependency>
21-
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.24528.1">
21+
<Dependency Name="System.CommandLine" Version="2.0.0-beta5.25210.1">
2222
<Uri>https://github.com/dotnet/command-line-api</Uri>
23-
<Sha>feb61c7f328a2401d74f4317b39d02126cfdfe24</Sha>
23+
<Sha>e9b0511d7f1128e2bc3be7a658a2a4ea977e602d</Sha>
2424
</Dependency>
2525
<!-- Intermediate is necessary for source build. -->
26-
<Dependency Name="Microsoft.SourceBuild.Intermediate.command-line-api" Version="0.1.552801">
26+
<Dependency Name="Microsoft.SourceBuild.Intermediate.command-line-api" Version="0.1.621001">
2727
<Uri>https://github.com/dotnet/command-line-api</Uri>
28-
<Sha>feb61c7f328a2401d74f4317b39d02126cfdfe24</Sha>
28+
<Sha>e9b0511d7f1128e2bc3be7a658a2a4ea977e602d</Sha>
2929
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
3030
</Dependency>
3131
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
Versions managed by Arcade (see Versions.Details.xml)
4949
-->
5050
<PropertyGroup>
51-
<SystemCommandLineVersion>2.0.0-beta4.24528.1</SystemCommandLineVersion>
51+
<SystemCommandLineVersion>2.0.0-beta5.25210.1</SystemCommandLineVersion>
5252
<SystemCompositionVersion>9.0.0</SystemCompositionVersion>
5353
<SystemConfigurationConfigurationManagerVersion>9.0.0</SystemConfigurationConfigurationManagerVersion>
5454
<SystemDiagnosticsEventLogVersion>9.0.0</SystemDiagnosticsEventLogVersion>

eng/config/PublishData.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"Microsoft.VisualStudio.LanguageServices.LiveShare": "vs-impl",
9696
"Microsoft.VisualStudio.LanguageServices.Razor.RemoteClient": "vs-impl",
9797
"Microsoft.VisualStudio.LanguageServices.ExternalAccess.Copilot": "vs-impl",
98+
"Microsoft.VisualStudio.LanguageServices.Xaml": "vs-impl",
9899
"Microsoft.CommonLanguageServerProtocol.Framework": "vs-impl",
99100
"Microsoft.CommonLanguageServerProtocol.Framework.Binary": "vs-impl",
100101
"Microsoft.CodeAnalysis.Analyzers": "arcade",
@@ -170,7 +171,7 @@
170171
"NonShipping"
171172
],
172173
"vsBranch": "rel/d17.14",
173-
"insertionTitlePrefix": "[d17.14 P3]",
174+
"insertionTitlePrefix": "[d17.14]",
174175
"insertionCreateDraftPR": false
175176
},
176177
"main": {

eng/pipelines/insert.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ parameters:
5050
type: string
5151
default: ''
5252

53+
- name: cherryPick
54+
type: string
55+
5356
steps:
5457
- checkout: none
5558

@@ -183,7 +186,7 @@ steps:
183186
.\RIT\tools\net472\OneOffInsertion.ps1 `
184187
-autoComplete "$(Template.AutoComplete)" `
185188
-buildQueueName "$(Build.DefinitionName)" `
186-
-cherryPick "(default)" `
189+
-cherryPick "${{ parameters.cherryPick }}" `
187190
-userName "$(Template.BuildUserName)" `
188191
-password "$(Template.BuildPassword)" `
189192
-componentUserName "$(Template.ComponentUserName)" `

src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,4 +3530,33 @@ public unsafe void ToUnmanaged()
35303530
ReferenceAssemblies = ReferenceAssemblies.Net.Net90,
35313531
}.RunAsync();
35323532
}
3533+
3534+
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/77251")]
3535+
public async Task TestRefFieldWrittenNotRead()
3536+
{
3537+
await new VerifyCS.Test
3538+
{
3539+
TestCode = """
3540+
public readonly ref struct RefScope<T>
3541+
{
3542+
public RefScope(ref T originalvalue, T newvalue)
3543+
{
3544+
_OriginalValue = originalvalue;
3545+
_Reference = ref originalvalue;
3546+
originalvalue = newvalue;
3547+
}
3548+
3549+
readonly ref T _Reference; // Should get no diagnostic here.
3550+
readonly T _OriginalValue;
3551+
3552+
public void Dispose()
3553+
{
3554+
_Reference = _OriginalValue;
3555+
}
3556+
}
3557+
""",
3558+
LanguageVersion = LanguageVersion.CSharp13,
3559+
ReferenceAssemblies = ReferenceAssemblies.Net.Net90,
3560+
}.RunAsync();
3561+
}
35333562
}

src/Analyzers/CSharp/Tests/UseAutoProperty/UseAutoPropertyTests.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,4 +3134,52 @@ int P
31343134
}
31353135
""");
31363136
}
3137+
3138+
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/78225")]
3139+
public async Task TestRefProperty1()
3140+
{
3141+
await TestMissingInRegularAndScriptAsync(
3142+
"""
3143+
class Class
3144+
{
3145+
[|int i|];
3146+
3147+
ref int P
3148+
{
3149+
get
3150+
{
3151+
return ref i;
3152+
}
3153+
}
3154+
}
3155+
""");
3156+
}
3157+
3158+
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/78225")]
3159+
public async Task TestRefProperty2()
3160+
{
3161+
await TestMissingInRegularAndScriptAsync(
3162+
"""
3163+
class Class
3164+
{
3165+
[|int i|];
3166+
3167+
ref int P => ref i;
3168+
}
3169+
""");
3170+
}
3171+
3172+
[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/78225")]
3173+
public async Task TestRefProperty3()
3174+
{
3175+
await TestMissingInRegularAndScriptAsync(
3176+
"""
3177+
class Class
3178+
{
3179+
[|int i|];
3180+
3181+
readonly ref int P => ref i;
3182+
}
3183+
""");
3184+
}
31373185
}

0 commit comments

Comments
 (0)