Skip to content

Conversation

@dotnet-maestro
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Nov 4, 2025

This pull request updates the following dependencies

From https://github.com/dotnet/roslyn

  • Dependency Updates:

…915.8

On relative base path root
Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25467.18 -> To Version 4.14.0-3.25465.8
Microsoft.CodeAnalysis.Analyzers From Version 3.11.0-beta1.25173.3 -> To Version 3.12.0-beta1.25465.8
@steveisok
Copy link
Member

Failures with Cannot implicitly convert type 'System.ReadOnlySpan<int>' to 'System.Span<int>' seem related.

/cc @jeffhandley

@sbomer
Copy link
Member

sbomer commented Nov 6, 2025

@copilot fix the error:
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.MetadataDb.cs(384,39): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.ReadOnlySpan' to 'System.Span'

Copy link
Contributor

Copilot AI commented Nov 6, 2025

@sbomer I've opened a new pull request, #121414, to work on those changes. Once the pull request is ready, I'll request review from you.

…121414)

The Roslyn 4.14.0 compiler update introduced stricter type checking for
`MemoryMarshal.Cast` when called directly on arrays, now returning
`ReadOnlySpan<T>` instead of `Span<T>`.

## Changes

- **JsonDocument.MetadataDb.cs**: Explicitly convert byte array to
`Span<byte>` before casting to `Span<int>` to preserve write access

```csharp
// Before
Span<int> newDbInts = MemoryMarshal.Cast<byte, int>(newDatabase);

// After  
Span<int> newDbInts = MemoryMarshal.Cast<byte, int>(newDatabase.AsSpan());
```

The writable span is required since the code modifies elements via
`newDbInts[i] -= locationOffset`.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: sbomer <[email protected]>
@steveisok
Copy link
Member

@copilot fix the error:

src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs(387,65): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'System.ReadOnlySpan' to 'System.Span'

Copy link
Contributor

Copilot AI commented Nov 10, 2025

@steveisok I've opened a new pull request, #121501, to work on those changes. Once the pull request is ready, I'll request review from you.

steveisok and others added 2 commits November 10, 2025 15:07
…110.12

On relative base path root
Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25467.18 -> To Version 4.14.0-3.25560.12
Microsoft.CodeAnalysis.Analyzers From Version 3.11.0-beta1.25173.3 -> To Version 3.12.0-beta1.25560.12
Commit message of the cherry-picked commit (note this branch now
references newer versions):

Update dependencies from dotnet/roslyn (#110105)

* Update dependencies from https://github.com/dotnet/roslyn build 20241122.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-2.24572.2

* Update dependencies from https://github.com/dotnet/roslyn build 20241122.15

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-2.24572.15

* Update dependencies from https://github.com/dotnet/roslyn build 20241124.5

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-2.24574.5

* Update dependencies from https://github.com/dotnet/roslyn build 20241125.18

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24575.18

* Update dependencies from https://github.com/dotnet/roslyn build 20241127.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24577.2

* Update dependencies from https://github.com/dotnet/roslyn build 20241128.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24578.2

* Update dependencies from https://github.com/dotnet/roslyn build 20241128.3

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24578.3

* Update dependencies from https://github.com/dotnet/roslyn build 20241130.1

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24580.1

* Update dependencies from https://github.com/dotnet/roslyn build 20241130.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24580.2

* Update dependencies from https://github.com/dotnet/roslyn build 20241201.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24601.2

* Update dependencies from https://github.com/dotnet/roslyn build 20241202.26

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.13.0-2.24570.4 -> To Version 4.13.0-3.24602.26

* Use explicit AsSpan

* Fix LibraryImportGenerator.UnitTests

* Fix regex tests

* Adjust trimming test for new codegen

With this roslyn update, the generated iterator state machine
for this test includes a Dispose method which assigns null to the
array, inhibiting dataflow analysis.

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sven Boemer <[email protected]>
@sbomer sbomer requested a review from marek-safar as a code owner November 11, 2025 18:53
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Nov 11, 2025
@sbomer
Copy link
Member

sbomer commented Nov 13, 2025

@copilot fix this error: src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs(1209,42): error CS8620: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument of type 'string[]' cannot be used for parameter 'values' of type 'Span<string?>' in 'void HttpHeaders.ReadStoreValues<string?>(Span<string?> values, object? storeValue, HttpHeaderParser? parser, ref int currentIndex)' due to differences in the nullability of reference types.

Copy link
Contributor

Copilot AI commented Nov 13, 2025

@sbomer I've opened a new pull request, #121601, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits November 14, 2025 09:26
…121601)

Fixes compilation error introduced by Roslyn 4.14.0's stricter type
checking for array-to-span conversions.

main PR: #121343

# Description

Roslyn 4.14.0 no longer allows implicit conversion from `string[]` to
`Span<string?>`. Fixed by explicitly converting arrays to spans in
`HttpHeaders.GetStoreValuesIntoStringArray`:

```csharp
// Before
ReadStoreValues<object?>(values, info.ParsedAndInvalidValues, descriptor.Parser, ref currentIndex);

// After  
ReadStoreValues<object?>(values.AsSpan(), info.ParsedAndInvalidValues, descriptor.Parser, ref currentIndex);
```

# Customer Impact

Blocks servicing release builds. No runtime behavior change.

# Regression

No - compiler enforcement tightening from dependency update.

# Testing

Verified compilation fix. No functional changes to test.

# Risk

Minimal. Surgical two-line change converts array to span where method
signature already required it. Identical pattern to fixes in #121414 and
BigInteger.cs (46bb931).

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: sbomer <[email protected]>
Commit message of the cherry-picked commit (note this branch now
references newer versions):

Update Roslyn to 4.13.0-1.24510.9 (#109467)

* Update Roslyn to 4.13.0-1.24510.9

* Update roslyn-analyzers

* Fix first-class Span breaks

* Remove LangVersion=latest

* Fixup more places

* Updates and fixes

---------

Co-authored-by: Jan Jones <[email protected]>
@sbomer sbomer mentioned this pull request Nov 20, 2025
sbomer and others added 4 commits November 20, 2025 15:36
…120.7

On relative base path root
Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25569.8 -> To Version 4.14.0-3.25570.7
Microsoft.CodeAnalysis.Analyzers From Version 3.11.0-beta1.25173.3 -> To Version 3.12.0-beta1.25570.7
Commit message of the cherry-picked commit (note this branch now
references newer versions):

[main] Update dependencies from dotnet/roslyn (#112937)

* Update dependencies from https://github.com/dotnet/roslyn build 20250225.8

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25125.8

* Update dependencies from https://github.com/dotnet/roslyn build 20250226.5

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25126.5

* Update dependencies from https://github.com/dotnet/roslyn build 20250303.7

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25153.7

* Update dependencies from https://github.com/dotnet/roslyn build 20250304.7

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25154.7

* Update dependencies from https://github.com/dotnet/roslyn build 20250305.15

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25155.15

* Update dependencies from https://github.com/dotnet/roslyn build 20250307.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25157.4

* Update dependencies from https://github.com/dotnet/roslyn build 20250310.11

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25160.11

* Update dependencies from https://github.com/dotnet/roslyn build 20250311.7

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25161.7

* Update dependencies from https://github.com/dotnet/roslyn build 20250312.12

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25162.12

* Update dependencies from https://github.com/dotnet/roslyn build 20250313.9

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25163.9

* Update dependencies from https://github.com/dotnet/roslyn build 20250314.6

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25164.6

* Update dependencies from https://github.com/dotnet/roslyn build 20250314.10

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25164.10

* Update dependencies from https://github.com/dotnet/roslyn build 20250317.7

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25167.7

* Update dependencies from https://github.com/dotnet/roslyn build 20250318.15

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25168.15

* Update dependencies from https://github.com/dotnet/roslyn build 20250319.7

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25169.7

* Update dependencies from https://github.com/dotnet/roslyn build 20250320.13

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25170.13

* Update dependencies from https://github.com/dotnet/roslyn build 20250321.23

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25171.23

* Update dependencies from https://github.com/dotnet/roslyn build 20250321.27

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25171.27

* Update dependencies from https://github.com/dotnet/roslyn build 2025032.10

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25174.10

* Update dependencies from https://github.com/dotnet/roslyn build 20250325.12

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25175.12

* Update dependencies from https://github.com/dotnet/roslyn build 20250326.10

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25176.10

* Update dependencies from https://github.com/dotnet/roslyn build 20250327.9

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25177.9

* Update dependencies from https://github.com/dotnet/roslyn build 20250328.1

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25178.1

* Update dependencies from https://github.com/dotnet/roslyn build 20250329.1

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.14.0-2.25121.3 -> To Version 4.14.0-3.25179.1

* Fix compiler warning around unused fields - needed for Unsafe.

* Allow prebuilts for roslyn's dependencies

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <[email protected]>
Co-authored-by: Eric StJohn <[email protected]>
…120.7

On relative base path root
Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset From Version 4.12.0-3.25569.8 -> To Version 4.14.0-3.25570.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-codeflow for labeling automated codeflow linkable-framework Issues associated with delivering a linker friendly framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants