Skip to content

feat: Add linux_riscv64 platform setup support - #137

Merged
hustcer merged 1 commit into
mainfrom
develop
Mar 30, 2025
Merged

feat: Add linux_riscv64 platform setup support#137
hustcer merged 1 commit into
mainfrom
develop

Conversation

@hustcer

@hustcer hustcer commented Mar 30, 2025

Copy link
Copy Markdown
Owner

feat: Add linux_riscv64 platform setup support

Summary by CodeRabbit

  • New Features

    • Added support for the Linux RISC-V architecture, expanding platform compatibility.
  • Chores

    • Updated the spell-checker vocabulary to recognize "riscv," reducing false spelling alerts.

@coderabbitai

coderabbitai Bot commented Mar 30, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request updates configuration and platform support. In cspell.yml, the term riscv is now recognized by the spell checker. In src/setup.ts, the Platform type is expanded with a new value linux_riscv64. The file also updates the mapping constants: PLATFORM_DEFAULT_MAP now includes an entry for linux_riscv64 (and revises the linux_arm64 mapping), and PLATFORM_FULL_MAP is updated with a corresponding entry for linux_riscv64. These changes enhance compatibility with the RISC-V Linux architecture.

Changes

File(s) Change Summary
cspell.yml Added riscv as a recognized word.
src/setup.ts Expanded Platform type to include linux_riscv64; updated PLATFORM_DEFAULT_MAP by adding an entry for linux_riscv64 (mapping to riscv64gc-unknown-linux-gnu) and modifying linux_arm64; added linux_riscv64 to PLATFORM_FULL_MAP (mapping to riscv64gc-unknown-linux-gnu-full).

Poem

I'm a bunny coding in the night,
Adding RISC-V with joyful might.
With words and maps all set just right,
My whiskers twitch at every byte.
Leaping bounds in code so bright,
I celebrate with hops of delight!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 298e09b and 211211e.

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**
📒 Files selected for processing (2)
  • cspell.yml (1 hunks)
  • src/setup.ts (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

Copy link
Copy Markdown

Here's my review of the code changes:

  1. cspell.yml Changes:

    • The addition of "riscv" to the dictionary is appropriate since it's a valid architecture name that will be used in the code.
  2. Platform Type Extension:

    • Good addition of 'linux_riscv64' to the Platform type to support RISC-V architecture.
    • The type definition is well-formatted with consistent line breaks and alignment.
  3. PLATFORM_DEFAULT_MAP Changes:

    • Proper addition of 'linux_riscv64' with the correct target triple 'riscv64gc-unknown-linux-gnu'.
    • The update to 'linux_arm64' to include both musl and gnu variants is a good improvement for compatibility.
  4. PLATFORM_FULL_MAP Changes:

    • Consistent addition of 'linux_riscv64' with the appropriate full variant name.
    • Maintains the same pattern as other platform entries.
  5. Potential Improvements:

    • Consider adding a comment explaining what "gc" stands for in "riscv64gc" (general and compressed instructions).
    • The win32_arm64 entry in PLATFORM_DEFAULT_MAP is missing the second array element (like '.zip') that other Windows entries have - this might be intentional but worth verifying.
    • Consider alphabetizing the platform entries for better maintainability as the list grows.
  6. Style Notes:

    • The code maintains consistent formatting throughout the changes.
    • Type definitions are clear and properly structured.

Overall, the changes are well-implemented and properly extend the platform support to include RISC-V architecture. The modifications follow the existing patterns in the codebase.

@hustcer
hustcer merged commit b88ee5b into main Mar 30, 2025
@github-actions github-actions Bot added this to the v3.19 milestone Mar 30, 2025
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