test(installer): regression tests for a dependency with no boss.json (#281) - #286
Draft
isaquepinheiro wants to merge 1 commit into
Draft
test(installer): regression tests for a dependency with no boss.json (#281)#286isaquepinheiro wants to merge 1 commit into
isaquepinheiro wants to merge 1 commit into
Conversation
…ith no boss.json verifyDependencyCompatibility currently returns the load error when a dependency ships no boss.json, which fails the whole install. HashLoad#281 fixes the behaviour; these three tests pin it so a future lint sweep cannot reintroduce it. - WithoutBossJSON: a plain source library with no manifest must install. - MalformedBossJSON: a boss.json that exists but does not parse must still be reported, so the fix stays narrow. - UnsupportedPlatform: the engines/platforms check itself keeps working in strict mode. Only the first one depends on HashLoad#281; the other two pass on main today. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Regression tests for the fix in #281. Tests only — no production code.
Why
verifyDependencyCompatibilityloads the dependency'sboss.jsonto readengines.platforms. Sincecef145bit returns the load error when the file is absent, andinstallDependencyturns that into a failed install:Most Delphi libraries ship no
boss.json, so a single such dependency kills the whole run. #281 fixes it. These tests pin the behaviour so a future lint sweep cannot reintroduce it — the original change was itself a lint cleanup, and nothing in the suite objected.That the rest of the pipeline always tolerated a missing manifest is visible in the code:
processOthersskips it (core.go:264-267),buildSearchPathguards onerr == nil, and the build stage even prints⏩ <dep> has no boss.json.What the tests cover
WithoutBossJSONMalformedBossJSONboss.jsonthat exists but does not parse is still reported — the fix stays narrow and thenilerrintent behindcef145bsurvivesUnsupportedPlatformengines/platformscheck itself still refuses a mismatch in strict modeVerification
Measured on two binaries built from the same tree (
v3.0.17,1ea375d), differing only by #281, against aboss.jsonwhose single dependency isgithub.com/academiadocodigo/localcache4d ^1.0.0:❌ Installation failed: failed to load package from ...boss.json✅ Installation completed successfully!Against #281's actual head (
7d9d587) all three tests pass. Reverting only the fix and keeping the tests makesWithoutBossJSONfail while the other two stay green — so the test is load-bearing and the fix is not too broad. Full upstream suite with #281 applied: 29 packagesok, 0 failures,go vetclean.Opened as a draft on purpose.
WithoutBossJSONfails onmaintoday — that failure is the bug being reproduced. CI will be red until #281 lands.Merge #281 first, then this goes green and I will mark it ready. Happy to fold these tests into #281 instead if that is easier for the author — whatever gets the fix released soonest.
🤖 Generated with Claude Code