feat(auto-update): add managed daemon auto-update - #110
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
unity-cliand the C# LSP so daemon startup can self-refresh without overwriting user-installed binaries.unitydandlspdthrough the managedunity-clicopy and surface version metadata so update state is diagnosable from status output.unity-cli-manifest.json,unity-cli cli doctor, andunity-cli cli installso the auto-update path is publishable and discoverable.Changes
src/lsp_manager.rs: refactor the LSP-only downloader into a shared managed binary updater, add install/doctor/status APIs forunity-cliandcsharp-lsp, and add test-only remote-skip coverage.src/unityd.rsandsrc/lspd.rs: start daemons from the managedunity-clicopy, unify tools-root usage, and include managed binary metadata in status responses.src/cli.rsandsrc/main.rs: add typedunity-cli cli installandunity-cli cli doctorcommands..github/workflows/release.yml: generate and uploadunity-cli-manifest.jsonalongsidecsharp-lsp-manifest.json.README.md,README.ja.md,docs/tools.md, andRELEASE.md: document managed auto-update behavior and the new CLI entrypoints.src/lsp.rs: set a test-only skip flag so unit tests stay hermetic when daemon startup now checks managed updates.Testing
cargo fmt --all— completes successfully after formatting the updated Rust sources.cargo clippy --all-targets -- -D warnings— exits successfully with no warnings.cargo test --all-targets— passes with205 passed; 0 failed.Related Issues / Links
Checklist
cargo clippy,cargo fmt,svelte-check) —cargo fmt --allandcargo clippy --all-targets -- -D warningspassed;svelte-checkN/A: no Svelte codeContext
unitydis bundled insideunity-cli, so supporting automatic daemon updates required a managed-copy strategy for the CLI itself instead of only refreshing the C# LSP payload.unity-cli-manifest.jsonbefore the runtime updater could resolve checksums and asset URLs for each RID.Risk / Impact
UNITY_CLI_TOOLS_ROOT, release asset generation, and daemon status JSON output.unity-cli-manifest.json; daemon startup will fall back to the pre-existing non-managed behavior.Notes
unity-cliself-update becomes fully active after the first release that includesunity-cli-manifest.json; until then,unity-cli cli doctorwill report the manifest as unavailable on current public releases.