fix(release): extract postgresql-win before repairing its layout - #204
jasdeepkhalsa wants to merge 1 commit into
Conversation
The previous attempt put the fix straight after `spc download` and it never ran, because `download` only fetches archives — extraction into source/ happens during `build`. So the check found nothing and failed the job: ::error::libpq.lib not found under source\postgresql-win\pgsql\lib which was the guard doing its job, on a directory that did not exist yet. `spc extract postgresql-win` runs first, giving somewhere to apply the fix. The later `build` does not undo it: SourceManager skips extraction when the source directory exists and its .spc-hash matches the archive hash, and that hash is over the downloaded archive, so adding a directory does not invalidate it. The rest is unchanged — junctions rather than copies, so the workaround costs nothing and disappears if SPC fixes the stripped path, and the build still fails loudly with a directory listing if libpq.lib is missing. Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Folded into #206 rather than merged separately. Splitting these was a mistake, and the reason is concrete: #206's Windows job carries this libpq workaround inline so it can build at all, while the release workflows only got it from here. Neither pull request was complete on its own — merging them in the wrong order would have left the release workflows broken while CI looked green. #206 now contains both, so the job that builds a Windows binary on every pull request is exercising the same fix the release uses. The branch has been merged into |



Follow-up to #203, which fixed the right thing in the wrong place.
What happened
#203 applied the layout repair straight after
spc download— butdownloadonly fetches archives. Extraction intosource/happens duringbuild. So the repair never ran, and the guard fired on a directory that did not exist yet:That is the guard working correctly. It failed the build rather than letting a driverless binary through, which is what #197's smoke test would otherwise have caught one step later.
The fix
Run
spc extract postgresql-winfirst, so there is something to repair.The later
builddoes not undo it.SourceManager::initSourceskips extraction when the source directory exists and its.spc-hashmatches — and that hash is over the downloaded archive, so adding a directory alongside does not invalidate it:Everything else is unchanged: junctions rather than copies, so the workaround costs nothing and becomes a no-op if SPC fixes the stripped path, and the build still fails loudly with a directory listing if
libpq.libis missing.Status of the dry run
3.0.0-rc.10currently builds 8 of 9 targets cleanly — PHAR, both macOS, all four Linux variants, and the npm dry-run publish.win32-x64is the only one outstanding.🤖 Generated with Claude Code