Repository navigation
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: zhou.cong 周 聰-SaaS.
|
a1b3d9d to
b902a69
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @fwrq41251 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: zhou.cong 周 聰-SaaS.
|
064ecfe to
b94b801
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @fwrq41251 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
b94b801 to
1d219a5
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @fwrq41251 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
1d219a5 to
c10b9a7
Compare
Java main-method gutter actions currently expose Run without a Debug counterpart. Add a shared Java task locator with configuration mappings for the
Java(JDTLS) andMetalsdebug adapters, so either setup can debug a main method without.zed/debug.json.Refs #329. This covers main methods; test locators remain separate.
Changes
[debug_locators.java]and identify the built-injava-maintask withZED_JAVA_RUNNABLE=main. Runnable recognition is independent of the selected adapter.Java, generate a launch scenario containingmainFile: "$ZED_FILE". At launch, resolve the file throughvscode.java.resolveMainMethod, retain its project identity, and callvscode.java.buildWorkspacebefore the existing classpath resolution and session startup. Only build success code1permits launch.vscode.java.buildWorkspaceup to five minutes through the native LSP proxy while retaining the five-second timeout for other requests. Timeout errors report the actual duration, and timed-out requests are still cancelled.Metals, generate the existing file-discovery launch configuration usingpath: "$ZED_FILE"andrunType: "runOrTestFile"; its adapter handles discovery and session preparation.mainFileto the Java configuration schema. Existing manual configurations withoutmainFileretain their launch behavior.JDTLS file resolution fails explicitly when no matching main method exists or the file contains multiple matching main classes. A manual configuration can combine
mainFile,mainClass, andprojectNameto disambiguate. The resolved project prevents same-named classes in different modules from being selected by a workspace-wide class-name lookup.Validation
cargo test -p zed_java: 102 tests passed, including nine locator tests and nine tests for file-based launch preparation. Coverage includes adapter selection, task filtering, environment forwarding, file URI encoding, project identity, ambiguous/missing entries, build status codes, and LSP failures.cargo test -p java-lsp-proxy: 58 tests passed. New coverage exercises the real HTTP handler with a build completing after six seconds, verifies ordinary requests still time out and send cancellation after five seconds, and checks that only the matching execute-command request gets the longer timeout.cargo clippy -p zed_java --all-targets -- -D warningscargo clippy -p java-lsp-proxy --all-targets -- -D warningscargo fmt --all --check,git diff --check, and JSON schema syntax validation.wasm32-wasip1andwasm32-wasip2..zed/debug.json, using a two-module Maven fixture withexample.Mainin both modules and an additional main class in the first module:2; fixing it allowed debugging again.Metals verification used the existing Java-enabled Scala extension 0.2.5 installation and local Metals snapshot/proxy setup. This PR does not add Java registration to metals-zed or change its proxy. Gradle and other Metals/build-server combinations were not exercised interactively.