Skip to content

ci(pycvc-gl-wasm): pack only pycvc-gl, not the whole dep-closure prefix - #609

Merged
transfix merged 2 commits into
masterfrom
ci/pycvc-gl-wasm-pack-isolated
Oct 11, 2026
Merged

transfix merged 2 commits into
masterfrom
ci/pycvc-gl-wasm-pack-isolated

Conversation

@transfix

@transfix transfix commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

What

After #605 fixed the publish credentials, the master dispatch (run 38113351128) went green but published 0/1 again:

=== publish dist/pycvc-gl-cp312-3.5.1+cvc.1-wasm-wasm32-release-static.tar.gz ===
cvcpkg: publishing cvc/assimp==6.0.5+cvc.6 (wasm/wasm32/release/static) [230.9 MB] -> https://cvcpkg.org
  skipped (already published): assimp==6.0.5+cvc.6 (wasm/wasm32/release/static) already published.

cvcpkg publish read the pycvc-gl archive as assimp. It was skipped only because that assimp build already exists. Otherwise the pycvc-gl bundle would have been uploaded under assimp's name.

Why

The job built pycvc-gl into $WASM_DEPS, which already holds the whole wasm dependency closure, and then ran cvcpkg pack --from-prefix "$WASM_DEPS". That archived every dep's files, each with its share/libcvc-deps/<dep>/manifest.yaml (242 MB in total). cvcpkg publish identifies an archive by the first manifest.yaml in the tar, and in sorted order that's assimp's. publish-cvcgl-wasm avoids this by building into a clean $INST.

Fix

  • Pack only what the build installed. cvcpkg build already installs into an isolated <tmp>/cvcpkg-pycvc-gl-cp312-*/install, merges that into $WASM_DEPS, and keeps it (build_recipe deletes only build/). The step now gives the build a dedicated TMPDIR, requires exactly one such install dir, and packs it with pack --from-prefix. $WASM_DEPS is unchanged, so the Verify and host-upload steps still find everything there.
    • Why not plain cvcpkg pack: it isolates the files too, but in cvcpkg 2.4.0 pack_recipe tags a wasm bundle with the host arch. The first dry run produced ...-wasm-x86_64-release-static. pack_from_prefix derives wasm32 from the platform.
  • Verify checks the bundle:
    • there is exactly one pycvc-gl-cp312 archive, named -wasm-wasm32-release-static;
    • its only cvcpkg manifest is share/libcvc-deps/pycvc-gl-cp312/manifest.yaml;
    • it contains _pycvc_gl.a;
    • a missing pycvc_host.wasm gives a warning, not an error, because build-wasm.sh treats the host link as non-fatal.
  • Publish step no longer packs. It publishes the bundle that was already packed and verified.

Verification

  • The YAML parses.
  • I ran the bundle check locally on synthetic archives. One shaped like the bad bundle (assimp/boost/vtk manifests plus pycvc-gl's) fails with bundle must carry only pycvc-gl-cp312's manifest. A pycvc-gl-only bundle passes.
  • Dry run of the first commit (run 38117927475): green. The bundle is 77 MB instead of 242 MB, with manifests: share/libcvc-deps/pycvc-gl-cp312/manifest.yaml and the PYCVC_VTK_BRIDGE_OK / PYCVC_WASM_OK smoke passing. It was tagged x86_64, though, which the second commit fixes.
  • I simulated the second commit locally: a wasm32 bundle passes; an x86_64-tagged bundle and a multi-manifest bundle both fail. With cvcpkg stubbed, the build step finds exactly the pycvc-gl install dir.
  • Dry run of the second commit (run 38122447700): green. It packed pycvc-gl-cp312-3.5.1+cvc.1-wasm-wasm32-release-static.tar.gz (77,460,022 bytes) with manifests: share/libcvc-deps/pycvc-gl-cp312/manifest.yaml. _pycvc_gl.a and pycvc_host.wasm are both present (no warning), and the smoke printed PYCVC_VTK_BRIDGE_OK / PYCVC_WASM_OK. The publish step was skipped because this was a dry run.

With the publish credentials fixed (#605), the master dispatch (run
38113351128) published 0/1: `cvcpkg publish` read the pycvc-gl-cp312 archive
as cvc/assimp==6.0.5+cvc.6 and skipped it as already published. Had that
assimp build not existed, it would have uploaded this bundle under assimp's
name.

The cause is the pack. The job builds pycvc-gl into $WASM_DEPS, which already
holds the whole wasm dep closure, then ran `pack --from-prefix "$WASM_DEPS"`.
That archived every dep's files along with its share/libcvc-deps/<dep>/manifest.yaml
(242 MB), and `cvcpkg publish` takes the first manifest.yaml in the tar: assimp.

`cvcpkg pack` without --from-prefix runs the same build_recipe as
`cvcpkg build` (same --prefix, --host-platform, CVC_EMSDK_DIR from the env),
but archives only the recipe's isolated install dir before merging it into
$WASM_DEPS. So it replaces the build step, and Verify / the host upload still
find everything in $WASM_DEPS. publish-cvcgl-wasm gets the same isolation by
building into a clean $INST.

Verify now also checks the bundle: exactly one pycvc-gl-cp312 archive, whose
only cvcpkg manifest is pycvc-gl-cp312's, with _pycvc_gl.a; and it warns if
pycvc_host.wasm is missing, since build-wasm.sh treats the host link as
non-fatal.
…p arch wasm32

The dry run of the previous commit (run 38117927475) produced a clean 77 MB
bundle carrying only pycvc-gl-cp312's manifest, but named it
...-wasm-x86_64-release-static: cvcpkg 2.4.0's pack_recipe (plain `cvcpkg
pack`, which has no --arch) tags the bundle with the HOST arch, whereas
pack_from_prefix derives wasm32 from the platform.

So keep `cvcpkg build` and pack what it built: build_recipe installs into an
isolated <tmp>/cvcpkg-pycvc-gl-cp312-*/install, merges that into $WASM_DEPS
and keeps it. A dedicated TMPDIR makes that dir findable (exactly one match is
required), and `pack --from-prefix` on it gives the same isolated bundle,
tagged wasm32. Verify now also requires the -wasm-wasm32-release-static name.
@transfix
transfix merged commit aa4f809 into master Oct 11, 2026
15 checks passed
@transfix
transfix deleted the ci/pycvc-gl-wasm-pack-isolated branch October 12, 2026 01:27
transfix added a commit to cy-pca/cvcpkg that referenced this pull request Oct 12, 2026
…are wasm32

Two ways a bundle's identity was lost between pack and publish, both hit
publishing libcvc's pycvc-gl-cp312 3.5.1 wasm bundle (transfix/libcvc#609):

publish took the FIRST manifest.yaml in the archive. libcvc packed pycvc-gl
with `pack --from-prefix` of a prefix that also held its dependency closure,
so the archive carried every dep's share/libcvc-deps/<dep>/manifest.yaml, and
the sorted archive's first was assimp's: the 242 MB pycvc-gl bundle went up
as cvc/assimp==6.0.5+cvc.6 (skipped only because that build existed).
_extract_manifest now reads the bundle manifest locations
(share/libcvc-deps/<name>/manifest.yaml, or the older flat one) ahead of any
stray manifest.yaml, and refuses an archive carrying several packages'
manifests, naming them; the same package's per-name and flat copies resolve
to the per-name one. pack_from_prefix refuses such a prefix up front
(_other_bundle_manifests): installing the bundle would also overwrite those
packages' records.

pack_recipe (plain `cvcpkg pack`) tagged the bundle with detect_arch(), the
HOST arch: `pack --platform wasm` on x86_64 produced ...-wasm-x86_64-....
pack_from_prefix and install already derive it from the platform
(_detect_arch_for_platform: wasm/wasm-mt -> wasm32); pack_recipe now does too,
from the build platform, so the any/noarch identity is unchanged. The same
host arch was what `pack --bump`, `next-revision` and `cascade-bump` looked
published revisions up by, and what `publish` globbed dist/ with (so
`publish <name> --platform wasm` and `publish --all --platform wasm` found
nothing); all four use _detect_arch_for_platform now. pack-all already mapped
wasm per bundle and is unchanged.

docs/wasm-packaging.md: the clean-prefix requirement is now enforced, and
publish by name works for wasm (it said to publish by path because by-name
re-derived the host arch).
transfix added a commit to cy-pca/cvcpkg that referenced this pull request Oct 13, 2026
…are wasm32

Two ways a bundle's identity was lost between pack and publish, both hit
publishing libcvc's pycvc-gl-cp312 3.5.1 wasm bundle (transfix/libcvc#609):

publish took the FIRST manifest.yaml in the archive. libcvc packed pycvc-gl
with `pack --from-prefix` of a prefix that also held its dependency closure,
so the archive carried every dep's share/libcvc-deps/<dep>/manifest.yaml, and
the sorted archive's first was assimp's: the 242 MB pycvc-gl bundle went up
as cvc/assimp==6.0.5+cvc.6 (skipped only because that build existed).
_extract_manifest now reads the bundle manifest locations
(share/libcvc-deps/<name>/manifest.yaml, or the older flat one) ahead of any
stray manifest.yaml, and refuses an archive carrying several packages'
manifests, naming them; the same package's per-name and flat copies resolve
to the per-name one. pack_from_prefix refuses such a prefix up front
(_other_bundle_manifests): installing the bundle would also overwrite those
packages' records.

pack_recipe (plain `cvcpkg pack`) tagged the bundle with detect_arch(), the
HOST arch: `pack --platform wasm` on x86_64 produced ...-wasm-x86_64-....
pack_from_prefix and install already derive it from the platform
(_detect_arch_for_platform: wasm/wasm-mt -> wasm32); pack_recipe now does too,
from the build platform, so the any/noarch identity is unchanged. The same
host arch was what `pack --bump`, `next-revision` and `cascade-bump` looked
published revisions up by, and what `publish` globbed dist/ with (so
`publish <name> --platform wasm` and `publish --all --platform wasm` found
nothing); all four use _detect_arch_for_platform now. pack-all already mapped
wasm per bundle and is unchanged.

docs/wasm-packaging.md: the clean-prefix requirement is now enforced, and
publish by name works for wasm (it said to publish by path because by-name
re-derived the host arch).
transfix added a commit to cy-pca/cvcpkg that referenced this pull request Oct 13, 2026
…are wasm32 (#168)

Two ways a bundle's identity was lost between pack and publish, both hit
publishing libcvc's pycvc-gl-cp312 3.5.1 wasm bundle (transfix/libcvc#609):

publish took the FIRST manifest.yaml in the archive. libcvc packed pycvc-gl
with `pack --from-prefix` of a prefix that also held its dependency closure,
so the archive carried every dep's share/libcvc-deps/<dep>/manifest.yaml, and
the sorted archive's first was assimp's: the 242 MB pycvc-gl bundle went up
as cvc/assimp==6.0.5+cvc.6 (skipped only because that build existed).
_extract_manifest now reads the bundle manifest locations
(share/libcvc-deps/<name>/manifest.yaml, or the older flat one) ahead of any
stray manifest.yaml, and refuses an archive carrying several packages'
manifests, naming them; the same package's per-name and flat copies resolve
to the per-name one. pack_from_prefix refuses such a prefix up front
(_other_bundle_manifests): installing the bundle would also overwrite those
packages' records.

pack_recipe (plain `cvcpkg pack`) tagged the bundle with detect_arch(), the
HOST arch: `pack --platform wasm` on x86_64 produced ...-wasm-x86_64-....
pack_from_prefix and install already derive it from the platform
(_detect_arch_for_platform: wasm/wasm-mt -> wasm32); pack_recipe now does too,
from the build platform, so the any/noarch identity is unchanged. The same
host arch was what `pack --bump`, `next-revision` and `cascade-bump` looked
published revisions up by, and what `publish` globbed dist/ with (so
`publish <name> --platform wasm` and `publish --all --platform wasm` found
nothing); all four use _detect_arch_for_platform now. pack-all already mapped
wasm per bundle and is unchanged.

docs/wasm-packaging.md: the clean-prefix requirement is now enforced, and
publish by name works for wasm (it said to publish by path because by-name
re-derived the host arch).
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