Skip to content

Add internal query linter#708

Open
simonmar wants to merge 1 commit intofacebookincubator:mainfrom
simonmar:query-lint
Open

Add internal query linter#708
simonmar wants to merge 1 commit intofacebookincubator:mainfrom
simonmar:query-lint

Conversation

@simonmar
Copy link
Copy Markdown
Collaborator

(mostly written by Claude Opus 4.6)

When working on the compiler it's easy to accidentally break something that results in a segfault. Most of these errors can be detected by checks on the Codegen IR, in particular correct type-safety and variable-scoping.

  • Add Glean.Query.Lint to implement query consistency checks
  • Turn on query linting with GLEAN_DEBUG=lint or --debug-query-lint
  • Linting is automatically enabled for all tests via withTestEnv

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for fb-oss-glean canceled.

Name Link
🔨 Latest commit 2e0f777
🔍 Latest deploy log https://app.netlify.com/projects/fb-oss-glean/deploys/69c56d2ea694860008128c95

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 25, 2026
Copy link
Copy Markdown

@josefs josefs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive by review

@simonmar simonmar force-pushed the query-lint branch 2 times, most recently from 26d4cbe to 8df1387 Compare March 25, 2026 16:40
When working on the compiler it's easy to accidentally break something
that results in a segfault. Most of these errors can be detected by
checks on the Codegen IR, in particular correct type-safety and
variable-scoping.

- Add Glean.Query.Lint to implement query consistency checks
- Turn on query linting with `GLEAN_DEBUG=lint` or `--debug-query-lint`
- Linting is automatically enabled for all tests via `withTestEnv`
@simonmar simonmar marked this pull request as ready for review March 26, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants