Skip to content

aisle.conf: '#' comments become ingredients #687

Closed

Description

@LeMyst

Reported by Odilon on Discord: "in the aisle.conf file, TOML comments are treated as ingredients in the UI".

aisle.conf is not TOML. The only comment it knows is // (cooklang::aisle::parse cuts each line at //, and src/server/aisle_file.rs follows the same rule), so a # or -- line is read as an ingredient. Nothing tells people this: the README's aisle.conf example has no comments, the spec shows aisle.conf in ```toml blocks and never mentions comments, pantry.conf in the same folder really is TOML, and .shopping-list comments are --. Writing # is the natural guess.

Not a regression: the parser has always worked this way, and the /aisles page (#631) just makes it visible.

Steps to reproduce

config/aisle.conf:

# My aisles
[produce]
# fruit first
apples
tomatoes | tomato  # cherry ones are fine
-- dash comment
// slash comment
garlic // inline slash

With a recipe using @tomato{2}, @garlic{1%clove}, @apples{1}, on main 7341a28:

  • /aisles and GET /api/aisles list # fruit first and -- dash comment as ingredients of produce.
  • The inline # comment becomes part of a name: the second name is tomato # cherry ones are fine, so the synonym tomato stops working and a recipe asking for @tomato is no longer filed under produce.
  • # My aisles above the first aisle gives the warning Ingredient found before any category (CLI, cook doctor aisle and the /aisles page), which doesn't explain what's wrong.
  • cook doctor aisle says nothing else.
  • Only the // lines are ignored.

Expected

Either comments written the way people expect are ignored, or the file says clearly what a comment is and points at lines that look like one.

Possible fixes

  1. Document //: add a comment to the README example and to the /aisles page help, and ask the spec to say what an aisle.conf comment is (and stop labelling the examples toml). Cheapest, but # lines will keep turning up.
  2. Warn: have cook doctor aisle and the /aisles page flag a name starting with # or -- ("looks like a comment; aisle.conf comments start with //"). Nothing changes for existing files.
  3. Accept # as a comment in cooklang::aisle (cooklang-rs) and aisle_file.rs. An ingredient name starting with # is very unlikely, but this changes the format, so it needs a spec update.

I'd do 1 and 2 here, and raise 3 with the spec / cooklang-rs.

Activity

  1. added
    bug
    documentation
    area: shopping-list
    on Oct 11, 2026
  2. added a commit that references this issue on Oct 11, 2026
    1c495d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: shopping-listbugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions