chore: improve build, test, and installer reliability#908
Conversation
Keep build/test helper cleanup out of the render commit. Keep agent, installer, and xWorks cleanup separate. Normalize TonePars generated-file comparisons for Windows paths. chore: drop legacy CollectTargets changes chore: narrow non-render cleanup scope chore: normalize non-render cleanup whitespace
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Improves FieldWorks build/test/installer reliability and developer/CI ergonomics by hardening scripts, normalizing diagnostics toggles, and cleaning up stale artifacts (native and WPF) that commonly break subsequent builds after interruptions or branch switches.
Changes:
- Adds native artifact freshness checks and a fail-fast non-Windows guard in build/test scripts.
- Improves SDK/WPF build hygiene via solution metadata defaults and stale
*_wpftmp*exclusion/cleanup. - Centralizes WiX DTF package versions under installer-scoped CPM and updates docs/tooling guidance accordingly.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/toolshims/environ.cmd | Updates deprecated shim messaging (now Windows-only guidance). |
| scripts/Agent/Git-Search.ps1 | Improves repo-root inference and provides clearer failure when not in a repo. |
| build.ps1 | Renames tracing switch, adds non-Windows fail-fast, and refreshes stale native artifacts for TestViews builds. |
| Test.runsettings | Normalizes formatting/indentation. |
| Src/Utilities/pcpatrflex/DisambiguateInFLExDB/DisambiguateInFLExDBTests/ToneParsInvokerTests.cs | Normalizes Windows absolute paths in test comparisons. |
| Src/AppForTests.config | Simplifies trace listener binding to avoid version-specific assembly qualification. |
| SDK_MIGRATION.md | Updates docs to reflect -EnableTracing rename. |
| ReadMe.md | Clarifies Linux/macOS limitations (edit/review only; no build/test/installer). |
| FLExInstaller/wix6/Shared/CustomActions/CustomActions/CustomActions.csproj | Removes explicit WiX DTF versions to rely on installer-scoped CPM. |
| FLExInstaller/Directory.Packages.props | Enables CPM within installer subtree and centralizes WiX DTF versions. |
| Docs/CONTRIBUTING.md | Updates platform guidance and notes non-Windows scripts intentionally fail fast. |
| Directory.Build.targets | Adds target to delete stale WPF temp project files before markup compile pass 2. |
| Directory.Build.props | Sets SolutionDir/SolutionName defaults and excludes *_wpftmp* from SDK globbing. |
| Build/scripts/Invoke-CppTest.ps1 | Uses shared staleness check to refresh native prerequisites for TestViews. |
| Build/Src/NativeBuild/NativeBuild.csproj | Formatting-only change to a PackageReference element. |
| Build/Installer.legacy.targets | Treats ScrChecks artifacts consistently in legacy installer harvesting. |
| Build/Agent/fix-whitespace.ps1 | Simplifies whitespace fixer by removing custom BOM preservation logic. |
| Build/Agent/Verify-FwDependencies.ps1 | Ensures summary counts are reliable by forcing pipeline results into arrays. |
| Build/Agent/README.md | Documents Run-AllRenders.ps1. |
| Build/Agent/FwBuildHelpers.psm1 | Adds shared timestamp helpers + Views native artifact staleness detection. |
| AGENTS.md | Updates agent playbook and adds external dependency note for LibLcm. |
| .vscode/settings.json | Adjusts auto-approved tasks list and clarifies Windows-only tasks requiring approval. |
| .github/workflows/patch-installer-cd.yml | Whitespace/formatting cleanup in workflow. |
| .github/instructions/dotnet-framework.instructions.md | Minor whitespace cleanup. |
NUnit Tests 1 files ±0 1 suites ±0 11m 7s ⏱️ +34s Results for commit ae21869. ± Comparison against base commit 5ce891b. This pull request removes 2 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
I don't know where this came from. Maybe I should but it has me confused. |
jasonleenaylor
left a comment
There was a problem hiding this comment.
@jasonleenaylor reviewed 24 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on johnml1135).
Src/Utilities/pcpatrflex/DisambiguateInFLExDB/DisambiguateInFLExDBTests/ToneParsInvokerTests.cs line 190 at r2 (raw file):
normalized = NormalizeViaIndex(normalized, "TestData", "TestData"); normalized = NormalizeViaIndex(normalized, tp, tp); return Regex.Replace(normalized, @"[A-Za-z]:\\(?:[^\\\r\n""]+\\)*", "");
Add a comment here for humans who can't easily parse regex so we understand the purpose of the replace in the future.
|
@jasonleenaylor Pushed in ae21869. For the ScrChecks.* lines: those entries are only there to keep the output-root copies out of the broad $(OutputDirForConfig)*** harvest, so the installer still takes the canonical copies from DistFiles\Editorial Checks. I reworded the adjacent comments in Build/Installer.legacy.targets to make that intent explicit. For ToneParsInvokerTests, I added an inline comment above the regex explaining that it strips machine-specific absolute Windows path prefixes before comparison so the test stays stable across temp and repo roots. |
Summary
This is a focused non-render cleanup for FieldWorks build, test, and installer reliability. It does not change product UI behavior; it makes local and CI workflows easier to reason about after branch switches, interrupted builds, installer work, and machine-specific test output.
What changed and why
Build and native-test reliability
Build/Agent/FwBuildHelpers.psm1and use them frombuild.ps1/Build/scripts/Invoke-CppTest.ps1to detect stale Views/FwKernel native artifacts before building or runningTestViews.*.vcxproj,*.props,*.targets,*.inl, and related files.SDK-style build hygiene
SolutionDir/SolutionNameinDirectory.Build.propsfor nested SDK-style projects.MarkupCompilePass2for WPF projects.ParserUIcontains a small WPF/XAML surface.Installer dependency and packaging cleanup
FLExInstaller/Directory.Packages.propswhile keeping them scoped to installer projects.ScrChecks.dll/ScrChecks.pdbare treated consistently with files supplied fromDistFiles\Editorial Checks.Platform and diagnostics clarity
build.ps1fail fast on non-Windows hosts and clarify in docs that Linux/macOS are useful for editing, search, docs, specs, and agent review, but not FieldWorks build/test/installer runs.-EnableTracing, while keeping-TraceCrashesand the legacy--TraceCrashesfallback for compatibility.Src/AppForTests.configtrace listener type binding so the test config is less tied to a specific assembly version string.Agent helper and whitespace tooling cleanup
Verify-FwDependencies.ps1handle singleton pipeline results as arrays so summary counts stay reliable.Build/Agent/fix-whitespace.ps1use explicit UTF-8 encodings, preserve existing BOM state for ordinary text files, and force BOM-less output only for.cmd/.batentrypoint scripts.scripts/Agent/Git-Search.ps1prefer the current repo/worktree when inferring its root.Deterministic TonePars comparison
ToneParsInvokerTestsbefore comparing generated command content.Scope notes
Src/xWorkschanges are included.Validation
CI: Commit messagespassed after the review-fix commit.CI: Whitespace checkreportedNo problems foundafter the review-fix commit. Its fixer step tried to normalize unrelated files becauseorigin/mainadvanced; that validation-time churn was discarded.build.ps1parses,Build/Agent/fix-whitespace.ps1parses,FwBuildHelpers.psm1imports,-TraceCrashesis registered as an alias for-EnableTracing,scripts/toolshims/environ.cmdhas no UTF-8 BOM, and the timestamp helper smoke test passed.shell: Buildpassed before the final PR recreation.shell: Testpassed before the final PR recreation: 4150 total, 4090 passed, 60 skipped.Reviewer focus
Build/Agent/FwBuildHelpers.psm1,build.ps1, andBuild/scripts/Invoke-CppTest.ps1.Directory.Build.props/Directory.Build.targets.FLExInstaller/Directory.Packages.propsand the WiX custom actions project.build.ps1.Build/Agent/fix-whitespace.ps1andscripts/toolshims/environ.cmd.This change is