fix: desktop build script#28169
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #27869 - "fix(nix): re-inherit patches in desktop, ad-hoc sign .app on darwin" This PR also addresses desktop build-related issues, specifically around Nix patches and signing the .app on Darwin. It may be related to the current PR #28169 if both are addressing desktop build problems. Additionally, PR #26202 - "fix(desktop): ensure Electron binary before predev via install.js" This PR also deals with desktop build setup, though it's older and may already be merged. However, note that the current PR #28169 has a minimal description (mostly template text with no actual details about the fix), so it's difficult to determine exact overlap. If you can clarify what specific desktop build issue is being addressed, I can do a more targeted search. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Issue for this PR
Closes #
Type of change
What does this PR do?
Fixes desktop builds trying to install
@opencode-ai/plugin@localThe desktop prebuild builds the embedded opencode server through
packages/opencode/script/build-node.ts. That build embeddedOPENCODE_CHANNEL, but did not embedOPENCODE_VERSION. At runtime this meant the server was treated as a non-local build, while InstallationVersion still fell back to "local"Config dependency install uses that state to decide the plugin dependency version, so it produced the invalid npm spec
@opencode-ai/plugin@localThis PR embeds
OPENCODE_VERSIONin the node server build and makes the desktop prebuild pass its resolvedOPENCODE_CHANNELinto that build explicitly. With both values present, packaged desktop installs the matching published plugin version instead of local.If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
set these envs
$env:OPENCODE_VERSION = "1.15.4"
$env:OPENCODE_CHANNEL = "dev"
bun run buildbun run package:winScreenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.