Fix false server/runtime mismatch from installed wrapper#313
Open
capt-marbles wants to merge 1 commit into
Open
Fix false server/runtime mismatch from installed wrapper#313capt-marbles wants to merge 1 commit into
capt-marbles wants to merge 1 commit into
Conversation
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
jcodewrapper candidates against their siblingjcode-linux-x86_64.binfor reload identity and mtime checks.Problem / reproduction
On a release install, the channel candidate is the small
jcodeshell wrapper, while the daemon is actually runningjcode-linux-x86_64.binafter the wrapper execs it. In my local install, both client and server were onv0.18.4, but the wrapper mtime was slightly newer than the real binary:Because
server_has_newer_binary()compared the wrapper mtime to the running executable mtime, the server could reportserver_has_update: trueeven though it was already running the installed binary version. The TUI then showed:Edge cases / tradeoffs
LD_LIBRARY_PATHfor bundled libraries.jcodewhen a siblingjcode-linux-x86_64.binexists. Other paths keep existing behavior.Test
cargo test -p jcode-app-core newer_binary_tests -- --nocaptureNote: full
cargo fmt --checkcurrently reports unrelated formatting drift in other files; this PR was formatted only for the touched file withrustfmt --edition 2024 crates/jcode-app-core/src/server/util.rs.