feat(plugins): read the Maven / Gradle dependency graph (API 1.10) (#3829)

Plugins had to run mvn dependency:tree / gradlew dependencies themselves or parse build files. A new build interface in wit/workspace.wit, build.dependencies(project, module), returns the graph the Dependency Analyzer has as a flat list of dependency-node records (group, artifact, version, scope, status, requested version, parent), each module a root, behind the low-risk build.read capability in trusted projects. Nothing is resolved by the call: Maven returns the trees cached by the last Reload (declared dependencies before one); Gradle dependency reports, which only lived in the frontend, are now saved per project and configuration in the build cache and dropped on a build-file change. Capped at 100,000 nodes per call. SDK: Project::build_dependencies with a mock; checked-in components rebuilt.

Closes #3715

Co-authored-by: bertyhell <1710840+bertyhell@users.noreply.github.com>
This commit is contained in:
Bert Verhelst
2026-11-17 03:29:39 +08:00
committed by GitHub
co-authored by bertyhell
parent 2b69d64055
commit e6daffae76
124 changed files with 1509 additions and 77 deletions
+1
View File
@@ -962,6 +962,7 @@
"Connect to {host} over unencrypted HTTP (from the machine the project is on)": "Connect to {host} over unencrypted HTTP (from the machine the project is on)",
"Connect to local socket {path} — equivalent to running arbitrary code on the project machine": "Connect to local socket {path} — equivalent to running arbitrary code on the project machine",
"Send requests to the {server} language server, which reads and changes the project's files": "Send requests to the {server} language server, which reads and changes the project's files",
"Read the project's resolved Maven and Gradle dependencies": "Read the project's resolved Maven and Gradle dependencies",
"Output: {channel}": "Output: {channel}",
"You can close this tab.": "You can close this tab.",
"Run any IDE action or other plugins' commands as if you chose them, including running programs, committing and pushing": "Run any IDE action or other plugins' commands as if you chose them, including running programs, committing and pushing",
+1
View File
@@ -7344,6 +7344,7 @@
"Connect to {host} over unencrypted HTTP (from the machine the project is on)": "通过未加密的 HTTP 连接到 {host}(从项目所在的计算机)",
"Connect to local socket {path} — equivalent to running arbitrary code on the project machine": "连接到本地套接字 {path} — 等同于在项目所在的计算机上运行任意代码",
"Send requests to the {server} language server, which reads and changes the project's files": "向 {server} 语言服务器发送请求,该服务器会读取和修改项目文件",
"Read the project's resolved Maven and Gradle dependencies": "读取项目已解析的 Maven 和 Gradle 依赖",
"Output: {channel}": "输出:{channel}",
"You can close this tab.": "你可以关闭此标签页。",
"Run any IDE action or other plugins' commands as if you chose them, including running programs, committing and pushing": "如同您亲自选择一样运行任意 IDE 操作或其他插件的命令,包括运行程序、提交和推送",