Skip to content

YAML arrays are rejected for cache-globals but accepted for cache-vars #14735

Closed

Description

@colinorourke

What would you like to do?

Report an issue on quarto.org

Description

For knitr documents, Quarto accepts YAML array for cache-vars:

cache-vars:
  - var_1
  - var_2

However, the corresponding YAML array syntax is not accepted for cache-globals:

cache-globals:
  - var_1
  - var_2

Both options represent lists of object names, so their YAML handling should be consistent.

Environment
OS: Windows
Quarto version: 1.9.38
Engine: knitr

Activity

  1. added
    documentation
    on Jul 27, 2026
  2. mcanouil commented on Jul 27, 2026

    @mcanouil
    Collaborator

    @colinorourke Are you reporting a bug or a documentation issue?
    You used the documentation issue template but are not linking to any part of the documentation and your wording suggest a bug.

    As far as I know, cache-globals needs autodep: true.

    If you are reporting a bug, please edit your report following the bug issue template: https://github.com/quarto-dev/quarto-cli/blob/main/.github/ISSUE_TEMPLATE/bug_report.yml

  3. added
    needs-repro
    on Jul 27, 2026
  4. colinorourke commented on Jul 27, 2026

    @colinorourke
    Author

    I didn't label it as a documentation issue (not sure how that label got applied): it's a bug report. I don't think I'm able to assign or edit labels. When I have some free time I'll write a reprex.

  5. mcanouil commented on Jul 27, 2026

    @mcanouil
    Collaborator

    You used/chose the "documentation issue" template from the issue menu/picker.

  6. cderv commented on Jul 28, 2026

    @cderv
    Member

    Thanks for the report — confirmed, and it's on our side rather than knitr.

    cache-globals is declared as a plain string in our schema, while cache-vars uses maybeArrayOf: string — hence the array being rejected. The same declaration also rejects cache-globals: false, even though the option's own description documents it.

    knitr accepts both forms (a character vector, or FALSE), so the fix is just to widen the schema. PR incoming.

  7. added
    yaml-validation
    and removed
    documentation
    needs-repro
    on Jul 28, 2026
  8. added this to the v1.11 milestone on Jul 28, 2026
  9. added
    bug
    on Jul 28, 2026
  10. cderv commented on Jul 28, 2026

    @cderv
    Member

    V1.11.1 prerelease is available with a fix. Thank you !

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

    bugyaml-validation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions