Skip to content

chore(mise): generate schema clients before typechecking - #82

Merged
roziscoding merged 1 commit into
mainfrom
chore/typecheck-generates-clients
Aug 1, 2026
Merged

chore(mise): generate schema clients before typechecking#82
roziscoding merged 1 commit into
mainfrom
chore/typecheck-generates-clients

Conversation

@roziscoding

@roziscoding roziscoding commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Makes mise run typecheck generate the schema clients it depends on.

packages/schemas/src/generated/ is gitignored, so on a fresh checkout typecheck runs against clients that don't exist yet and fails with ~13 errors:

apps/backend/src/lib/servers/arr/radarr.ts(1,55): error TS2307: Cannot find module '@jack/schemas/radarr/types'
apps/backend/src/lib/servers/arr/radarr.ts(67,38): error TS7006: Parameter 'l' implicitly has an 'any' type
packages/schemas/src/index.ts(1,30): error TS2307: Cannot find module './generated/radarr/types.gen'
...

Nothing is wrong — mise run clients just hasn't run. But the errors point at real source files and read like a regression in whatever you last touched, which is a bad first five minutes on a new machine. (It cost me exactly that this week.)

The dependency goes on typecheck:backend and typecheck:workspace rather than the typecheck aggregate, because those are the two tasks that actually consume the generated types — so running either directly is fixed too, not just the umbrella task. typecheck:ui doesn't touch them and is left alone.

It depends on clients:generate rather than clients, which skips the rm -rf that clients does first. Generating over existing output is idempotent, so repeating it on every typecheck costs ~350 ms per schema against checked-in *.openapi.json files, with no network and no wiping of files that were already fine.

Related issue

Checklist

  • Commits follow Conventional Commits
  • Commits are signed (GitHub enforces this — unsigned commits are rejected)
  • mise run lint:fix was run and its output is committed (no changes)
  • mise run test passes — unaffected by this change; bun test never needed the generated clients. mise run test:e2e not run: no Docker in the dev environment.
  • Docs updated if behavior or configuration changed — n/a, task wiring only

Verification

Wiped packages/schemas/src/generated/ and confirmed every entry point recovers on its own:

  • cold mise run typecheck — exit 0, and clients:generate ran once for both dependent tasks (mise dedupes the shared dependency)
  • warm mise run typecheck immediately after — exit 0, so regenerating over existing output is safe
  • mise run typecheck:backend on its own — exit 0

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Makes backend and workspace typechecking depend on schema-client generation so generated, gitignored types are available on fresh checkouts.

  • Adds clients:generate as a dependency of typecheck:backend.
  • Adds the same dependency to typecheck:workspace.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (3): Last reviewed commit: "chore(mise): generate schema clients bef..." | Re-trigger Greptile

@roziscoding
roziscoding force-pushed the chore/typecheck-generates-clients branch from 8923499 to 4747008 Compare July 31, 2026 23:27
packages/schemas/src/generated is gitignored, so a fresh checkout typechecks
against clients that don't exist yet: ~13 errors like "Cannot find module
'@jack/schemas/radarr/types'" plus the implicit-anys they cascade into, all of
which read like a regression in whatever you last touched.

The dependency goes on typecheck:backend and typecheck:workspace — the two tasks
that actually consume the generated types — so running either one directly is
fixed too, not just the `mise run typecheck` aggregate. It depends on
`clients:generate` rather than `clients` so it skips the clean: generating over
existing output is idempotent, which keeps it cheap to repeat on every run. mise
dedupes the shared dependency, so a full typecheck generates once.
@roziscoding
roziscoding force-pushed the chore/typecheck-generates-clients branch from 4747008 to 32145c2 Compare August 1, 2026 00:18
@roziscoding
roziscoding enabled auto-merge (squash) August 1, 2026 00:18
@roziscoding
roziscoding merged commit db9393d into main Aug 1, 2026
10 checks passed
@roziscoding
roziscoding deleted the chore/typecheck-generates-clients branch August 1, 2026 00:20
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.

1 participant