Skip to content

Instantly share code, notes, and snippets.

View jaredpar's full-sized avatar

Jared Parsons jaredpar

View GitHub Profile

Health Report — dotnet/roslyn / roslyn-CI

Overall Health: 🔴 RED (Critical — Infrastructure Failure + Masked Regression)

Current Status: Helix Infrastructure Instability + Masked Razor Regression

The pipeline remains critically impaired. 7 consecutive main branch failures since the last success (1425328, May 18 2:57 PM PDT). Only 3 out of 25 main builds succeeded in the last 3 days (12% success rate).

Active Problems

Health Report — dotnet/roslyn / roslyn-integration-lsp-CI

Overall Health: 🔴 RED — PIPELINE NON-OPERATIONAL (60+ HOURS)

Current Status:

  • PIPELINE DOWN — 0% success rate, 9/9 builds failed, 0 builds attempted in 60+ hours
  • Last build: 2026-05-16 07:04 AM PDT
  • No new builds since — pipeline disabled or trigger broken
  • Builds fail pre-test — no test execution occurs, no timeline data retrievable
  • Affected: 9 PRs from 6 different authors were blocked

net472-only UnitTests Projects — .NET Core/Linux Migration Candidates

Analyzed all 16 net472-only .UnitTests projects in dotnet/roslyn. Excluded 9 with Visual Studio/WPF hard dependencies. 7 candidates remain.

Low Effort (easiest wins)

Project Notes
CodeStyle/CSharp/Tests Pure analyzer testing, no VS/WPF deps. Straightforward.
Features/ExternalAccess/OmniSharpTest Minimal deps — OmniSharp.CSharp targets netstandard2.0. Very clean.
@jaredpar
jaredpar / plan.md
Created April 21, 2026 04:32
BlobBuilder Allocation Strategy Plan — System.Reflection.Metadata pooling for Roslyn VBCSCompiler

BlobBuilder Allocation Strategy Plan

Problem Statement

Roslyn's VBCSCompiler process suffers from significant byte[] allocations driven by System.Reflection.Metadata APIs, primarily through BlobBuilder. The goal is to enable a pooling strategy where Roslyn pre-allocates ~4MB of byte[] and PE file writing completes with zero (or near-zero) additional allocations.

BlobBuilder Architecture Deep Dive

What BlobBuilder Is

@jaredpar
jaredpar / intentional-no-action-comments.md
Created April 3, 2026 23:29
Intentional no-action comments in Roslyn codebase

Intentional No-Action Comments in Roslyn

Comments across C# and VB files where developers explicitly indicated no action is taken.


C# Files

Compilers

@jaredpar
jaredpar / build-server-shutdown.md
Created January 14, 2025 01:46
Suggestion for how to better implement build-server shutdown

Shutting down our build servers

Motivation

The .NET build contains a number of long lived server processes: msbuild nodes, razor and roslyn. A requirement of the .NET SDK is for customers to be able to reliably shut down all servers created during any build. This is important for shutting down a build operation and ensuring that no files remain locked on disk.

This challenging because there is no easy answer to discovering which processes are build servers:

  • These are primarily .NET SDK process which means they all share the same process name: dotnet
  • These processes do not have a strict parent / child relationship with build commands. Several, like roslyn, live past the msbuild nodes that created them.
@jaredpar
jaredpar / line-reader.cs
Created January 9, 2025 01:25
Read a file line by line without allocating too muuch
public ref struct LineEnumerator(string filePath) : IDisposable
{
private static SearchValues<char> NewLines = SearchValues.Create('\r', '\n');
private StreamReader _reader = new StreamReader(filePath);
private char[] _array = ArrayPool<char>.Shared.Rent(1024);
// This represents the data read from the file that hasn't been processed yet. This will
// be a subset of _array
private Span<char> _buffer = Span<char>.Empty;
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM passing Newtonsoft.Json.dll 13.0.0.0 works fine and results in the expected:
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM arning CS8785: Generator 'Generator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentNullException' with message 'Value cannot be null.
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM Parameter name: source'
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM Loaded modules:
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
Console.WriteLine(IsNullableEnabledAtBuild(@"C:\Users\jaredpar\temp\console\bin\Debug\net7.0\console.dll", out var reason));
Console.WriteLine(reason);
static bool IsNullableEnabledAtBuild(string assemblyFilePath, out string? reason)
{
MetadataReaderProvider? pdbReaderProvider = null;
try