Skip to content

Fix Dune native package management - #55

Merged
MrSubidubi merged 1 commit into
zed-extensions:mainfrom
4ad:fix/dune-package-management-capability
Aug 14, 2026
Merged

Fix Dune native package management#55
MrSubidubi merged 1 commit into
zed-extensions:mainfrom
4ad:fix/dune-package-management-capability

Conversation

@4ad

@4ad 4ad commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Problem

The Dune package-management probe is currently rejected by Zed's extension capability checks before dune is executed.

Zed only treats * as the command wildcard; ** is matched as a literal command name. Process arguments are also matched positionally and exactly unless a wildcard is present, but the manifest still authorizes only pkg enabled while the extension now runs pkg enabled --root <worktree>.

The resulting process error is converted to false by is_ok_and, so the extension silently falls through to opam exec -- ocamllsp.

Validation

  • reproduced the fallback to opam with extension 0.4.0 in a Dune package-management project
  • verified dune pkg enabled --root <worktree> exits successfully
  • built the extension with cargo check and for wasm32-wasip2 in release mode
  • installed the patched extension locally and confirmed Zed starts dune tools exec ocamllsp

Closes #54.

Follow-up to #37 and #38.

Use the supported command wildcard and authorize the --root arguments added for Dune package management detection. Without these grants, Zed rejects the probe and the extension silently falls back to opam.
@cla-bot

cla-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @4ad 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'.

@4ad

4ad commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Aug 1, 2026
@cla-bot

cla-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@4ad

4ad commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Hello? It's been over a week?

@MrSubidubi MrSubidubi left a comment

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.

Thanks for this!

About the

Hello? It's been over a week?

Image

Jokes aside - we continouosly try to improve in this area, but due to the sheer volume and us iterating on different approaches are currently unable to stay on top of it. That is not an excuse for it being disappointing in cases, but at the same time does not seem like a problem with any perfect and easy solution. Still, I do think we will find ways for it to get better, yet that will not be of help of people currently stuck in the queue sadly 😅

@MrSubidubi
MrSubidubi merged commit c726777 into zed-extensions:main Aug 14, 2026
7 checks passed
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.

OCaml extension still doesn't support Dune Package Management

3 participants