Skip to content

Commit 554caa2

Browse files
committed
Fix desktop artifact publish path
1 parent dc26963 commit 554caa2

7 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132

133133
- name: Publish Desktop App
134134
shell: pwsh
135-
run: dotnet publish ./DotPilot/DotPilot.csproj -c Release -f net10.0-desktop -o ./${{ matrix.output_path }}
135+
run: dotnet publish ./DotPilot/DotPilot.csproj -c Release -f net10.0-desktop -p:GenerateDocumentationFile=true -p:NoWarn=CS1591 -o ./${{ matrix.output_path }}
136136

137137
- name: Upload Desktop Artifact
138138
uses: actions/upload-artifact@v4

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ Skill-management rules for this `.NET` solution:
123123
- `format`: `dotnet format DotPilot.slnx --verify-no-changes`
124124
- `analyze`: `dotnet build DotPilot.slnx -warnaserror`
125125
- `coverage`: `dotnet test DotPilot.Tests/DotPilot.Tests.csproj --settings DotPilot.Tests/coverlet.runsettings --collect:"XPlat Code Coverage"`
126-
- `publish-desktop`: `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop`
126+
- `publish-desktop`: `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop -p:GenerateDocumentationFile=true -p:NoWarn=CS1591`
127127

128128
For this app:
129129

130130
- unit tests currently use `NUnit` through the default `VSTest` runner
131131
- UI tests live in `DotPilot.UITests` and are a mandatory part of normal verification; the harness must provision or resolve browser-driver prerequisites automatically instead of skipping when local setup is missing
132132
- `format` uses `dotnet format --verify-no-changes`
133133
- coverage uses the `coverlet.collector` integration on `DotPilot.Tests` with the repo runsettings file to keep generated Uno artifacts out of the coverage path
134-
- desktop artifact validation uses `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop` and the CI workflow must upload publish outputs for macOS, Windows, and Linux
134+
- desktop artifact validation uses `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop -p:GenerateDocumentationFile=true -p:NoWarn=CS1591` so publish-time analyzer plumbing stays green without weakening the normal `analyze` gate, and the CI workflow must upload publish outputs for macOS, Windows, and Linux
135135
- `LangVersion` is pinned to `latest` at the root
136136
- the repo-root lowercase `.editorconfig` is the source of truth for formatting, naming, style, and analyzer severity
137137
- `Directory.Build.props` owns the shared analyzer and warning policy for future projects

DotPilot/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Stack: `.NET 10`, `Uno Platform`, `Uno.Extensions.Navigation`, `Uno Toolkit`, de
3232
## Local Commands
3333

3434
- `build-app`: `dotnet build DotPilot/DotPilot.csproj`
35-
- `publish-desktop`: `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop`
35+
- `publish-desktop`: `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop -p:GenerateDocumentationFile=true -p:NoWarn=CS1591`
3636
- `run-desktop`: `dotnet run --project DotPilot/DotPilot.csproj -f net10.0-desktop`
3737
- `run-wasm`: `dotnet run --project DotPilot/DotPilot.csproj -f net10.0-browserwasm`
3838
- `test-unit`: `dotnet test DotPilot.Tests/DotPilot.Tests.csproj`

DotPilot/App.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System.Diagnostics.CodeAnalysis;
2+
using Microsoft.Extensions.Hosting;
3+
using Microsoft.Extensions.Logging;
24

35
namespace DotPilot;
46

@@ -81,7 +83,8 @@ protected override async void OnLaunched(LaunchActivatedEventArgs args)
8183
{
8284
#if DEBUG
8385
// DelegatingHandler will be automatically injected
84-
services.AddTransient<DelegatingHandler, DebugHttpHandler>();
86+
Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions
87+
.AddTransient<DelegatingHandler, Services.Endpoints.DebugHttpHandler>(services);
8588
#endif
8689

8790
})

DotPilot/GlobalUsings.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
global using DotPilot.Models;
22
global using DotPilot.Presentation;
3-
global using DotPilot.Services.Endpoints;
4-
global using Microsoft.Extensions.DependencyInjection;
5-
global using Microsoft.Extensions.Hosting;
6-
global using Microsoft.Extensions.Logging;

DotPilot/Services/Endpoints/DebugHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Microsoft.Extensions.Logging;
2+
13
namespace DotPilot.Services.Endpoints;
24

35
internal sealed class DebugHttpHandler : DelegatingHandler

ci-pr-validation.plan.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Fix the GitHub Actions CI path used by `managedcode/dotPilot` so it builds with
104104
- Local `dotnet test DotPilot.Tests/DotPilot.Tests.csproj --collect:"XPlat Code Coverage"` reproduced a second blocker: coverage did not crash, but `coverlet.collector` spent minutes instrumenting generated Uno artifacts before test execution began, which was not acceptable for PR validation.
105105
- The workflow also lacked any desktop publish stage, so pull requests produced no downloadable app artifacts for human verification across macOS, Windows, and Linux.
106106
- After the first PR push, GitHub rejected the new workflow before any jobs started because `timeout-minutes` used `fromJSON(env.STEP_TIMEOUT_MINUTES)` at the job level, where the `env` context is not available during workflow validation.
107+
- After the first valid PR run started, the desktop artifact jobs failed during `dotnet publish` because Roslyn enforced `IDE0005` on build without `GenerateDocumentationFile=true`, while enabling that property globally also surfaced repo-wide `CS1591` documentation warnings as errors.
107108

108109
## Failing Tests And Checks Tracker
109110

@@ -137,6 +138,12 @@ Fix the GitHub Actions CI path used by `managedcode/dotPilot` so it builds with
137138
Intended fix path: replace the dynamic timeout expression with literal timeout values and lint the workflow locally before pushing again.
138139
Status: fixed by the literal `timeout-minutes: 60` update and local `actionlint` validation.
139140

141+
- [x] `Desktop publish on macOS and Linux: Roslyn IDE0005 failure`
142+
Failure symptom: the PR workflow created the desktop artifact jobs, but the macOS and Linux publish steps failed before artifact upload.
143+
Suspected cause: publish invoked code-style analysis with `IDE0005`, and the repo did not set `GenerateDocumentationFile=true`, which Roslyn now requires for that analyzer path on those runners; once that path was enabled, redundant global and file-level `using` directives in the app shell were also exposed.
144+
Intended fix path: scope the publish fix to the artifact command by passing `GenerateDocumentationFile=true` and suppressing `CS1591` only for publish-time artifact generation, while keeping the normal `analyze` gate unchanged and removing the redundant `using` directives that publish surfaced.
145+
Status: fixed by the scoped publish properties in `.github/workflows/ci.yml`, the documented `publish-desktop` command, and the `App.xaml.cs`/`GlobalUsings.cs` cleanup.
146+
140147
## Validation Notes
141148

142149
- `dotnet format DotPilot.slnx --verify-no-changes` passed.
@@ -148,6 +155,8 @@ Fix the GitHub Actions CI path used by `managedcode/dotPilot` so it builds with
148155
- `dotnet test DotPilot.slnx` passed and included both the unit and UI suites.
149156
- `dotnet publish DotPilot/DotPilot.csproj -c Release -f net10.0-desktop` passed locally on macOS and produced a publish directory under `artifacts/local-macos-publish`.
150157
- `actionlint .github/workflows/ci.yml` initially failed on invalid job-level `env` usage for `timeout-minutes`; after the fix it passed locally.
158+
- GitHub PR run `23013702026` exposed a publish-time analyzer failure on desktop artifact jobs; the final fix kept `GenerateDocumentationFile` and `CS1591` handling scoped to the publish command so the normal analyzer gate remains strict.
159+
- After removing redundant `using` directives surfaced by the publish path, the final local validation reran successfully with `format`, `build`, `analyze`, unit tests, coverage, UI tests, full solution tests, and the scoped `publish-desktop` command.
151160
- GitHub repository ruleset `Require Full CI Validation` was created in active mode and initially required `Quality`, `Unit Tests`, `Coverage`, and `UI Tests` on the default branch and `refs/heads/release/*`; it now also needs the new desktop artifact checks after the workflow is pushed and verified.
152161

153162
## Final Validation Skills

0 commit comments

Comments
 (0)