Automate frontend builds for releases; stop committing the build - #48
Open
ericgozzi wants to merge 1 commit into
Open
Automate frontend builds for releases; stop committing the build#48ericgozzi wants to merge 1 commit into
ericgozzi wants to merge 1 commit into
Conversation
The bundled compas_threejs_ts frontend was previously built by hand and committed to this repo. Instead: - FRONTEND_VERSION pins the compas_threejs_ts release to build. - `invoke pre-build` clones that tag, builds it, and vendors dist/ into src/compas_threejs/viewer/frontend/. It's the hook compas-dev/compas-actions/prepare-release@v1 runs (via run-prebuild) before `python -m build`, now wired up in release.yml alongside a Node.js setup step. - `invoke sync-frontend` stays for local iteration against a sibling compas_threejs_ts checkout. - src/compas_threejs/viewer/frontend/ is now gitignored; setuptools still bundles it into sdists/wheels from disk via MANIFEST.in, so `pip install compas_threejs` still needs no Node.js. - scripts/sync-frontend.py and sync-frontend.bat removed (duplicated the invoke task, and the former broke on Windows console encoding). Pinning the version explicitly, rather than always building whatever compas_threejs_ts is newest, is deliberate: the two repos share a wire format contract via compas-pb/compas-pb-ts, and an unreviewed frontend bump could silently break it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gonzalocasas
approved these changes
Aug 21, 2026
gonzalocasas
left a comment
Member
There was a problem hiding this comment.
Generally I love this, but I think it would be best to use release assets instead of rebuilding here
Comment on lines
+64
to
+79
| with tempfile.TemporaryDirectory(prefix="compas_threejs_ts-") as tmp: | ||
| clone_dir = Path(tmp) / "compas_threejs_ts" | ||
|
|
||
| print(f"Cloning compas_threejs_ts@v{version}...") | ||
| subprocess.run( | ||
| [ | ||
| "git", | ||
| "clone", | ||
| "--branch", | ||
| f"v{version}", | ||
| "--depth", | ||
| "1", | ||
| FRONTEND_REPO_URL, | ||
| str(clone_dir), | ||
| ], | ||
| check=True, |
Member
There was a problem hiding this comment.
Shouldn't we use the release assets instead of rebuilding locally?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bundled compas_threejs_ts frontend was previously built by hand and committed to this repo. Instead:
invoke pre-buildclones that tag, builds it, and vendors dist/ into src/compas_threejs/viewer/frontend/. It's the hook compas-dev/compas-actions/prepare-release@v1 runs (via run-prebuild) beforepython -m build, now wired up in release.yml alongside a Node.js setup step.invoke sync-frontendstays for local iteration against a sibling compas_threejs_ts checkout.pip install compas_threejsstill needs no Node.js.Pinning the version explicitly, rather than always building whatever compas_threejs_ts is newest, is deliberate: the two repos share a wire format contract via compas-pb/compas-pb-ts, and an unreviewed frontend bump could silently break it.