LSP reports `Unknown timer unit` for valid scalar timer units
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 1.4k
- Forks
- 120
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 128
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cooklang/cookcli
-
Editor save status and save errors are in English whatever the site's languagePosiblemente ocupada @LeMyst la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Shopping list counts a recipe twice when three or more menus reference each other in a ringPosiblemente ocupada @LeMyst la tomó hace 1 día. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
feat(server): tag pages, so a recipe can belong to several collectionsPosiblemente ocupada @LeMyst la tomó hace 2 días. Abiertoarea: server feature request
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
wontfix
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
cooklang/cookcli#784 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
cooklang/cookcli#763 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de cooklang/cookcli
Issues similares
-
area: library data-loss type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
alplabai/signex#1740 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
test(fslc): the unreadable mutate catalog test pins the Unix I/O error text and fails on WindowsPosiblemente ocupada @rizumita la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día
-
ServerProperties defaults white-list to true, so a fresh --dedicated server silently locks itselfAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
horizon-rust/horizon#3888 ·
Los mantenedores suelen responder en 1 día
-
refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día