Skip to content

Commit

Permalink
Merge branch 'main' into darc-main-1fec9736-6591-4ca2-8394-7040044cda12
Browse files Browse the repository at this point in the history
  • Loading branch information
akhera99 authored Feb 20, 2025
2 parents 0d066ee + dea2c14 commit 428241f
Show file tree
Hide file tree
Showing 674 changed files with 16,126 additions and 9,572 deletions.
9 changes: 9 additions & 0 deletions .config/branch-merge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"merge-flow-configurations": {
// Merge any main changes to release/dev18.0.
"main": {
"MergeToBranch": "release/dev18.0",
"ExtraSwitches": "-QuietComments"
}
}
}
18 changes: 18 additions & 0 deletions .github/workflows/main-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Merges any changes from release/prerelease to main (e.g. servicing changes)

name: Flow main to release/dev18.0
on:
schedule:
# once a day at 13:00 UTC to cleanup old runs
- cron: '0 13 * * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
check-script:
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main
with:
configuration_file_path: '.config/branch-merge.json'
65 changes: 58 additions & 7 deletions Roslyn.sln

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ trigger:
- main-vs-deps
- release/dev16.*-vs-deps
- release/dev17.*
- release/dev18.*
- features/lsp_tools_host
exclude:
- release/dev17.0
Expand All @@ -16,6 +17,11 @@ resources:
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
pipelines:
- pipeline: profilingInputs
source: dotnet-vscode-csharp-profiling
branch: main
trigger: none

parameters:
- name: IbcDrop
Expand Down Expand Up @@ -89,6 +95,9 @@ variables:
- ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
- name: enableSourceIndex
value: true
- name: VSCodeOptimizationDataRoot
value: $(Pipeline.Workspace)/profilingInputs/merged mibc


extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
Expand Down Expand Up @@ -273,6 +282,10 @@ extends:
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
condition: and(succeeded(), in(variables['SignType'], 'test', 'real'))

- download: profilingInputs
artifact: merged mibc
displayName: Download VSCode optimization inputs

- task: PowerShell@2
displayName: Build
inputs:
Expand All @@ -294,6 +307,7 @@ extends:
-officialVisualStudioDropAccessToken $(_DevDivDropAccessToken)
/p:RepositoryName=$(Build.Repository.Name)
/p:VisualStudioDropName=$(VisualStudio.DropName)
/p:VSCodeOptimizationDataRoot="$(VSCodeOptimizationDataRoot)"
/p:DotNetSignType=$(SignType)
/p:DotnetPublishUsingPipelines=true
/p:IgnoreIbcMergeErrors=true
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines-pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ extends:
ArtifactName: AssetManifests

steps:
- pwsh: Set-MpPreference -DisableRealtimeMonitoring $true
displayName: Disable Real-time Monitoring

- task: Powershell@2
displayName: Setting OriginalBuildNumber variable
condition: succeeded()
Expand Down
2 changes: 1 addition & 1 deletion docs/Language Feature Status.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ efforts behind them.
| [`field` keyword in properties](https://github.com/dotnet/csharplang/issues/140) | [field-keyword](https://github.com/dotnet/roslyn/tree/features/field-keyword) | [Merged into 17.12p3](https://github.com/dotnet/roslyn/issues/57012) | [Youssef1313](https://github.com/Youssef1313), [cston](https://github.com/cston) | [333fred](https://github.com/333fred), [RikkiGibson](https://github.com/RikkiGibson) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [First-class Span Types](https://github.com/dotnet/csharplang/issues/7905) | [FirstClassSpan](https://github.com/dotnet/roslyn/tree/features/FirstClassSpan) | [Merged into 17.13p1](https://github.com/dotnet/roslyn/issues/73445) | [jjonescz](https://github.com/jjonescz) | [cston](https://github.com/cston), [333fred](https://github.com/333fred) | | [333fred](https://github.com/333fred), [stephentoub](https://github.com/stephentoub) |
| [Unbound generic types in `nameof`](https://github.com/dotnet/csharplang/issues/8480) | [PR](https://github.com/dotnet/roslyn/pull/75368) | [Merged into 17.13p2](https://github.com/dotnet/roslyn/pull/75368) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv), [AlekseyTs](https://github.com/AlekseyTs) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [String literals in data section as UTF8](https://github.com/dotnet/roslyn/blob/main/docs/features/string-literals-data-section.md) | [PR](https://github.com/dotnet/roslyn/pull/76036) | [Merged into 17.14p1](https://github.com/dotnet/roslyn/issues/76234) | [jjonescz](https://github.com/jjonescz) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | N/A | N/A |
| [String literals in data section as UTF8](https://github.com/dotnet/roslyn/blob/main/docs/features/string-literals-data-section.md) | [PR](https://github.com/dotnet/roslyn/pull/76036) | [Merged into 17.13p4](https://github.com/dotnet/roslyn/issues/76234) | [jjonescz](https://github.com/jjonescz) | [AlekseyTs](https://github.com/AlekseyTs), [cston](https://github.com/cston) | N/A | N/A |
| [Simple lambda parameters with modifiers](https://github.com/dotnet/csharplang/blob/main/proposals/simple-lambda-parameters-with-modifiers.md) | [PR](https://github.com/dotnet/roslyn/pull/75400) | [Merged into 17.14p1](https://github.com/dotnet/roslyn/pull/75400) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jjonescz](https://github.com/jjonescz), [cston](https://github.com/cston) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |

# Working Set VB
Expand Down
23 changes: 23 additions & 0 deletions docs/compilers/CSharp/Compiler Breaking Changes - DotNet 10.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,26 @@ unsafe record struct R(
public bool Equals(R other) => true;
}
```

## Emitting metadata-only executables requires an entrypoint

***Introduced in Visual Studio 2022 version 17.14***

Previously, the entrypoint was [unintentionally unset](https://github.com/dotnet/roslyn/issues/76707)
when emitting executables in metadata-only mode (also known as ref assemblies).
That is now corrected but it also means that a missing entrypoint is a compilation error:

```cs
// previously successful, now fails:
CSharpCompilation.Create("test").Emit(new MemoryStream(),
options: EmitOptions.Default.WithEmitMetadataOnly(true))

CSharpCompilation.Create("test",
// workaround - mark as DLL instead of EXE (the default):
options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary))
.Emit(new MemoryStream(),
options: EmitOptions.Default.WithEmitMetadataOnly(true))
```

Similarly this can be observed when using the command-line argument `/refonly`
or the `ProduceOnlyReferenceAssembly` MSBuild property.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class C
***Introduced in Visual Studio 2022 version 17.10***

*Conversion* of a collection expression to a `struct` or `class` that implements `System.Collections.IEnumerable` and *does not* have a strongly-typed `GetEnumerator()`
requires the elements in the collection expression are implicitly convertible to the `object`.
requires that the elements in the collection expression are implicitly convertible to `object`.
Previously, the elements of a collection expression targeting an `IEnumerable` implementation were assumed to be convertible to `object`, and converted only when binding to the applicable `Add` method.

This additional requirement means that collection expression conversions to `IEnumerable` implementations are treated consistently with other target types where the elements in the collection expression must be implicitly convertible to the *iteration type* of the target type.
Expand Down
27 changes: 27 additions & 0 deletions docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,30 @@ class C
```

A workaround is to use explicit delegate types instead of relying on `var` inference in those cases.

## `dotnet_style_require_accessibility_modifiers` now consistently applies to interface members

PR: https://github.com/dotnet/roslyn/pull/76324

Prior to this change, the analyzer for dotnet_style_require_accessibility_modifiers would simply ignore interface
members. This was because C# initially disallowed modifiers for interface members entirely, having them always
be public.

Later versions of the language relaxed this restriction, allowing users to provide accessibility modifiers on
interface members, including a redundant `public` modifier.

The analyzer was updated to now enforce the value for this option on interface members as well. The meaning
of the value is as follows:

1. `never`. The analyzer does no analysis. Redundant modifiers are allowed on all members.
2. `always`. Redundant modifiers are always required on all members (including interface members). For example:
a `private` modifier on a class member, and a `public` modifier on an interface member. This is the option to
use if you feel that all members no matter what should state their accessibility explicitly.
4. `for_non_interface_members`. Redundant modifiers are required on all members *that are not* part of an interface,
but disallowed for interface members. For example: `private` will be required on private class members. However,
a public interface member will not be allowed to have redundant `public` modifiers. This matches the standard
modifier approach present prior to the language allowing modifiers on interface members.
5. `omit_if_default`. Redundant modifiers are disallowed. For example a private class member will be disallowed from
using `private`, and a public interface member will be disallowed from using `public`. This is the option to use
if you feel that restating the accessibility when it matches what the language chooses by default is redundant and
should be disalloed.
Loading

0 comments on commit 428241f

Please sign in to comment.