fix(vscode-test-client): spawn lspf-hello binary instead of examples/hello#25
Merged
Merged
Conversation
…hello The workspace migration moved the template server from `examples/hello` to the `lspf-hello` workspace member, but the VS Code test client still pointed at `target/debug/examples/hello`, which no longer exists. Extract the server-path resolution into a pure `resolveServerBinary` function so it can be unit-tested, and point it at `target/debug/lspf-hello`. Add a Node built-in test-runner test guarding against regressing to the legacy example path, and update the README and package metadata to the `cargo build -p lspf-hello` workflow. The end-to-end smoke tests already live in `crates/lspf-hello/tests/` and run under `cargo test --workspace`, completing issue #21. Closes #21 Co-Authored-By: Claude Opus 4.8 <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.
Summary
Completes issue #21 (migrate smoke tests and VS Code test client to
lspf-hello).The workspace migration (#24) already moved the end-to-end smoke tests into
crates/lspf-hello/tests/— they build thelspf-hellobinary viaCARGO_BIN_EXE_lspf-helloand run undercargo test --workspace. The one remaining piece was the VS Code test client, which still spawned the now-nonexistenttarget/debug/examples/hello.This PR points the client at
target/debug/lspf-helloand updates its docs.Approach (TDD)
The testable behavior in the TS client is the server-binary path resolution, so I drove it test-first:
src/serverPath.test.tsasserting the resolved path istarget/debug/lspf-helloand is not the legacyexamples/hellopath. Failed (module missing).resolveServerBinary(repoRoot)intosrc/serverPath.ts.extension.tsto use it.Tests use the Node built-in test runner (
node --test), so no new dependencies are added.Acceptance criteria
tests/smoke.rslives incrates/lspf-hello/tests/(done in refactor: migrate repository to Cargo workspace (#20) #24)lspf-hello(usesCARGO_BIN_EXE_lspf-hello)tools/vscode-test-client/code + README spawntarget/debug/lspf-hellocargo test --workspaceincludes the relocated smoke tests (3 passing)Verification
cargo test --workspace— all pass, including the 3 relocated smoke testsnpm run compileintools/vscode-test-client— cleannpm test— 2 passingCloses #21
🤖 Generated with Claude Code