Fix patch build broken by StructureMap.dll leaving the output - #1092
Merged
Conversation
Comment hygiene (advisory)3 comment-style violation(s) in the lines this branch adds since
Fix them per |
liblcm swapped its IoC container from StructureMap to Microsoft.Extensions.DependencyInjection in SIL.LCModel 11.0.0-beta0176, so nothing copies StructureMap.dll into Output/Release any more. The base build still ships it, and pyro refuses to drop a component from a patch, so every patch build fails with PYRO0305. RescuePatching already exists for this: it writes a zero-byte stand-in for a file the base ships that the build no longer emits, which keeps the component present. StructureMap.dll is now listed there. Its transitive dependencies were resolved from the framework and never shipped, and the replacement DI assemblies are additions, which a patch handles, so this is the only file to stand in for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jasonleenaylor
force-pushed
the
fix/patch-rescue-structuremap
branch
from
August 20, 2026 05:37
09c5570 to
39eced0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1092 +/- ##
==========================================
- Coverage 38.31% 38.31% -0.01%
==========================================
Files 1507 1507
Lines 350524 350524
Branches 40288 40288
==========================================
- Hits 134315 134311 -4
- Misses 186978 186981 +3
- Partials 29231 29232 +1 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every patch build on
mainis failing. The last three runs ofpatch-installer-cddied the same way:Why it broke
liblcm swapped its IoC container from StructureMap to
Microsoft.Extensions.DependencyInjectionin SIL.LCModel11.0.0-beta0176. Nothing copiesStructureMap.dllintoOutput/Releaseany more, but the base build (9.3.10.1) still ships it.pyrowill not let a patch drop a component from a feature, so the patch build fails outright.The fix
RescuePatchinginBuild/Installer.legacy.targetsalready exists for exactly this case: it writes a zero-byte stand-in for a file the base ships that the build no longer emits, which keeps the component present so the patch is buildable without cutting a new base.StructureMap.dllis now listed there. That is the whole change -- one item and its comment.StructureMap.dllis the only file to stand in for:System.Reflection.Emit.Lightweight) resolved from the framework and was never shipped -- it does not appear in the base MSI's file list.Microsoft.Extensions.DependencyInjection.Abstractions.dllandMicrosoft.Bcl.AsyncInterfaces.dll; onlyMicrosoft.Extensions.DependencyInjection.dllis new.StructureMap.xmlwas never shipped either -- the base lists only the.dll.The existing
BuildProductBaseMsiwarning ("RemovedSinceLastBase should be cleared out before making a new base build") already covers the follow-up: whoever cuts the next base build gets told to clear this entry. Verified it still fires with the item populated, sinceBuildProductMainandBuildProductBaseMsirun in the same nested MSBuild invocation and the target-scoped item survives across them.Verification
dir-outputBaseis assigned inside theSetuptarget rather than a staticPropertyGroup, and nothing in the installer target chain namesSetupin itsDependsOnTargets, so I checked that it is actually populated by the timeRescuePatchingruns instead of assuming it. Running the target directly:That is the same directory
CopyFilesToInstallharvests ($(fwrt)\Output\$(Configuration)), andRescuePatchingruns before it inBuildProductMain, so the placeholder is picked up into the install image.Running
Build/InstallerBuild.proj /t:RescuePatchingwritesOutput/Release/StructureMap.dllat 0 bytes. Running/t:RescuePatching;BuildProductBaseMsiadditionally emits the existing base-build reminder:Not verified locally: a full
-BuildPatch, which needs a Release build plus the base MSI and the WiX toolchain. CI on this PR is the real test.What this does not do
This keeps patching alive without a new base build, which is the documented purpose of
RescuePatching. It does not remove the component for real -- that needs a new base build, at which point thisRemovedSinceLastBaseentry should be deleted.A zero-byte unversioned
StructureMap.dllreplacing a versioned one is subject to MSI's file-versioning rules, so an installed copy may well be left on disk untouched. That is harmless: nothing loads it any more.🤖 Generated with Claude Code
This change is