Skip to content

test(installer): regression tests for a dependency with no boss.json (#281) - #286

Draft
isaquepinheiro wants to merge 1 commit into
HashLoad:mainfrom
isaquepinheiro:test/missing-bossjson-regression
Draft

test(installer): regression tests for a dependency with no boss.json (#281)#286
isaquepinheiro wants to merge 1 commit into
HashLoad:mainfrom
isaquepinheiro:test/missing-bossjson-regression

Conversation

@isaquepinheiro

Copy link
Copy Markdown
Contributor

Regression tests for the fix in #281. Tests only — no production code.

Why

verifyDependencyCompatibility loads the dependency's boss.json to read engines.platforms. Since cef145b it returns the load error when the file is absent, and installDependency turns that into a failed install:

failed to load package from ...\modules\<dep>\boss.json: The system cannot find the file specified.
❌ Installation failed

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: processOthers skips it (core.go:264-267), buildSearchPath guards on err == nil, and the build stage even prints ⏩ <dep> has no boss.json.

What the tests cover

Test Guards
WithoutBossJSON a plain source library with no manifest installs normally
MalformedBossJSON a boss.json that exists but does not parse is still reported — the fix stays narrow and the nilerr intent behind cef145b survives
UnsupportedPlatform the engines/platforms check itself still refuses a mismatch in strict mode

Verification

Measured on two binaries built from the same tree (v3.0.17, 1ea375d), differing only by #281, against a boss.json whose single dependency is github.com/academiadocodigo/localcache4d ^1.0.0:

Binary Result Exit
v3.0.17 ❌ Installation failed: failed to load package from ...boss.json 1
v3.0.17 + #281 ✅ Installation completed successfully! 0

Against #281's actual head (7d9d587) all three tests pass. Reverting only the fix and keeping the tests makes WithoutBossJSON fail 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 packages ok, 0 failures, go vet clean.

⚠️ Merge order

Opened as a draft on purpose. WithoutBossJSON fails on main today — 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

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant