8000 bug: a :find variable that is never bound returns "No results found" instead of an error · Issue #406 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

bug: a :find variable that is never bound returns "No results found" instead of an error #406

Closed

Description

@adityamukho

Summary

If a :find variable does not appear anywhere in :where, the query quietly returns no results. A typo in :find therefore looks the same as "no matching data". Datomic and XTDB reject such a query ("Query is referencing unbound variables").

Repro (REPL, v2.0.1 / main at 69da4b2)

(transact [[:x :y 1]])
(query [:find ?n :where [?e :y ?v]])
;; => No results found.

Expected: a parse-time error naming ?n, in the same style as the existing checks for unbound variables in not (INT-018) and in expression clauses.

Notes

  • Rules and :in/$slot variables need care, so that variables bound by rule calls or bind slots are still accepted.
  • This changes behavior: a query that used to return empty will now fail. So it may belong in v3.0.0 and not in a v2.x patch. Please set the milestone.

Found while checking the wiki examples; see #383.

Activity

  1. added
    bug
    stability
    on Sep 26, 2026
  2. modified the milestones: v2.0.2, v3.0.0 on Sep 26, 2026
  3. adityamukho commented on Sep 26, 2026

    @adityamukho
    CollaboratorAuthor

    Moved to v3.0.0: rejecting unbound :find variables makes queries that currently return an empty result fail instead. That is a breaking behavior change, so it can't ship in the v2.0.2 patch.


    Generated by Claude Code

  4. added a commit that references this issue on Oct 8, 2026
  5. adityamukho commented on Oct 8, 2026

    @adityamukho
    CollaboratorAuthor

    Fixed on v3 by #483 (ships in v3.0.0).

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

    bugstability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0