Skip to content

Remove python launch script dependency - #97

Merged
playdohface merged 5 commits into
zed-extensions:mainfrom
playdohface:remove-python
Oct 18, 2025
Merged

playdohface merged 5 commits into
zed-extensions:mainfrom
playdohface:remove-python

Conversation

@playdohface

Copy link
Copy Markdown
Collaborator
  • For the JDTLS that the extension downloads and manages, we now also include the launch script in the extension instead of using the one provided by jdtls (which needs python).
  • For users with jdtls(.bat) on their $PATH, it's still used as before.

Apart from making it easy to use the extension for people who can't or don't want to have python, this also allows us to manage the cache in the future (clearing caches is sadly a common interaction with java language servers)

@cla-bot cla-bot Bot added the cla-signed label Oct 12, 2025
Comment thread extension.toml Resolved
Comment thread src/java.rs Resolved
Comment thread src/java.rs Resolved
@playdohface
playdohface marked this pull request as ready for review October 15, 2025 19:30
@playdohface
playdohface merged commit 7202df4 into zed-extensions:main Oct 18, 2025
1 check passed
@MrSubidubi

Copy link
Copy Markdown
Contributor

Sorry for the late reply, was basically OOO this week, aside from some minor style stuff, looks good, thanks for your efforts! I very much lack context on the semantic side of things, so trust you with that,

Aside from that, if you want some other channel to reach out for questions (e.g. Discord), I'd be more than happy to be available for you there.

Comment thread src/java.rs
let output = String::from_utf8(output_bytes).map_err(|e| e.to_string())?;

let major_version_regex =
Regex::new(r#"version\s"(?P<major>\d+)(\.\d+\.\d+(_\d+)?)?"#).map_err(|e| e.to_string())?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we could do here is uplift this into a OnceLock that is static so we only initialize this once and reuse it after for all future invocations. We have some examples for this in Zed itself. This should be available in the WASM context, admittedly though, I have never checked that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants