Skip to content

Build rot: Source-Code inkompatibel mit aktuellem System.CommandLine + xUnit v3 #16

Description

@stho32

Problem

Der Build and Test-Workflow schlaegt seit laengerem auf main und in allen 3 offenen Dependabot-PRs (#15, #14, #13) fehl. Das Repo hat laut Wartungsliste keinen aktiven CI-Workflow eingetragen, der Workflow existiert aber und ist rot.

Root Cause

Zwei unabhaengige Breaking Changes in Abhaengigkeiten:

1. System.CommandLine — API-Breaking Changes

WebsiteValidator.Console/Program.cs nutzt eine alte API, die nicht mehr existiert:

  • new Option<T>("--name", description: "...") — Parameter description existiert nicht mehr (CS1739)
  • Option<T>.IsRequired — Property entfernt (CS1061)
  • RootCommand.Handler — Property entfernt (CS1061)
  • CommandHandler.Create(...) — Typ entfernt (CS0103)
  • RootCommand.InvokeAsync(args) — Signatur string[] wird nicht mehr akzeptiert (CS1503)

2. xUnit.net v3 — async void nicht mehr erlaubt

WebsiteValidator.BL.Tests/DownloadAWebpageTests.cs hat Tests mit async void-Signatur (xUnit1048). Muss auf async Task umgestellt werden.

Fix

  1. Program.cs auf die aktuelle System.CommandLine-API portieren (Builder-Pattern, SetHandler(...), etc.)
  2. Alle async void-Testmethoden auf async Task umstellen.

Betroffene PRs

Failing Run

https://github.com/CleverCodeCravers/website-validator/actions/runs/24529702591

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions