[PR #828] [MERGED] Add .NET 9 target, drop .NET 6 #1237

Open
opened 2026-01-29 14:51:49 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/828
Author: @MihaZupan
Created: 11/30/2024
Status: Merged
Merged: 12/17/2024
Merged by: @xoofx

Base: masterHead: net90


📝 Commits (3)

  • 98a060f Add .NET 9 target, drop .NET 6
  • 455f8f3 Fix dotnet-versions format
  • 4078173 Tweak SpecFileGen paths

📊 Changes

7 files changed (+14 additions, -10 deletions)

View changed files

📝 .github/workflows/ci.yml (+4 -1)
📝 src/Markdig.Tests/Markdig.Tests.csproj (+5 -4)
📝 src/Markdig.Tests/TestYamlFrontMatterExtension.cs (+1 -1)
📝 src/Markdig/Helpers/FastStringWriter.cs (+1 -1)
📝 src/Markdig/Markdig.targets (+1 -1)
📝 src/SpecFileGen/SpecFileGen.csproj (+1 -1)
📝 src/global.json (+1 -1)

📄 Description

Unlike in the past, there is now a reason to bump TFMs even when not explicitly using new APIs due to language changes that can target better overloads when recompiling (e.g. params span or OverloadResolutionPriority).
I don't know of any places where that would kick in for Markdig right now, but there are some neat new APIs in 9.0 that might be interesting to play with here.

I've also added back older TFMs to the test project so we're not completely without coverage (given we have a bit of conditionally-compiled code & polyfills). Skipped framework though cuz CI was being weird 🤷‍♂️

Some initial numbers without any Markdig changes on a large document (.NET 9 perf blog post ~570 KB):

Method Runtime Mean Error
Parse .NET 8.0 1,015.0 us 3.78 us
Parse .NET 9.0 926.8 us 3.58 us
ParseAdvanced .NET 8.0 2,892.6 us 17.57 us
ParseAdvanced .NET 9.0 2,803.9 us 4.20 us
Render .NET 8.0 459.2 us 5.76 us
Render .NET 9.0 425.7 us 5.38 us
RenderAdvanced .NET 8.0 585.2 us 10.13 us
RenderAdvanced .NET 9.0 489.8 us 5.35 us

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/828 **Author:** [@MihaZupan](https://github.com/MihaZupan) **Created:** 11/30/2024 **Status:** ✅ Merged **Merged:** 12/17/2024 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `net90` --- ### 📝 Commits (3) - [`98a060f`](https://github.com/xoofx/markdig/commit/98a060f2a340bc7a6e2dd9e0f32eac00ffefe170) Add .NET 9 target, drop .NET 6 - [`455f8f3`](https://github.com/xoofx/markdig/commit/455f8f333d995eeb8267678a92754e4104204d18) Fix dotnet-versions format - [`4078173`](https://github.com/xoofx/markdig/commit/40781737c35c6c12c02969a4771376ce334c4691) Tweak SpecFileGen paths ### 📊 Changes **7 files changed** (+14 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+4 -1) 📝 `src/Markdig.Tests/Markdig.Tests.csproj` (+5 -4) 📝 `src/Markdig.Tests/TestYamlFrontMatterExtension.cs` (+1 -1) 📝 `src/Markdig/Helpers/FastStringWriter.cs` (+1 -1) 📝 `src/Markdig/Markdig.targets` (+1 -1) 📝 `src/SpecFileGen/SpecFileGen.csproj` (+1 -1) 📝 `src/global.json` (+1 -1) </details> ### 📄 Description Unlike in the past, there is now a reason to bump TFMs even when not explicitly using new APIs due to language changes that can target better overloads when recompiling (e.g. `params span` or `OverloadResolutionPriority`). I don't know of any places where that would kick in for Markdig right now, but there are some neat new APIs in 9.0 that might be interesting to play with here. I've also added back older TFMs to the test project so we're not completely without coverage (given we have a bit of conditionally-compiled code & polyfills). Skipped framework though cuz CI was being weird 🤷‍♂️ Some initial numbers without any Markdig changes on a ___large___ document (.NET 9 perf blog post ~570 KB): | Method | Runtime | Mean | Error | |--------------- |--------- |-----------:|---------:| | Parse | .NET 8.0 | 1,015.0 us | 3.78 us | | Parse | .NET 9.0 | 926.8 us | 3.58 us | | | | | | | ParseAdvanced | .NET 8.0 | 2,892.6 us | 17.57 us | | ParseAdvanced | .NET 9.0 | 2,803.9 us | 4.20 us | | | | | | | Render | .NET 8.0 | 459.2 us | 5.76 us | | Render | .NET 9.0 | 425.7 us | 5.38 us | | | | | | | RenderAdvanced | .NET 8.0 | 585.2 us | 10.13 us | | RenderAdvanced | .NET 9.0 | 489.8 us | 5.35 us | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:51:49 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1237