Build from source some extensions that were previously bundled. - #775
Build from source some extensions that were previously bundled.#775rgrunber wants to merge 3 commits into
Conversation
📝 WalkthroughWalkthroughThe change adds four Git submodules and enables submodule checkout in both build workflows. Install hooks copy extension build scripts and update Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Checkout
participant NpmInstall
participant BuildScripts
participant ExtensionRepositories
Checkout->>ExtensionRepositories: fetch submodules
NpmInstall->>BuildScripts: run preinstall helpers
BuildScripts->>ExtensionRepositories: copy build scripts and update metadata
BuildScripts->>ExtensionRepositories: invoke extension builds
ExtensionRepositories-->>BuildScripts: generate build outputs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
code/build/npm/dirs.ts (1)
31-46: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winEnsure the npm cache contract matches these added dirs.
extensions/devfileis a TypeScript build target but has nopackage.json/package-lock.json, so it is exposed to the cache logic without the files it expects; either add a no-op package contract or move it out of this npm dir list. Similarly,extensions/js-profile-visualizercompiles nestedpackages/vscode-js-profile-table; if that package depends on its own install artifacts, add entries/lockfile handling for the nested package too.
[mantainability_and_code_quality]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@code/build/npm/dirs.ts` around lines 31 - 46, Update the npm directory configuration containing the listed extension paths so every cached build target has the package artifacts expected by the cache logic. For extensions/devfile, either add the required no-op package contract or remove it from the npm directory list; for extensions/js-profile-visualizer, include handling for the nested packages/vscode-js-profile-table package and its lockfile when required.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/image-publish.yml:
- Around line 39-40: Update the actions/checkout configuration by adding
persist-credentials: false alongside submodules: true, ensuring credentials are
not retained in the workspace before the subsequent Docker build.
In `@code/build/copy-extension-build-scripts.js`:
- Around line 34-42: Update the missing-input checks in the copy flow, including
the checks for src, destDir, and jsDebugPkgPath, to throw an error immediately
instead of warning and continuing. Preserve the existing path-specific error
context while ensuring any absent required submodule directory, build script, or
js-debug package metadata causes the script to fail.
In `@code/build/extension-build-scripts/js-profile-visualizer.esbuild.ts`:
- Around line 14-23: Update the two tsc invocations in the build script so
catches do not unconditionally continue after compiler failures. Allow only
explicitly tolerated type-check errors, or validate that all expected out/esm
outputs were freshly generated before proceeding; otherwise propagate the
failure and prevent packaging an invalid extension.
---
Outside diff comments:
In `@code/build/npm/dirs.ts`:
- Around line 31-46: Update the npm directory configuration containing the
listed extension paths so every cached build target has the package artifacts
expected by the cache logic. For extensions/devfile, either add the required
no-op package contract or remove it from the npm directory list; for
extensions/js-profile-visualizer, include handling for the nested
packages/vscode-js-profile-table package and its lockfile when required.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 71a74af2-86ee-4e51-8b8e-a09ae7d4786e
📒 Files selected for processing (18)
.github/workflows/image-publish.yml.gitmodulesbuild/artifacts/artifacts.lock.yamlcode/build/copy-extension-build-scripts.jscode/build/extension-build-scripts/devfile.esbuild.tscode/build/extension-build-scripts/js-debug-companion.esbuild.tscode/build/extension-build-scripts/js-debug.esbuild.tscode/build/extension-build-scripts/js-profile-visualizer.esbuild.tscode/build/extension-build-scripts/js-profile-visualizer.webpack.override.jscode/build/gulpfile.extensions.tscode/build/npm/dirs.tscode/extensions/devfilecode/extensions/js-debugcode/extensions/js-debug-companioncode/extensions/js-profile-visualizercode/package.jsoncode/product.jsonpackage.json
💤 Files with no reviewable changes (2)
- code/product.json
- build/artifacts/artifacts.lock.yaml
21dd277 to
871ed3b
Compare
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-775-amd64 |
|
Hi! I'm che-ai-assistant — I help with your pull requests. I check for new comments every 10m0s, so there may be a short delay before I respond. Available commands:
|
871ed3b to
2a9dd85
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pull-request-check.yml:
- Around line 57-58: Update the actions/checkout configuration in the workflow’s
with block to set persist-credentials to false, while preserving the existing
submodules setting, unless a later workflow step explicitly requires Git
authentication.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7c8e5e8d-04c6-4deb-ae75-67249fa6b6a1
📒 Files selected for processing (19)
.github/workflows/image-publish.yml.github/workflows/pull-request-check.yml.gitmodulesbuild/artifacts/artifacts.lock.yamlcode/build/copy-extension-build-scripts.jscode/build/extension-build-scripts/devfile.esbuild.tscode/build/extension-build-scripts/js-debug-companion.esbuild.tscode/build/extension-build-scripts/js-debug.esbuild.tscode/build/extension-build-scripts/js-profile-visualizer.esbuild.tscode/build/extension-build-scripts/js-profile-visualizer.webpack.override.jscode/build/gulpfile.extensions.tscode/build/npm/dirs.tscode/extensions/devfilecode/extensions/js-debugcode/extensions/js-debug-companioncode/extensions/js-profile-visualizercode/package.jsoncode/product.jsonpackage.json
💤 Files with no reviewable changes (2)
- code/product.json
- build/artifacts/artifacts.lock.yaml
🚧 Files skipped from review as they are similar to previous changes (11)
- code/package.json
- code/extensions/js-debug-companion
- code/build/extension-build-scripts/devfile.esbuild.ts
- code/build/extension-build-scripts/js-debug-companion.esbuild.ts
- code/extensions/js-profile-visualizer
- .gitmodules
- code/build/extension-build-scripts/js-profile-visualizer.webpack.override.js
- code/extensions/js-debug
- code/build/gulpfile.extensions.ts
- code/extensions/devfile
- package.json
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-775-amd64 |
- devfile 0.0.4 - js-debug 1.117.0 - js-debug-companion 1.1.3 - js-profile-visualizer 1.0.11 (exclude packages/vscode-js-profile-flame) Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- es5-ext -> @unes/es5-ext in overrides - Remove playwright dependency from js-debug (script requires root) - Update @types/node 20.9.0 -> 20.19.0 in js-profile-visualizer to correctly resolve dependencies - Remove packages/vscode-js-profile-flame from workspace field - Reduce extension size for js-debug by using .vscodeignore Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- devfile.vscode-devfile, ms-vscode.js-debug, js-debug-companion, js-profile-table - Add extensions to code/build/npm/dirs.ts to trigger npm-install - Create .esbuild.ts to wrap compilation process of each extension Assisted-By: claude-opus-4-6 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
2a9dd85 to
b1d1c3d
Compare
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-775-amd64 |
| architecture: process.arch, | ||
| }; | ||
|
|
||
| const jsDebugRegisteredToken = '$jsDebugIsRegistered'; |
There was a problem hiding this comment.
Consider adding // notsecret here.
Assisted-By: claude-opus-4-6
I tested this by publishing to https://quay.io/repository/rgrunber/che-code?tab=tags and then running that editor image. The extensions seem to be bundled as part of the editor.
The only thing I need to verify is that the contents of the published vsix in the marketplace match the contents (roughly) of what the build generates.
I think the✔️.vscodeignoreincludes too many things which would result in a larger installation.Here is how this works :
In the commit
Add js-debug, js-debug-companion, js-profile-visualizer & devfile., I have copied the latest tagged versions of those projects, intocode/extensions/. In,Minor modifications to extensions for successful builds.I have made small modifications to ensure these projects can successfully runnpm install. Some of these changes could probably be upstreamed, but for now they live in a separate commit.The final phase involves adding the projects to
code/npm/dirs.tsto ensurenpm installis called on each folder, and creating an.esbuild.tsfile in the root of each project, to wrap the compilation process of each extension. The compilation setup is done as part ofpreinstall, and it can be seen incode/build/copy-extension-build-scripts.js