Friendlier loadTestConfig() error, point to example.json, gtest behind vcpkg feature - #118
Merged
Merged
Conversation
…d vcpkg feature - examples/test_config.h: loadTestConfig() threw a bare "Could not open config file" with no guidance when examples/test.json is missing - the single biggest first-run barrier per issue #113. Now explains it's gitignored/not shipped, points at examples/example.json as the template, and links the docs. - README/docs/examples.md: point the test.json section at the existing examples/example.json template instead of only showing a fresh JSON block. - vcpkg.json/CMakeLists.txt: move gtest behind an opt-in "tests" manifest feature instead of an unconditional dependency, so HYPERLIQUID_BUILD_TESTS=OFF consumers (the default) never install or build it. Requires HYPERLIQUID_BUILD_TESTS's option() to be declared before project() so VCPKG_MANIFEST_FEATURES is set before the toolchain's manifest-install step runs. Verified: HYPERLIQUID_BUILD_TESTS=OFF never installs gtest; HYPERLIQUID_BUILD_TESTS=ON (both manually and via the "default" preset) installs it and all 28 tests pass; loadTestConfig()'s new message confirmed by actually running an example with test.json removed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
=======================================
Coverage 69.53% 69.53%
=======================================
Files 53 53
Lines 8219 8219
Branches 513 513
=======================================
Hits 5715 5715
Misses 2501 2501
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 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.
Summary
Closes out the two remaining items from #113 that weren't fully addressed in #115/#116: the
loadTestConfig()error message itself, and the packaging note aboutgtest.loadTestConfig()error message - v0.1.0 review: correctness issues and onboarding gaps #113 specifically called this out as "the single biggest barrier to picking the project up": the exception thrown whenexamples/test.jsonis missing was a bareCould not open config file: <path>with zero guidance. It now explains the file is gitignored/not shipped, points at the existingexamples/example.jsontemplate, and links the docs.examples/example.json- this template file already existed in the repo but neither the README nordocs/examples.mdreferenced it; both now point at it as the thing to copy.gtestbehind an opt-in vcpkg feature - previously an unconditionalvcpkg.jsondependency, so every downstream consumer built it even withHYPERLIQUID_BUILD_TESTS=OFF. Moved into a"tests"manifest feature, only requested whenHYPERLIQUID_BUILD_TESTS=ON. This requiresHYPERLIQUID_BUILD_TESTS'soption()to be declared beforeproject()inCMakeLists.txt, sinceVCPKG_MANIFEST_FEATUREShas to be set before the toolchain's manifest-install step runs (which happens as part ofproject()) - the duplicate later declaration was removed.Test plan
-DHYPERLIQUID_BUILD_TESTS=OFF: confirmed viafind build/vcpkg_installed -iname "*gtest*"that gtest is never installed.-DHYPERLIQUID_BUILD_TESTS=ON(both manually and viacmake --preset default): confirmed gtest is installed, andctestreports 28/28 passing.-DHYPERLIQUID_WARNINGS_AS_ERRORS=ONin both configurations - no warnings/errors.examples/test.json, ranrest_orders) and confirmed the new message prints as intended before the process aborts.mkdocs build --strictstill passes clean after thedocs/examples.mdedit.🤖 Generated with Claude Code
https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse