LSP reports `Unknown timer unit` for valid scalar timer units
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by tracing the cook lsp entry point and how CookCLI invokes or pins cooklang-language-server; compare its timer-unit validation with the recipe parser that accepts the example. The report mentions related language-server issue #12, which may identify the relevant code path. Done when valid scalar timer units no longer produce an LSP diagnostic; verify against the reproduction and CLI behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
With CookCLI 0.36.0, the language server reports Unknown timer unit for valid scalar timers such as:
Boil for ~{25%minutes}.
The same recipe is accepted by cook recipe -f json, and cook doctor validate passes. In a collection of recipes, the LSP reported this for scalar minutes and seconds units, as well as the tested singular and abbreviated variants. This appears to be an LSP diagnostic mismatch rather than an invalid timer value.
Expected behavior
Timer units accepted by CookCLI's recipe parser should not be reported as unknown by the LSP.
Actual behavior
The LSP emits Unknown timer unit on the timer even though the CLI parses it.
Reproduction
- Create a
.cookfile containing the example above. - Open it in an editor configured to run
cook lsp. - Observe the
Unknown timer unitdiagnostic. - Run
cook recipe -f json <file.cook>; the timer is parsed without that error.
Related: #214 covers cook doctor not reporting non-numeric timer values. That is a different case: this report uses a numeric value and concerns the LSP rejecting a unit.
I’d be interested in contributing a fix and would welcome guidance on the relevant code path.
Update: I retested with CookCLI 0.37.0 and still see the diagnostic. Neovim’s :LspInfo reports language-server version 0.2.4. The CookCLI v0.37.0 manifest pins cooklang-language-server 0.2.4, while the current CookCLI main manifest pins 0.3.0. I filed this against CookCLI because it’s the released cook lsp behavior I encountered. I also found the related cooklang-language-server issue #12. I’m happy to follow up in that repo if maintainers prefer.
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 120
- Merge medio
- 1g 22h
- PR unite (30g)
- 128
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cooklang/cookcli
-
Editor save status and save errors are in English whatever the site's languageForse già presa @LeMyst l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Shopping list counts a recipe twice when three or more menus reference each other in a ringForse già presa @LeMyst l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
feat(server): tag pages, so a recipe can belong to several collectionsForse già presa @LeMyst l’ha presa 1 giorno fa. Apertaarea: server feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
wontfix
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
cooklang/cookcli#784 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cooklang/cookcli#763 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cooklang/cookcli
Issue simili
-
bug dependencies kind:fix priority: P3 ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
shep-pm/shep#1318 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swc-project/swc-next#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Alive24/shea-symphony#574 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno