-
-
Notifications
You must be signed in to change notification settings - Fork 129
Several vscode extension fixes and updates. #1966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
nicolasnoble
commented
Sep 2, 2025
- Fixed installation issues with MacOS Sequoia.
- Bumping gcc to 15.2.0
- Bumping binutils to 2.45
- Fixed installation issues with Windows MIPS toolchain when PowerShell is the default shell.
- Fixed installation issues with MacOS Sequoia. - Bumping gcc to 15.2.0 - Bumping binutils to 2.45 - Fixed installation issues with Windows MIPS toolchain when PowerShell is the default shell.
WalkthroughDocumentation update adds a 0.4.0 changelog, package.json version bump to 0.4.0, Windows install logic adjustments in tools.js (use cmd/msiexec), and MIPS toolchain packaging version update in Dockerfile to 15.2.0. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as User (Windows)
participant VSCE as VS Code Extension
participant TJS as tools.js
participant Term as Terminal
participant CMD as cmd.exe
participant MSI as msiexec
rect rgb(240,248,255)
note over VSCE,TJS: MIPS toolchain install (already installed scenario)
User->>VSCE: Trigger toolchain setup
VSCE->>TJS: ensureMipsToolchain()
TJS->>Term: run("cmd", ["/c", "mips install <version>"])
Term->>CMD: Execute
CMD-->>TJS: Exit code/result
end
rect rgb(245,255,240)
note over VSCE,MSI: CMake MSI installation
VSCE->>TJS: installCMake(msiPath)
TJS->>Term: run("msiexec", ["/i", "<msiPath>"])
Term->>MSI: Execute installer
MSI-->>TJS: Installation result
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 (3)
tools/vscode-extension/tools.js (3)
182-183
: Windows: call mips via cmd here too.- await terminal.run('mips', ['install', mipsVersion]) + await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`])
252-253
: Windows: call mips via cmd here too.- await terminal.run('mips', ['install', mipsVersion]) + await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`])
18-18
: Bump mipsVersion to 15.2.0 to match packaging/docs.Prevents installing the older 14.2.0 toolchain from the extension.
-const mipsVersion = '14.2.0' +const mipsVersion = '15.2.0'
🧹 Nitpick comments (4)
tools/win32-mips/Dockerfile (1)
83-83
: Nit: smaller, more reproducible zip.Add flags to minimize and strip timestamps/extra metadata.
-RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /DIST && zip /c/g++-mipsel-none-elf-15.2.0.zip . -r' +RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /DIST && zip -9rX /c/g++-mipsel-none-elf-15.2.0.zip .'tools/vscode-extension/tools.js (3)
309-311
: Make the CMake MSI install non-interactive and avoid auto-restart.Safer in an extension flow and avoids surprising reboots; also capture a log.
- await terminal.run('msiexec', ['/i', filename]) + await terminal.run('msiexec', ['/i', filename, '/passive', '/norestart', '/L*v', path.join(os.tmpdir(), 'cmake-install.log')])
173-241
: Optional: unify Windows MIPS install UX messaging.Consider setting requiresReboot = true after successful mips installs if PATH changes are involved, and surface a single info message like in installMips.
Also applies to: 243-286
706-729
: Reset the Windows-installing guard on error paths too.If an install throws before reaching the end of exports.install, win32MipsToolsInstalling may remain true and block retries. Reset in finally.
-exports.install = async (toInstall, force) => { +exports.install = async (toInstall, force) => { if (requiresReboot) { return true } - for (const tool of toInstall) { - if (!force && (await checkInstalled(tool))) continue - if (tools[tool].install) { - if (typeof tools[tool].install === 'string') { - vscode.env.openExternal(vscode.Uri.parse(tools[tool].install)) - } else { - await tools[tool].install(force) - } - } else if (tools[tool].type === 'extension') { - const extensionId = tools[tool].id - await vscode.commands.executeCommand('extension.open', extensionId) - } else if (tools[tool].type === 'archive') { - await downloader.downloadFile( - tools[tool].url, - vscode.Uri.joinPath(globalStorageUri, tools[tool].filename).fsPath - ) - } - } - win32MipsToolsInstalling = false - return requiresReboot + try { + for (const tool of toInstall) { + if (!force && (await checkInstalled(tool))) continue + if (tools[tool].install) { + if (typeof tools[tool].install === 'string') { + vscode.env.openExternal(vscode.Uri.parse(tools[tool].install)) + } else { + await tools[tool].install(force) + } + } else if (tools[tool].type === 'extension') { + const extensionId = tools[tool].id + await vscode.commands.executeCommand('extension.open', extensionId) + } else if (tools[tool].type === 'archive') { + await downloader.downloadFile( + tools[tool].url, + vscode.Uri.joinPath(globalStorageUri, tools[tool].filename).fsPath + ) + } + } + return requiresReboot + } finally { + win32MipsToolsInstalling = false + } }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
tools/vscode-extension/README.md
(1 hunks)tools/vscode-extension/package.json
(1 hunks)tools/vscode-extension/tools.js
(2 hunks)tools/win32-mips/Dockerfile
(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tools/vscode-extension/tools.js (3)
tools/vscode-extension/pcsx-redux.js (1)
terminal
(15-15)tools/vscode-extension/templates.js (1)
terminal
(7-7)tools/vscode-extension/extension.js (1)
terminal
(11-11)
🪛 LanguageTool
tools/vscode-extension/README.md
[grammar] ~21-~21: There might be a mistake here.
Context: ...endency locally. ### Changelog - 0.4.0 - Fixed installation issues with MacOS Seq...
(QB_NEW_EN)
[grammar] ~22-~22: There might be a mistake here.
Context: ... installation issues with MacOS Sequoia. - Bumping gcc to 15.2.0 - Bumping binuti...
(QB_NEW_EN)
[grammar] ~25-~25: There might be a mistake here.
Context: ...in when PowerShell is the default shell. - 0.3.9 - Fixed cube psyqo template's nu...
(QB_NEW_EN)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: pcsx-redux (aarch64-linux)
- GitHub Check: pcsx-redux (x86_64-linux)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build-openbios
- GitHub Check: build
- GitHub Check: coverage
- GitHub Check: asan
- GitHub Check: aur-build
- GitHub Check: macos-build-and-test-toolchain
- GitHub Check: cross-arm64
- GitHub Check: toolchain
🔇 Additional comments (1)
tools/vscode-extension/package.json (1)
5-5
: Version bump to 0.4.0 looks good.Matches the README changelog. No further issues here.
- 0.4.0 | ||
- Fixed installation issues with MacOS Sequoia. | ||
- Bumping gcc to 15.2.0 | ||
- Bumping binutils to 2.45 | ||
- Fixed installation issues with Windows MIPS toolchain when PowerShell is the default shell. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polish changelog wording/branding.
Use “macOS”, and consistent past tense/branding for GCC/Binutils.
-- 0.4.0
- - Fixed installation issues with MacOS Sequoia.
- - Bumping gcc to 15.2.0
- - Bumping binutils to 2.45
- - Fixed installation issues with Windows MIPS toolchain when PowerShell is the default shell.
+- 0.4.0
+ - Fixed installation issues with macOS Sequoia.
+ - Bumped GCC to 15.2.0.
+ - Bumped Binutils to 2.45.
+ - Fixed installation issues with the Windows MIPS toolchain when PowerShell is the default shell.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- 0.4.0 | |
- Fixed installation issues with MacOS Sequoia. | |
- Bumping gcc to 15.2.0 | |
- Bumping binutils to 2.45 | |
- Fixed installation issues with Windows MIPS toolchain when PowerShell is the default shell. | |
- 0.4.0 | |
- Fixed installation issues with macOS Sequoia. | |
- Bumped GCC to 15.2.0. | |
- Bumped Binutils to 2.45. | |
- Fixed installation issues with the Windows MIPS toolchain when PowerShell is the default shell. |
🧰 Tools
🪛 LanguageTool
[grammar] ~21-~21: There might be a mistake here.
Context: ...endency locally. ### Changelog - 0.4.0 - Fixed installation issues with MacOS Seq...
(QB_NEW_EN)
[grammar] ~22-~22: There might be a mistake here.
Context: ... installation issues with MacOS Sequoia. - Bumping gcc to 15.2.0 - Bumping binuti...
(QB_NEW_EN)
[grammar] ~25-~25: There might be a mistake here.
Context: ...in when PowerShell is the default shell. - 0.3.9 - Fixed cube psyqo template's nu...
(QB_NEW_EN)
🤖 Prompt for AI Agents
In tools/vscode-extension/README.md around lines 21 to 25, update changelog
wording/branding: change "MacOS" to "macOS", change "gcc" to "GCC" and
"binutils" to "Binutils", and make tense consistent by replacing "Bumping" with
"Bumped" so all bullet points use past tense (e.g., "Bumped GCC to 15.2.0",
"Bumped Binutils to 2.45").
await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`]) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix for PowerShell default shell; propagate the same to GDB/Make.
Windows “mips” invocations elsewhere still call the tool directly and may fail under PowerShell. Use cmd /c consistently.
- await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`])
+ await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`])
Also change below (other occurrences):
- await terminal.run('mips', ['install', mipsVersion])
+ await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`])
(Repeat the same change in installMake.)
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In tools/vscode-extension/tools.js around lines 74-75, the code invokes "mips"
directly (await terminal.run('cmd', ['/c', `mips install ${mipsVersion}`]) is
present but other invocations call the tool directly), causing failures when
PowerShell is the default shell; update every direct mips invocation to run via
cmd with arguments (e.g., terminal.run('cmd', ['/c', `mips <args>`])) so the
command is executed under cmd /c, and apply the same pattern to installMake and
any GDB/Make invocations—replace calls like terminal.run('mips', [...]) or
terminal.run('gdb', ...) with terminal.run('cmd', ['/c', `mips ...`]) or
terminal.run('cmd', ['/c', `make ...`]) respectively, ensuring you pass the
entire command as a single string in the cmd /c call and update all other
occurrences in the file.
# escape=` | ||
|
||
# Dockerfile to generate the Windows g++-mipsel-none-elf-14.2.0.zip package. | ||
# Dockerfile to generate the Windows g++-mipsel-none-elf-15.2.0.zip package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sync Windows toolchain version across the extension.
Docker now produces 15.2.0 artifacts, but tools.js still installs 14.2.0. This will lead to users getting the older toolchain from the VS Code extension.
Apply in tools.js:
-const mipsVersion = '14.2.0'
+const mipsVersion = '15.2.0'
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
# Dockerfile to generate the Windows g++-mipsel-none-elf-15.2.0.zip package. | |
const mipsVersion = '15.2.0' |
🤖 Prompt for AI Agents
In tools/win32-mips/Dockerfile around line 3 and in tools.js (where the Windows
toolchain version is defined/installed), the project produces 15.2.0 artifacts
but tools.js still installs 14.2.0; update the version constant in tools.js to
"15.2.0" and change any related download filename, URL, checksum keys, and
package-name strings (e.g., g++-mipsel-none-elf-14.2.0.zip ->
g++-mipsel-none-elf-15.2.0.zip) so they match the Dockerfile output; ensure any
mapping or switch cases, release-tag strings, and tests referencing the old
version are updated accordingly and validate the download/checksum flow still
passes.