TLDR: Extend the lldb-dap extension to automatically download lldb-dap
?
Problem description
With the lldb-dap VS-Code extension published to the Marketplace (see previous discussion in [RFC] Publishing an official LLDB extension in the Visual Studio Marketplaces), using lldb-dap already got much, much simpler.
However, users still need to procure the lldb-dap
binary from somewhere before they can use the VS-Code extension. It would be great if we could provide a better out-of-the-box experience for users.
Prior art: clangd
The clangd extension was facing a similar issue: It needs the clangd binary to properly function.
The problem was solved by:
- hosting prebuilt clangd releases (Releases · clangd/clangd · GitHub)
- asking the user if he wants to download the release binaries, in case no
clangd
binary was found in the$PATH
Proposal
I think we should provide the same user experience as clangd
does: If the lldb-dap
binary was not found, we should prompt the user if he would like us to download the lldb-dap
binary. Maybe we could even reuse (parts of) clangd’s download management code for this.
For hosting the pre-built binaries, I would consider to simply use the binaries from LLVM’s Github Release page. Those packages do already contain the lldb-dap
binary today. They might be a bit large, as they contain all of LLVM, clang, clangd, clang-tidy and many more binaries we wouldn’t need. But despite the large download, the end-to-end user experience would already be significantly improved. And maybe there is a chance to also publish more fine-grained packages in the future.
CC @wallace @JDevlieghere @clayborg re lldb-dap
CC @sam-mccall @hokein re their experiences with a similar mechanism for clangd
and re code-reuse for download manager
CC @tstellar @tobiashieta re more fine-grained release packages