fix: generate Specta bindings via build script#235
Conversation
📋 PR Overview
🔬 Coverage
|
There was a problem hiding this comment.
Pull request overview
This PR fixes the Tauri dev startup regeneration check so it looks for the current Specta-generated TypeScript files under src/ipc, avoiding unnecessary regeneration on every dev launch.
Changes:
- Updates the SQLite generated file check from
src/types/sqlite.tstosrc/ipc/sqlite.ts. - Updates the shared generated types check from
src/types/shared.tstosrc/ipc/types.ts. - Aligns diagnostic “missing file” messages with the corrected paths.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Cas Linden (CasLinden)
left a comment
There was a problem hiding this comment.
The hashed files now just contain re-exports, so re-enabling the optimisation would break generation when needed.
There's also agents manually editing the output files. Breakage, merge conflicts and other issues would be less likely if we just regenerate.
I see two options:
- hashing all files
- doing away with the optimisation
I'd say 1 just expands the maintenance required, requiring more frequent additions to this script in the future. Is it worth the ~1-2s every run?
|
I suppose technically you could hash all files present in the designated |
Sorry, I don't understand this point. The script is just for dev builds to not waste multiple seconds on every startup. I'm not seeing the issue, but maybe if you clarify I can think of a way to fix it, because technically there always should be a way to make this work in any sane build system. |
Look at the contents of |
this is just a typo
|
Unqueued this. |
|
I have an explanation ready, let me just prove it / check I am not just wrong. |
|
Scott McMaster (@scottmcmaster) This commit changed So since then (weeks before the change this PR points to), changing types in nested files in the Here's two scenarios I ran on the branch with screenshots: Scenario 1: New type is added, requires addition in
|
|
Scott McMaster (@scottmcmaster) please cherry pick: fdff307 Or close this and merge this |
e519da8 to
5e7ec0a
Compare
91dbb4b to
638151e
Compare


Summary
Somebody moved the location of the specta-generated .ts files and changed the name of one and didn't update the regeneration hashing script, as evidenced by the increased dev build startup time and the diagnostic messages that appear.
Test Plan
Run the dev build, watch the logs.
Docs