Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
586 changes: 293 additions & 293 deletions .config/CredScanSuppressions.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/roslyn/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@
"command": "dotnet",
"type": "shell",
"args": [
"pwsh",
"${workspaceFolder}/eng/generate-compiler-code.ps1"
"run",
"--file",
"${workspaceFolder}/eng/generate-compiler-code.cs"
],
"problemMatcher": "$msCompile",
"group": "build"
Expand Down
4 changes: 2 additions & 2 deletions src/roslyn/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<Import Project="eng\Directory.Packages.props" />
</Project>
<Import Project="eng\Packages.props" />
</Project>
13 changes: 6 additions & 7 deletions src/roslyn/azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ extends:
parameters:
featureFlags:
autoBaseline: true
autoEnablePREfastWithNewRuleset: false
autoEnableRoslynWithNewRuleset: false
sdl:
sourceAnalysisPool:
name: NetCore1ESPool-Svc-Internal
Expand Down Expand Up @@ -288,13 +290,13 @@ extends:

- task: MicroBuildSigningPlugin@4
inputs:
signType: $(SignType)
signType: ${{ parameters.SignType }}
zipSources: false
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
# Set ConnectedPMEServiceName if the build is a CI build, otherwise it is not needed
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
condition: and(succeeded(), in(variables['SignType'], 'test', 'real'))
condition: and(succeeded(), in('${{ parameters.SignType }}', 'test', 'real'))

- download: profilingInputs
artifact: merged mibc
Expand Down Expand Up @@ -322,7 +324,7 @@ extends:
/p:RepositoryName=$(Build.Repository.Name)
/p:VisualStudioDropName=$(VisualStudio.DropName)
/p:VSCodeOptimizationDataRoot="$(VSCodeOptimizationDataRoot)"
/p:DotNetSignType=$(SignType)
/p:DotNetSignType=${{ parameters.SignType }}
/p:DotnetPublishUsingPipelines=true
/p:IgnoreIbcMergeErrors=true
/p:GenerateSbom=true
Expand Down Expand Up @@ -401,7 +403,7 @@ extends:
componentPassword: $(dn-bot-dnceng-build-e-code-full-release-e-packaging-r)
componentBuildProjectName: internal
sourceBranch: "$(ComponentBranchName)"
publishDataURI: "https://dev.azure.com/dnceng/internal/_apis/git/repositories/dotnet-roslyn/items?path=eng/config/PublishData.json&api-version=6.0"
publishDataURI: "https://dev.azure.com/dnceng/internal/_apis/git/repositories/dotnet-roslyn/items?path=eng/config/PublishData.json&version=$(ComponentBranchName)&api-version=6.0"
publishDataAccessToken: "$(System.AccessToken)"
dropPath: '$(Pipeline.Workspace)\VSSetup'
cherryPick: ${{ parameters.VisualStudioCherryPickSHA }}
Expand All @@ -410,9 +412,6 @@ extends:
- template: /eng/common/templates-official/post-build/post-build.yml@self
parameters:
publishingInfraVersion: 3
# Symbol validation is not entirely reliable as of yet, so should be turned off until
# https://github.com/dotnet/arcade/issues/2871 is resolved.
enableSymbolValidation: false
enableSourceLinkValidation: false
# Enable SDL validation, passing through values from the 'DotNet-Roslyn-SDLValidation-Params' group.
SDLValidationParameters:
Expand Down
2 changes: 1 addition & 1 deletion src/roslyn/azure-pipelines-pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ extends:
vsBranchName: ${{ parameters.VisualStudioBranchName }}
titlePrefix: ${{ parameters.OptionalTitlePrefix }}
sourceBranch: $(ComponentBranchName)
publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/main/eng/config/PublishData.json"
publishDataURI: "https://raw.githubusercontent.com/dotnet/roslyn/$(ComponentBranchName)/eng/config/PublishData.json"
queueSpeedometerValidation: true
dropPath: '$(Pipeline.Workspace)\VSSetup'
retainInsertedBuild: false
Expand Down
33 changes: 28 additions & 5 deletions src/roslyn/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ parameters:
default:
name: $(PoolName)
demands: ImageOverride -equals $(WindowsQueueName)
- name: macOSPool
type: object
default:
vmImage: macOS-15
- name: vs2022PreviewPool
type: object
default:
Expand Down Expand Up @@ -170,6 +174,16 @@ stages:
testArtifactName: Transport_Artifacts_Unix_Debug
poolParameters: ${{ parameters.ubuntuPool }}

- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- stage: MacOS_Build
dependsOn: []
jobs:
- template: eng/pipelines/build-unix-job.yml
parameters:
jobName: Build_macOS_Debug
testArtifactName: Transport_Artifacts_macOS_Debug
poolParameters: ${{ parameters.macOSPool }}

- stage: Source_Build
dependsOn: []
jobs:
Expand Down Expand Up @@ -370,14 +384,19 @@ stages:
testArguments: --testCoreClr
poolParameters: ${{ parameters.ubuntuPool }}

# https://github.com/dotnet/runtime/issues/97186
# Disabled until runtime can track down the crash
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- stage: MacOS_Debug_CoreClr
dependsOn: MacOS_Build
variables:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: DotNet-HelixApi-Access
jobs:
# https://github.com/dotnet/runtime/issues/97186
- template: eng/pipelines/test-unix-job.yml
parameters:
testRunName: 'Test macOS Debug'
jobName: Test_macOS_Debug
testArtifactName: Transport_Artifacts_Unix_Debug
testArtifactName: Transport_Artifacts_macOS_Debug
configuration: Debug
testArguments: --testCoreClr
helixQueueName: $(HelixMacOsQueueName)
Expand Down Expand Up @@ -446,8 +465,12 @@ stages:
- powershell: eng/validate-rules-missing-documentation.ps1 -ci
displayName: Validate rules missing documentation

- powershell: eng/generate-compiler-code.ps1 -test -configuration Release
- task: DotNetCoreCLI@2
displayName: Generate Syntax Files
inputs:
command: 'custom'
custom: 'run'
arguments: '--file $(Build.SourcesDirectory)/eng/generate-compiler-code.cs -- -test -configuration Release'

- powershell: eng/validate-code-formatting.ps1 -ci -rootDirectory $(Build.SourcesDirectory)\src -includeDirectories Compilers\CSharp\Portable\Generated\, Compilers\VisualBasic\Portable\Generated\, ExpressionEvaluator\VisualBasic\Source\ResultProvider\Generated\
displayName: Validate Generated Syntax Files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This document lists known breaking changes in Roslyn after .NET 9 general releas
***Introduced in Visual Studio 2022 version 17.13***

C# 14 introduces the ability to write a lambda with parameter modifiers, without having to specify a parameter type:
https://github.com/dotnet/csharplang/blob/main/proposals/simple-lambda-parameters-with-modifiers.md
[Simple lambda parameters with modifiers](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-14.0/simple-lambda-parameters-with-modifiers.md)

As part of this work, a breaking change was accepted where `scoped` will always be treated as a modifier
in a lambda parameter, even where it might have been accepted as a type name in the past. For example:
Expand Down Expand Up @@ -371,7 +371,7 @@ class C<extension> { } // type parameter may not be named "extension"

## Partial properties and events are now implicitly virtual and public

***Introduced in Visual Studio 2022 version 17.15***
***Introduced in Visual Studio 2026 version 18.0 preview 1***

We have fixed [an inconsistency](https://github.com/dotnet/roslyn/issues/77346)
where partial interface properties and events would not be implicitly `virtual` and `public` unlike their non-partial equivalents.
Expand Down Expand Up @@ -407,3 +407,30 @@ partial interface I

class C : I;
```

## Missing `ParamCollectionAttribute` is reported in more cases

***Introduced in Visual Studio 2026 version 18.0***

If you are compiling a `.netmodule` (note that this doesn't apply to normal DLL/EXE compilations),
and have a lambda or a local function with a `params` collection parameter,
and the `ParamCollectionAttribute` is not found, a compilation error is now reported
(because the attribute now must be [emitted](https://github.com/dotnet/roslyn/issues/79752) on the synthesized method
but the attribute type itself is not synthesized by the compiler into a `.netmodule`).
You can work around that by defining the attribute yourself.

```cs
using System;
using System.Collections.Generic;
class C
{
void M()
{
Func<IList<int>, int> lam = (params IList<int> xs) => xs.Count; // error if ParamCollectionAttribute does not exist
lam([1, 2, 3]);

int func(params IList<int> xs) => xs.Count; // error if ParamCollectionAttribute does not exist
func(4, 5, 6);
}
}
```
11 changes: 10 additions & 1 deletion src/roslyn/docs/contributing/Compiler Test Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document provides guidance for thinking about language interactions and tes
- BCL (including mono) and other customer impact
- Determinism
- Loading from metadata (source vs. loaded from metadata)
- Public interface of compiler APIs (including semantic model APIs listed below):
- Public compiler APIs (including semantic model and other APIs listed below):
- GetDeclaredSymbol
- GetEnclosingSymbol
- GetSymbolInfo
Expand All @@ -29,12 +29,21 @@ This document provides guidance for thinking about language interactions and tes
- ClassifyConversion
- GetOperation (`IOperation`)
- GetCFG (`ControlFlowGraph`)
- DocumentationCommentId APIs
- VB/F# interop
- C++/CLI interop (particularly for metadata format changes, e.g. DIMs, static abstracts in interfaces, or generic attributes)
- Performance and stress testing
- Can build VS
- Check that `Obsolete` is honored for members used in binding/lowering
- LangVersion

- Does the feature use cryptographic hashes in any way? (examples: metadata names of file-local types, extension types, assembly strong naming, PDB document table, etc.)
- Consider using non-cryptographic hash such as `XxHash128` instead.
- If you must use a cryptographic hash in the feature implementation, then use `SourceHashAlgorithms.Default`, and not any specific hash.
- A cryptographic hash must never be included in a public API name. Taking a change to the default crypto algorithm would then change public API surface, which would be enormously breaking.
- **DO NOT** allow using the value of a crypto hash in a field, method or type name
- **DO** allow using the value of a crypto hash in attribute or field values
- Any time the compiler reads in metadata containing crypto hashes, even if it's an attribute value, ensure the crypto hash algorithm name is included in the metadata (e.g. prefixing it to the hash value), so that it can be changed over time and the compiler can continue to read both metadata using both the old and new algorithms.

# Type and members
- Access modifiers (public, protected, internal, protected internal, private protected, private), static, ref
Expand Down
Loading