Switch local SIL dependency development to local packages#762
Switch local SIL dependency development to local packages#762johnml1135 wants to merge 3 commits intomainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR replaces the previous “overlay/copy local liblcm outputs” approach with an explicit, repo-wide local-source mode rooted at Localizations/LCM, including dedicated build entrypoints and improved VS Code debugging ergonomics.
Changes:
- Introduces
-LcmMode Auto|Package|Localand-ManagedDebugTypeintobuild.ps1, plus local-source detection/state reporting and runtime-output syncing for VS Code symbols. - Adds
FieldWorks.LocalLcm.slnand MSBuild wiring (UseLocalLcmSource, package→project reference switching, build-task bootstrapping). - Updates developer setup + VS Code tasks/launchers, and improves toolchain discovery (MSVC path selection).
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/Agent/Copy-LocalLcm.ps1 | Removes the old “copy locally-built LCM DLLs over NuGet outputs” flow. |
| build.ps1 | Adds LcmMode + ManagedDebugType, local-source selection, and symbol/runtime-output refresh. |
| Src/Common/SimpleRootSite/EditingHelper.cs | Disposes VwPropertyStoreManaged via using. |
| Src/Common/FwUtils/FwUtilsTests/TestFwStylesheetTests.cs | Disposes VwPropertyStoreManaged in tests via using. |
| Src/Common/FieldWorks/FieldWorks.csproj | Enables unmanaged debugging for the FieldWorks project. |
| Src/Common/Controls/Widgets/FontHeightAdjuster.cs | Disposes VwPropertyStoreManaged via using. |
| Setup-Developer-Machine.ps1 | Installs .NET SDK 8.x when missing; adjusts helper-repo cloning/junction behavior for worktrees; clones liblcm nested. |
| FieldWorks.LocalLcm.sln | Adds a dedicated solution that includes local liblcm projects for local-source mode. |
| Docs/architecture/liblcm-local-source-checklist.md | Documents the migration checklist and expectations for local-source mode. |
| Docs/architecture/liblcm-debugging.md | Adds detailed debugging guidance for package vs local-source liblcm workflows. |
| Docs/architecture/dependencies.md | Points dependency debugging guidance to the new liblcm debugging doc and summarizes the workflow. |
| DistFiles/Parts/StandardParts.xml | Adds new part definitions (ImportResidue/Pictures). |
| Directory.Build.targets | Adds package→project reference switching for LCM + build-task bootstrapping/validation targets. |
| Directory.Build.props | Adds UseLocalLcmSource defaults for FieldWorks.LocalLcm and redirects LCM paths/artifacts to nested checkout. |
| Build/Src/FwBuildTasks/Make.cs | Improves MSVC tool path detection under modern VS layouts. |
| Build/Agent/Invoke-VsCodeDebugBuild.ps1 | Adds VS Code prelaunch build wrapper with change detection + mode/debug-type stamping. |
| Build/Agent/FwBuildEnvironment.psm1 | Prefers HostX64\x64 MSVC bin path early in PATH. |
| .vscode/tasks.json | Adds explicit package/local build tasks and “prepare debug” tasks; defaults Build to -LcmMode Auto. |
| .vscode/launch.json | Adds package vs local-LCM launch configs with prelaunch tasks + symbol search paths. |
| .vscode/extensions.json | Recommends the official C# extension while keeping Dev Kit unwanted (ReSharper-first). |
| .serena/project.yml | Adds Serena config keys for line ending and read-only memory patterns. |
NUnit Tests 1 files ± 0 1 suites ±0 5m 50s ⏱️ -11s Results for commit 8468561. ± Comparison against base commit de383e0. This pull request removes 26 and adds 382 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
0112423 to
b25ed38
Compare
|
Cleaned up this PR to match the review feedback and the split described in the local-source plan. What changed:
What remains in this PR is the local liblcm source-mode implementation and the supporting docs/debugger/build-flow changes that are directly part of that workflow. The split toolchain PR is here for separate review: #766 |
bf0bd50 to
899d70c
Compare
jasonleenaylor
left a comment
There was a problem hiding this comment.
This PR looks like it has conflated two different uses of LCM locally, there is a localization related path used mostly by installers or by local testing of localization and the current focus of being able to test LCM fixes by integrating locally built packages and symbols.
The developer is presumed to have LCM cloned locally. The previous helper script would run pack on lcm and capture the version information out of the build log and modify the package references to point at the new version. It would also copy the symbol artifacts from the lcm build output into the fieldworks build output.
I think a cleaner and more developer configurable change would be to have a -LocalLcm parameter which takes a path to the lcm root folder. Validate that location, run dotnet pack in that location, change the lcm package version in the centralized packaging location for fieldworks, copy symbol files to output if necessary.
@jasonleenaylor reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 131 files reviewed, all discussions resolved.
899d70c to
8468561
Compare
Summary
This PR removes the old nested
Localizations/LCMsource workflow and replaces it with a package-only local dependency workflow forlibpalaso,liblcm, andchorus.The supported inner loop now:
Output/LocalNuGetFeedBuild/SilVersions.Local.propsWhat Changed
FieldWorks.LocalLcm.sln/UseLocalLcmSourcepath-LocalPalaso,-LocalLcm, and-LocalChorusswitches tobuild.ps1andtest.ps1packages/Build/Agent/Pack-LocalDependencies.ps1to:libpalasofirst, thenliblcmandchorusin parallelOutput/LocalNuGetFeed/.stamppackages/cachebuild.ps1debug stamps to record:Build/Agent/Invoke-VsCodeDebugBuild.ps1so the VS Code prelaunch helper now:-LocalPackageVersionintobuild.ps1.vscode/tasks.jsonsoPrepare Debug (Local Packages)goes through the helper instead of always rebuilding.vscode/launch.jsonto:clr-based .NET Framework launchers explicitdotnet testlaunch config for this net48 repoDocs/architecture/liblcm-debugging.mdto document:Local PackageslaunchersReuse Behavior
Unchanged local dependency artifacts are reused when all of the following still match:
.nupkgartifacts still exist inOutput/LocalNuGetFeedThe git fingerprint uses:
clean:<HEAD>for clean reposdirty:<sha256(...)>for dirty repos, based on status, diff, and untracked file metadata/contentVS Code Debug Behavior
The VS Code
Prepare Debug (*)path now skips work only when it can prove the last successful portable-PDB debug build still matches the requested session:FieldWorks.exeand matchingFieldWorks.pdbIf those checks fail, the helper rebuilds before launch.
Validation
Completed locally with the repo-standard entrypoints and targeted debug-helper validation:
./build.ps1 -LocalPalaso -LocalLcm -LocalChorus./build.ps1 -BuildTests -LocalPalaso -LocalLcm -LocalChorus./test.ps1 -NoBuild -LocalPalaso -LocalLcm -LocalChorus./Build/Agent/Invoke-VsCodeDebugBuild.ps1 -ManagedDebugType portableOutput/Debug/FieldWorks.pdb, reran the package-mode helper, and confirmed it rebuilt before launch, then skipped on the next run./Build/Agent/Invoke-VsCodeDebugBuild.ps1 -LocalPalaso -LocalLcm -LocalChorus -ManagedDebugType portableCI: Full local checkgit diff --check -- .vscode/launch.json .vscode/tasks.json Build/Agent/Invoke-VsCodeDebugBuild.ps1 Build/Agent/Pack-LocalDependencies.ps1 Docs/architecture/liblcm-debugging.md build.ps1Notes:
test.ps1attempt was blocked by a stale VS Code PowerShell host holding output test DLLs open; rerunning after clearing that stale shell made the-BuildTestspath succeedBackTranslationNonInterleaved_MissingPictureBackTranslationNonInterleaved_DefaultParaCharsStartApplyWS_MultipleWritingSystemsMigrateFrom83Alpha_MoveStemToLexeme(timeout)CI: Full local checkran, but the repo whitespace task printed a noisygit diffusage block in this worktree state; the changed files themselves passed a directgit diff --checkwhitespace checkReview Focus
Please focus review on:
build.ps1/test.ps1Build/Agent/Pack-LocalDependencies.ps1Build/Agent/Invoke-VsCodeDebugBuild.ps1This change is