Repository navigation
Install lldb-dap from the plugin details with Homebrew (0.1.0) - #6
Closed
xiaoyumuxi wants to merge 2 commits into
Closed
xiaoyumuxi wants to merge 2 commits into
xiaoyumuxi wants to merge 2 commits into
Conversation
When neither PATH nor `xcrun --find lldb-dap` has lldb-dap, the debug capability card now offers an install button: a command installer runs `brew install llvm` through a plugin-qualified Homebrew tool definition (brew on PATH, /opt/homebrew or /usr/local) and reads the directory from `brew --prefix llvm` plus bin. Only the toolDefault target is declared, since Homebrew owns where LLVM goes. The manifest now requires commandInstallers and toolDefinitions and asks for commands.install. scripts/test.mjs builds a C program with clang -g and runs two real DAP sessions as the manifest declares them: one with the lldb-dap Lithe finds today and one after the declared install, each stopping on a breakpoint, reading a local and exiting cleanly. CI runs it on macos-latest. The host e2e pin moves to 1lck/Lithe-IDEA 4032c5ca0, which serves commandInstallers, and the test validates with the host's declared capabilities instead of a hard-coded list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Homebrew's llvm formula no longer builds LLDB; its caveats say LLD and LLDB are separate formulae now, and CI showed `brew install llvm` leaves no lldb-dap in `$(brew --prefix llvm)/bin`. The installer now runs `brew install lldb` and probes `brew --prefix lldb` plus bin. The lldb formula is keg-only, depends on llvm and Python, and is built with LLDB_USE_SYSTEM_DEBUGSERVER, so it launches programs through the Command Line Tools' debugserver. The docs say what this downloads, that Homebrew ships bottles only for Apple Silicon on macOS 15 and later (elsewhere it builds from source and can run past the one-hour limit), and how to remove it. When lldb-dap is not where the directory probe says, the test now lists what is there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
由 #7 代替:改动相同,提交里去掉了 Co-Authored-By 署名。 |
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.
变化
找不到
lldb-dap时(PATH和xcrun --find lldb-dap都没有),插件详情里调试能力的卡片上出现 安装 按钮。版本升到 0.1.0。commandInstallers:lldb-dap安装器运行brew install lldb,只声明toolDefault目标(位置由 Homebrew 决定),目录探针是brew --prefix lldb加bin,超时 3600 秒,mayUseNetwork: true。toolDefinitions:插件限定 ID 的io.github.lithe-idea.lldb-debug:homebrew(避免和别的插件的短 ID 互相争用),先找PATH里的brew,再扫描/opt/homebrew、/usr/local的bin/brew,版本探针brew --version。requires.commandInstallers、requires.toolDefinitions、requiresTools和commands.install权限。xcode-select --install是 GUI 安装器,没法作为安装命令;Homebrew 本身要求命令行工具,而 Homebrew 的lldb用LLDB_USE_SYSTEM_DEBUGSERVER构建,启动程序用的就是命令行工具里的debugserver。lldb不是llvm:Homebrew 的llvm已经不再包含 LLDB(它的 caveats 写着 LLD、LLDB 拆成了单独的 formula)。这个 PR 第一次 CI 用brew install llvm,装完$(brew --prefix llvm)/bin里没有lldb-dap,所以改成lldb。lldb依赖llvm和 Python,会下载几百 MB,装好后超过 1 GB;lldb、llvm都是 keg-only,不改PATH,也不替换系统的lldb、clang。Homebrew 只给 Apple Silicon 上的 macOS 15 及以上提供预编译包,Intel Mac 和更早的 macOS 会从源码编译,可能超过一小时的时限。这些 README 和发布说明里都写了。验证
scripts/test.mjs(新):用clang -g编译 C 程序,按清单声明跑两次真实 DAP 会话:先用xcrun找到的 Xcodelldb-dap,再按安装器声明执行brew install lldb、从目录探针给出的目录启动装好的lldb-dap;每次都要命中断点、行号正确、读出局部变量answer = 42、退出码 0。目录里找不到命令时会列出目录内容。CI 新增commandsjob 在 macos-latest 上运行它。本地LITHE_TEST_INSTALL=0通过(Xcode 的 lldb-dap);没有在本机执行brew install lldb,安装路径由 CI 验证。validate_manifest_value通过;工具注册无冲突;macOS 发现计划扫描/opt/homebrew、/usr/local;安装需求把lldb-dap安装器挂到lldb调试适配器;toolDefault计划是brew install lldb,managed被拒绝(plugin.commandInstaller.targetUndeclared);默认目录对/opt/homebrew/opt/lldb给出/opt/homebrew/opt/lldb/bin。e2e/host/lithe-host.json固定到 1lck/Lithe-IDEA 4032c5ca0(含 #1954、#1964、#1971、#1975)。原来的测试用写死的能力表校验清单,改为用宿主的pluginhost.Declared();node scripts/e2e-host.mjs中TestDebugRealLLDBLaunchTargetAndBreakpoints通过。node scripts/package.mjs和 Lithe Store 规则检查通过(0 problems)。兼容性
0.1.0 需要支持
commandInstallers的桌面端(1lck/Lithe-IDEA#1971),更早的桌面端继续用 0.0.1。PRERELEASE_TAGS加上v0.1.0。合并后推送v0.1.0标签发布,再在 Lithe Store 提交 0.1.0 条目(requires要加commandInstallers、toolDefinitions,SHA-256 用 Release 上的实际值)。