Repository navigation
[Local|Packaging] Fail pnpm dist on a missing toolchain, with the install command - #1928
Conversation
…l command pnpm dist staged audio.cpp and sd.cpp leniently, so a machine without CMake or GCC 13 built an installer with no local audio and only a warning in the scrollback. It now passes --strict, as release CI does, and stages the native runtimes first so a missing tool stops it in about a second. The failure names every missing tool at once and prints the command that installs them with the machine's package manager, without a stack trace. predev stays lenient. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@CREDO23 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
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: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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
pnpm diststages sd.cpp and audio.cpp with--strict, as release CI does. Before, a machine without CMake or GCC 13 built an installer with no local audio, with only a warning in the scrollback, and the app then said "Audio models cannot run on this computer".xcode-select, winget). No stack trace:predevstays lenient: dev prints the same message and runs without local audio.build-audiocpp.ymlandbuild-sdcpp.ymlalso run on changes toscripts/not-staged/, which both compile scripts now import.g++is GCC 13 only from Ubuntu 24.04 and Fedora 39, so an older g++ is named without a command. The winget and Homebrew commands have not been run on Windows or macOS.pnpm test(87 pass, 7 new on the message),pnpm typecheck, andpnpm diston Ubuntu 24.04 without and then with CMake and g++.Follows #1914
🤖 Generated with Claude Code
High-level PR Summary
This PR improves the local packaging experience by making
pnpm distfail fast and clearly when build tools are missing, instead of silently creating broken installers. When CMake, GCC 13, or other required toolchains are absent, the build now stops immediately with a helpful error message that includes the exact package manager command to install what's missing (for apt, dnf, pacman, Homebrew, or winget). The native runtime builds (sd.cpp and audio.cpp) are moved to the front of the build pipeline to catch toolchain issues before the slower frontend and PyInstaller steps run. Development builds remain lenient so developers can still run without local audio/image support.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_local/electron/scripts/not-staged/tools.mjssurfsense_local/electron/scripts/not-staged/install-commands.mjssurfsense_local/electron/scripts/not-staged/package-manager.mjssurfsense_local/electron/scripts/not-staged/message.mjssurfsense_local/electron/scripts/not-staged/message.test.mjssurfsense_local/electron/scripts/audiocpp/compile.mjssurfsense_local/electron/scripts/sdcpp/compile.mjssurfsense_local/electron/scripts/audiocpp/stage.mjssurfsense_local/electron/scripts/sdcpp/stage.mjssurfsense_local/electron/package.json.github/workflows/build-audiocpp.yml.github/workflows/build-sdcpp.ymldocs/architecture/packaging.md