8000 feat: let .reylo.yaml turn the sqlcommenter comment off by colinhacks · Pull Request #60 · colinhacks/reylo · GitHub
[go: up one dir, main page]

Skip to content

feat: let .reylo.yaml turn the sqlcommenter comment off - #60

Merged
colinhacks merged 4 commits into
mainfrom
sqlcommenter-key
Oct 23, 2026
Merged

colinhacks merged 4 commits into
mainfrom
sqlcommenter-key

Conversation

@colinhacks
Copy link
Copy Markdown
Owner

Every statement a build step writes ends with a comment naming its .sql file, in sqlcommenter's format. This adds sqlcommenter to the project file to switch it. It is on when absent, and sqlcommenter: false leaves the comment off:

# .reylo.yaml
sqlcommenter: false
  • The key: sqlcommenter in the engine's project-file parser (engine/core/src/config.rs), which refuses unknown keys, so all three engine artifacts are rebuilt in one engine/build.sh run. src/project.ts resolves it to true unless the file says false.
  • The build step and the type check follow it. With the key off, the module's sql, the declaration's sql literal and the hover's note all leave the comment out (sqlNote in src/doc-comment.ts).
  • A running watch process sees a change to it: Session.for keys its sessions on the setting, so the next build after the project file changes uses a new session.
  • Docs: the key in Configuration's example, a sqlcommenter subsection, and a link from Usage's .sql.

Test plan

  • cargo test -p reylo-engine-core config; engine/build.sh (all three artifacts)
  • nub run typecheck; nub run test against throwaway Postgres 18 and MySQL 8.4, with the labs linked: 221 pass, 0 skipped
  • New test: with sqlcommenter: false, the built module's sql, a run on SQLite, the declaration's sql literal and its note; then, in the same process, the project file turned back on gives the comment
  • tests/project.test.ts: on by default, off with sqlcommenter: false
  • site: nub run capture (no change: the docs keep the default) and nub run build; the subsection checked at desktop and phone widths

Copilot AI balanced review requested due to automatic review settings October 23, 2026 04:46
@vercel
vercel Bot commented Oct 23, 2026 •
Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reylo Ready Ready Preview Oct 23, 2026 8:10pm UTC

Request Review

Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pullfrog pullfrog Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues. Two rough edges are worth a look.

Reviewed changes

This review covers the new sqlcommenter key in .reylo.yaml, from the engine's parser through the build step, the type check and the docs.

  • Project file key: sqlcommenter: Option<bool> in engine/core/src/config.rs, resolved to true unless the file says false (src/project.ts). All three artifacts are rebuilt.
  • Build step and type check: src/loader.ts, src/mapper.ts and site/scripts/capture-types.ts skip withSqlcommenter when the key is off. The hover's note comes from the new sqlNote(commented).
  • Invalidation: the flag is added to the Session.for key and the mapper's configIdentity, so a running process builds new imports with the new setting.
  • Docs and tests: a new ### sqlcommenter section in Configuration and a link from Usage. The new tests cover the default and the off case, plus switching it back on in the same process.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread src/loader.ts Resolved
Comment thread src/doc-comment.ts Resolved
@colinhacks
colinhacks force-pushed the sqlcommenter-key branch 2 times, most recently from 63ddb65 to c3acea0 Compare October 23, 2026 19:01
@pullfrog pullfrog Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found. Both points from the last review are fixed.

Reviewed changes

Since the last Pullfrog review, the build step now tells the bundlers which project files a module's text depends on. The engine artifacts were also rebuilt over main.

  • Bundler invalidation: sqlModule now returns watched, which is the project's watched files that exist on disk: the project file and the .env files. The Vite, webpack and esbuild adapters register these beside the .reylo/ entry, so changing sqlcommenter rebuilds modules that were already built. tests/analyze.test.ts checks what watched holds.
  • Tooling type: sqlModule's return type and doc comment in src/engine-package.ts now include watched. src/register-worker.ts reads only code, so it is unaffected.
  • Dead export: removed SQL_NOTE. The src/index.ts comment now names sqlNote.
  • Artifacts: rebuilt all three engine.wasm over a8537a6.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@colinhacks
colinhacks merged commit 3faae54 into main Oct 23, 2026
6 checks passed
@colinhacks
colinhacks deleted the sqlcommenter-key branch October 23, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0