Skip to content

Install sqlite in setup-rust#8

Merged
leynos merged 5 commits intomainfrom
codex/add-sqlite3-library-to-setup-rust-action
Jun 21, 2025
Merged

Install sqlite in setup-rust#8
leynos merged 5 commits intomainfrom
codex/add-sqlite3-library-to-setup-rust-action

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Jun 21, 2025

Summary

  • install sqlite3 via MSYS2 on Windows
  • document sqlite support
  • note sqlite installation in changelog

Testing

  • npm test (fails: could not find package.json)

https://chatgpt.com/codex/tasks/task_e_6855f08e12b083228b0b08386d6dca7c

Summary by Sourcery

Enable optional installation of SQLite development libraries on Windows by adding a new install-sqlite-deps input and MSYS2 installation step, and update documentation and changelog accordingly.

New Features:

  • Add install-sqlite-deps input to optionally install SQLite development libraries on Windows via MSYS2

Documentation:

  • Document SQLite support and MSYS2 installation steps in README
  • Add CHANGELOG entry for SQLite support in v1.0.4

Summary by CodeRabbit

  • Documentation

    • Updated changelog and README with instructions for optional SQLite development library installation on Windows via MSYS2.
  • Chores

    • Added an input to enable installation of SQLite development libraries and toolchain on Windows runners using MSYS2.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jun 21, 2025

Reviewer's Guide

This PR enhances the setup-rust GitHub action by adding an optional Windows-only installation of SQLite development libraries via MSYS2, updating documentation with usage examples, and logging the new feature in the changelog.

Class diagram for setup-rust action inputs after SQLite support

classDiagram
    class SetupRustAction {
        +bool install-postgres-deps
        +bool install-sqlite-deps
        +string BUILD_PROFILE
    }
Loading

File-Level Changes

Change Details Files
Introduce install-sqlite-deps input and conditional MSYS2 install step
  • Add new boolean input install-sqlite-deps (default false)
  • Add composite action step conditioned on Windows to run msys2/setup-msys2@v2
  • Install mingw-w64-x86_64-toolchain and mingw-w64-x86_64-sqlite3 packages
.github/actions/setup-rust/action.yml
Document SQLite support in README
  • Extend action description to mention SQLite dependencies
  • Add install-sqlite-deps row to the inputs table
  • Provide MSYS2/MSYS shell example snippet for SQLite installation
  • Show usage example enabling install-sqlite-deps
.github/actions/setup-rust/README.md
Add changelog entry for SQLite installation option
  • Insert new version heading v1.0.4
  • Document the optional SQLite development library install feature
.github/actions/setup-rust/CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 21, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update enhances the Rust setup GitHub Action by adding steps and documentation for installing SQLite development libraries on Windows using MSYS2. The changelog, README, and action workflow are updated to reflect and describe the new SQLite installation process for Windows runners.

Changes

File(s) Change Summary
.github/actions/setup-rust/CHANGELOG.md Added changelog entry for version 1.0.4 documenting SQLite installation on Windows via MSYS2.
.github/actions/setup-rust/README.md Extended documentation with instructions and examples for setting up SQLite on Windows using MSYS2.
.github/actions/setup-rust/action.yml Added a new step to install SQLite and toolchain packages on Windows runners using MSYS2.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions Runner
    participant MSYS2 Setup Action
    participant Rust Build

    GitHub Actions Runner->>MSYS2 Setup Action: Install MSYS2 (Windows only)
    MSYS2 Setup Action->>MSYS2 Setup Action: Update packages
    MSYS2 Setup Action->>MSYS2 Setup Action: Install mingw-w64-x86_64-toolchain
    MSYS2 Setup Action->>MSYS2 Setup Action: Install mingw-w64-x86_64-sqlite3
    GitHub Actions Runner->>Rust Build: Proceed with build (SQLite available)
Loading

Possibly related PRs

Poem

A bunny hops where Rust does dwell,
On Windows now, SQLite as well!
With MSYS2 and toolchain bright,
The build hops forward, all is right.
🐇💻🍃
Cheers to code that runs with glee,
Thanks to actions—dependency-free!

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch codex/add-sqlite3-library-to-setup-rust-action

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes - here's some feedback:

  • You could merge the MSYS2 setup steps into a single msys2/setup-msys2@v2 invocation (installing SQLite alongside the existing toolchain) to avoid redundant environment initialization.
  • The PR description still references npm test and package.json, but this repo doesn’t have one—please update or remove those testing instructions to avoid confusion.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- You could merge the MSYS2 setup steps into a single `msys2/setup-msys2@v2` invocation (installing SQLite alongside the existing toolchain) to avoid redundant environment initialization.
- The PR description still references `npm test` and package.json, but this repo doesn’t have one—please update or remove those testing instructions to avoid confusion.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
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: 4

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1518697 and 226f59a.

📒 Files selected for processing (3)
  • .github/actions/setup-rust/CHANGELOG.md (1 hunks)
  • .github/actions/setup-rust/README.md (1 hunks)
  • .github/actions/setup-rust/action.yml (1 hunks)
🔇 Additional comments (1)
.github/actions/setup-rust/CHANGELOG.md (1)

4-7: Changelog entry is accurate and clear
The v1.0.4 entry correctly documents the new MSYS2-based SQLite installation on Windows, aligned with the action changes.

Comment thread .github/actions/setup-rust/action.yml Outdated
Comment thread .github/actions/setup-rust/README.md Outdated
Comment on lines +36 to +46
```yaml
# Bring in MSYS2 plus the MinGW build of SQLite
- name: Set up MSYS2 and SQLite
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-sqlite3 # ships libsqlite3.a + headers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Synchronise example step name with action.yml
The docs use - name: Set up MSYS2 and SQLite, but the workflow step is named Install SQLite (MSYS2). Please align these names for consistency.

🤖 Prompt for AI Agents
In .github/actions/setup-rust/README.md around lines 36 to 46, the example
workflow step name "Set up MSYS2 and SQLite" does not match the step name
"Install SQLite (MSYS2)" used in action.yml. Update the example step name in the
README to exactly match the name used in action.yml for consistency.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 21, 2025

@sourcery-ai review

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 21, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 21, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
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: 1

♻️ Duplicate comments (3)
.github/actions/setup-rust/action.yml (2)

8-11: Introduce optional SQLite flag
The new install-sqlite-deps input defaults to false and follows the naming pattern of install-postgres-deps, making the setup optional on Windows.


47-47: Verify indentation consistency
The indentation of the - name: Install MSYS2 toolchain and SQLite step aligns with the existing steps in this composite action.

.github/actions/setup-rust/README.md (1)

43-52: Synchronise example step name
The example step name now exactly matches the name used in action.yml, ensuring documentation and implementation stay in sync.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 226f59a and db9cd97.

📒 Files selected for processing (3)
  • .github/actions/setup-rust/CHANGELOG.md (1 hunks)
  • .github/actions/setup-rust/README.md (3 hunks)
  • .github/actions/setup-rust/action.yml (2 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/actions/setup-rust/README.md

[typographical] ~35-~35: The word ‘When’ starts a question. Add a question mark (“?”) at the end of the sentence.
Context: ...development files using MSYS2 on Windows. Enable SQLite support on Windows by se...

(WRB_QUESTION_MARK)


[uncategorized] ~38-~38: Possible missing comma found.
Context: ...hain and the mingw-w64-x86_64-sqlite3 package so the static library and headers are a...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (6)
.github/actions/setup-rust/action.yml (1)

47-56: Guarded MSYS2 setup for SQLite
The MSYS2 step installs the MinGW64 toolchain and SQLite only when install-sqlite-deps is enabled on Windows, mitigating unnecessary setup in other environments.

.github/actions/setup-rust/CHANGELOG.md (1)

4-8: Add v1.0.4 changelog entry
The new entry accurately documents the optional SQLite development library installation via MSYS2 on Windows, matching the action's input and step additions.

.github/actions/setup-rust/README.md (4)

4-5: Clarify summary statement
The description now clearly states the optional installation of both PostgreSQL and SQLite system libraries for crates that require them.


12-12: Document new input
The table row for install-sqlite-deps is correctly formatted, placed, and follows the existing input pattern.


25-25: Update example usage
The example snippet now demonstrates install-sqlite-deps: true alongside install-postgres-deps, improving clarity for users.


34-35: Condition description
The explanatory sentence accurately describes the behaviour when install-sqlite-deps is enabled; no question mark is required as it’s not phrased as a question.

Comment thread .github/actions/setup-rust/README.md Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 21, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 21, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 21, 2025

@sourcery-ai review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/actions/setup-rust/README.md:37` </location>
<code_context>
+When `install-sqlite-deps` is enabled, the action installs SQLite
+development files using MSYS2 on Windows.
+
+Enable SQLite support on Windows by setting up an MSYS2 environment
+with the MinGW toolchain and the `mingw-w64-x86_64-sqlite3` package,
+so the static library and headers are available when compiling crates that
</code_context>

<issue_to_address>
The phrase 'by setting up' implies a 2nd person instruction; rephrase to avoid addressing the reader directly.

Consider rephrasing to something like: 'SQLite support on Windows is enabled by setting up an MSYS2 environment...' to avoid the implied 'you'.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/actions/setup-rust/README.md Outdated
When `install-sqlite-deps` is enabled, the action installs SQLite
development files using MSYS2 on Windows.

Enable SQLite support on Windows by setting up an MSYS2 environment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion (review_instructions): The phrase 'by setting up' implies a 2nd person instruction; rephrase to avoid addressing the reader directly.

Consider rephrasing to something like: 'SQLite support on Windows is enabled by setting up an MSYS2 environment...' to avoid the implied 'you'.

Review instructions:

Path patterns: **/*.md

Instructions:
Avoid 2nd person or 1st person pronouns ("I", "you", "we")

Copy link
Copy Markdown
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: 1

♻️ Duplicate comments (1)
.github/actions/setup-rust/README.md (1)

44-51: Synchronise the example step name with action.yml
The step name here (Install MSYS2 toolchain and SQLite) doesn’t match the action’s action.yml name (Install SQLite (MSYS2)).
Please update for consistency:

-      - name: Install MSYS2 toolchain and SQLite
+      - name: Install SQLite (MSYS2)
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between db9cd97 and 9d957d7.

📒 Files selected for processing (1)
  • .github/actions/setup-rust/README.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/actions/setup-rust/README.md

[typographical] ~35-~35: The word ‘When’ starts a question. Add a question mark (“?”) at the end of the sentence.
Context: ...development files using MSYS2 on Windows. Enable SQLite support on Windows by se...

(WRB_QUESTION_MARK)

🔇 Additional comments (4)
.github/actions/setup-rust/README.md (4)

12-12: New input entry looks good
The install-sqlite-deps row clearly indicates Windows-only support with a sensible default.


25-26: Example usage is correct
The addition of install-sqlite-deps: true aligns with the inputs table and the intended workflow.


34-35: Behaviour description is clear
The “When install-sqlite-deps is enabled…” statement accurately explains the MSYS2-based installation on Windows.


37-40: Supporting details are well-written
The instructions on setting up MSYS2 with the MinGW toolchain and SQLite package are concise and informative.

Comment on lines 3 to +5
Install the Rust toolchain and cache your build dependencies. Optionally
install PostgreSQL system libraries for crates that require them.
install PostgreSQL and SQLite system libraries for crates that require
them.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Jun 21, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Capitalise the start of the second sentence
The fragment
“Optionally
install PostgreSQL and SQLite system libraries for crates that require them.”
should begin with a capital “Install” for consistency and readability.

🤖 Prompt for AI Agents
In .github/actions/setup-rust/README.md around lines 3 to 5, the second sentence
starts with a lowercase "install" which breaks consistency and readability.
Change the first letter of "install" to uppercase "Install" to properly
capitalize the start of the sentence.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

install does not start the sentence here, and so does not need a capital.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@leynos You're absolutely right, and I apologize for the error. In the sentence "Optionally install PostgreSQL and SQLite system libraries for crates that require them," the word "Optionally" starts the sentence, not "install." The word "install" is the main verb but comes after the adverb. Thank you for the correction!


✏️ Learnings added
Learnt from: leynos
PR: leynos/shared-actions#8
File: .github/actions/setup-rust/README.md:3-5
Timestamp: 2025-06-21T00:58:38.608Z
Learning: When analyzing sentence structure for capitalization, pay careful attention to what word actually starts the sentence. Adverbs like "Optionally" can precede the main verb, making the adverb the first word that should be capitalized, not the verb that follows.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@leynos leynos merged commit 8dd0384 into main Jun 21, 2025
1 check passed
@leynos leynos deleted the codex/add-sqlite3-library-to-setup-rust-action branch June 21, 2025 01:16
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