Skip to content

Conversation

spicyjpeg
Copy link
Contributor

Quick fixes for the empty-cmake and cmake-cube templates provided by the PSX.Dev VS Code extension, which no longer compiled due to some minor but breaking changes in the ps1-bare-metal repository they depend on. I haven't bothered to bump the extension's version number as I already did that as part of #1948, which is still unmerged.

Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the primary change by indicating updates to the VS Code extension templates in response to ps1-bare-metal modifications, clearly conveying both the component and motivation for the change.
Description Check ✅ Passed The description directly explains that the pull request fixes compilation issues in the empty-cmake and cmake-cube templates of the VS Code extension caused by breaking changes in the ps1-bare-metal repository, making it clearly related to the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tools/vscode-extension/templates/bare-metal/cmake-cube/src/main.c (1)

195-197: LGTM! Cleaner DMA channel enabling with helper macro.

The consolidated approach using DMA_DPCR_CH_ENABLE() is more maintainable than manual bit shifts. The |= 0 pattern is unconventional but harmless—you could simplify to DMA_DPCR |= DMA_DPCR_CH_ENABLE(DMA_GPU) | DMA_DPCR_CH_ENABLE(DMA_OTC); if preferred.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 718f091 and 7cb57ad.

📒 Files selected for processing (3)
  • tools/vscode-extension/templates/bare-metal/cmake-cube/CMakeLists.txt (1 hunks)
  • tools/vscode-extension/templates/bare-metal/cmake-cube/src/main.c (2 hunks)
  • tools/vscode-extension/templates/bare-metal/empty-cmake/CMakeLists.txt (1 hunks)
🧰 Additional context used
🪛 GitHub Check: CodeScene Code Health Review (main)
tools/vscode-extension/templates/bare-metal/cmake-cube/src/main.c

[warning] 195-197: ❌ Getting worse: Complex Method
main already has high cyclomatic complexity, and now it increases in Lines of Code from 87 to 88. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

⏰ 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). (3)
  • GitHub Check: macos-intel-build-and-test
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: toolchain
🔇 Additional comments (8)
tools/vscode-extension/templates/bare-metal/cmake-cube/src/main.c (1)

33-33: LGTM! API naming update aligns with ps1-bare-metal.

The change from COP0_SR to COP0_STATUS and COP0_SR_CU2 to COP0_STATUS_CU2 reflects updated naming conventions in the ps1-bare-metal library, improving code clarity.

tools/vscode-extension/templates/bare-metal/empty-cmake/CMakeLists.txt (3)

28-36: LGTM! Library sources updated for ps1-bare-metal compatibility.

The addition of clz.s, string.s, and cache.s alongside the removal of obsolete sources aligns the template with upstream ps1-bare-metal changes.


44-44: LGTM! Default linking simplifies executable configuration.

The link_libraries(common) directive ensures the common library is automatically linked to all executables, reducing boilerplate in subsequent target definitions.


46-50: LGTM! Macro-driven executable creation reduces boilerplate.

The addPS1Executable() macro encapsulates executable creation and PS1 format conversion, eliminating the need for manual add_custom_command post-build steps. This modernizes the build flow and improves maintainability.

tools/vscode-extension/templates/bare-metal/cmake-cube/CMakeLists.txt (4)

28-36: LGTM! Library sources synchronized with ps1-bare-metal.

Identical to the empty-cmake template, these source updates maintain compatibility with upstream ps1-bare-metal changes.


44-44: LGTM! Consistent default linking across templates.

The link_libraries(common) directive matches the approach in the empty-cmake template, ensuring consistency.


46-56: LGTM! Multi-source executable with addPS1Executable.

The macro correctly handles multiple source files, demonstrating its flexibility beyond the single-file usage in the empty-cmake template.


58-64: LGTM! Updated documentation reflects macro-based asset embedding.

The comments accurately reference the convertImage() and addBinaryFile() macros, guiding users on the modernized asset embedding workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant