Fix Dune native package management - #55
Conversation
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.
|
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'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Hello? It's been over a week? |
MrSubidubi
left a comment
There was a problem hiding this comment.
Thanks for this!
About the
Hello? It's been over a week?
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 😅
Summary
*wildcard for the Dune probe executable--root <worktree>arguments added by Use correct project root for Dune package management detection #38Problem
The Dune package-management probe is currently rejected by Zed's extension capability checks before
duneis 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 onlypkg enabledwhile the extension now runspkg enabled --root <worktree>.The resulting process error is converted to
falsebyis_ok_and, so the extension silently falls through toopam exec -- ocamllsp.Validation
opamwith extension 0.4.0 in a Dune package-management projectdune pkg enabled --root <worktree>exits successfullycargo checkand forwasm32-wasip2in release modedune tools exec ocamllspCloses #54.
Follow-up to #37 and #38.