Skip to content

Bump the all-dependencies group with 6 updates#2460

Merged
lahma merged 1 commit into
sebastienros:mainfrom
lahma:update-packages
May 9, 2026
Merged

Bump the all-dependencies group with 6 updates#2460
lahma merged 1 commit into
sebastienros:mainfrom
lahma:update-packages

Conversation

@lahma

@lahma lahma commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Mirrors dependabot PR #2452 with the analyzer fix needed to compile cleanly.

Package bumps

  • GitHubActionsTestLogger 3.0.3 → 3.0.4
  • Meziantou.Analyzer 3.0.55 → 3.0.62
  • Microsoft.NET.Test.Sdk 18.4.0 → 18.5.1
  • NiL.JS 2.6.1721 → 2.6.1722
  • NUnit 4.5.1 → 4.6.0
  • YantraJS.Core 1.2.334 → 1.2.342

Why dependabot's PR #2452 fails to build

Meziantou.Analyzer 3.0.59 introduced rule MA0195"Static field may not be initialized yet". It fires on every source-generated __<Type>_Property_<Name> descriptor field that forward-references a user-defined static [JsProperty] field in the same partial class (e.g. MathInstance.EValue, GlobalObject.NaNValue, SymbolConstructor._asyncDispose, etc.) — about 60+ errors across MathInstance, GlobalObject, NumberConstructor, SymbolConstructor, Uint8ArrayConstructor, Uint8ArrayPrototype.

In practice the field references are safe: the C# compiler orders partial files lexically, and source-generator output (.g.cs) sorts after the user's hand-written .cs, so the referenced fields are always initialized first. The analyzer's pessimism is purely structural here.

Fix

Emit #pragma warning disable MA0195 at the top of every source-generated file from Jint.SourceGenerators.Emitter. Scoped to generated output only, so MA0195 still catches genuine forward-reference bugs in hand-written code. The 17 verified snapshot tests under Jint.Tests.SourceGenerators/ are updated to match.

Verified locally

  • dotnet build --configuration Release: 0 warnings, 0 errors across all TFMs (net462, netstandard2.0/2.1, net8.0, net10.0)
  • dotnet test Jint.Tests: 2919 + 2872 passed, 0 failed
  • dotnet test Jint.Tests.SourceGenerators: 30 passed, 0 failed
  • dotnet test Jint.Tests.PublicInterface: 79 + 79 passed, 0 failed
  • dotnet test Jint.Tests.CommonScripts: 28 + 28 passed, 0 failed

🤖 Generated with Claude Code

Mirrors the dependabot PR sebastienros#2452:
- GitHubActionsTestLogger 3.0.3 → 3.0.4
- Meziantou.Analyzer 3.0.55 → 3.0.62
- Microsoft.NET.Test.Sdk 18.4.0 → 18.5.1
- NiL.JS 2.6.1721 → 2.6.1722
- NUnit 4.5.1 → 4.6.0
- YantraJS.Core 1.2.334 → 1.2.342

Meziantou.Analyzer 3.0.59 introduced MA0195 (static field may not
be initialized yet), which fired on the source-generated descriptor
fields that forward-reference user-defined static [JsProperty] fields
in the same partial class. The compiler orders partial files lexically
(user .cs before generator .g.cs), so the user fields are always
initialized before the descriptor fields — suppress the warning at
the top of every generated file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lahma
lahma force-pushed the update-packages branch from d3b7f2a to 9942ed4 Compare May 9, 2026 10:01
@lahma
lahma enabled auto-merge (squash) May 9, 2026 10:02
@lahma
lahma merged commit c9354b2 into sebastienros:main May 9, 2026
6 of 8 checks passed
@lahma
lahma deleted the update-packages branch July 13, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant