cooklang / cooklang/cookcli

Error searching for ingredients

Open
#498 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.4k
Forks
109
Avg merge
1d 22h
Merged PRs (30d)
19

Description

Searching for certain phrases or ingredients (that is used in at least one recipe), such as `cook search tuna`, returns:

`Error: Failed to read '/data/recipes'`

`Caused by:`
` stream did not contain valid UTF-8`

The path to the recipes directory is correct and other searches work. Running `cook doctor` in the same directory identifies tuna as an ingredient that is used in a recipe but not in `aisle.conf`.

A search for an ingredient that is not used in at least one recipe returns nothing.

cookcli 0.35.0

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `cook search tuna` in the reported recipe directory, then compare it with a search for an unused ingredient and the output of `cook doctor`. Trace the ingredient-search path and its recipe-directory reading until the invalid UTF-8 error is explained. Done means valid ingredient searches no longer fail and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.