Skip to content

Gha revdep packages.2407#3

Open
arozovyk wants to merge 2 commits into
masterfrom
gha-revdep-packages.2407
Open

Gha revdep packages.2407#3
arozovyk wants to merge 2 commits into
masterfrom
gha-revdep-packages.2407

Conversation

@arozovyk

@arozovyk arozovyk commented Jun 24, 2025

Copy link
Copy Markdown
Owner
  • Added a new CI job to automatically test reverse dependencies

@coderabbitai

coderabbitai Bot commented Jun 24, 2025

Copy link
Copy Markdown

Walkthrough

The changes introduce a new CI workflow job and supporting script logic to test reverse dependencies of the project using an OPAM_DEPENDS environment variable. The main build script is refactored to modularize repository preparation and dependency testing, while the workflow files are updated to trigger these new tests and report errors as PR comments. Documentation is updated to reflect these enhancements.

Changes

File(s) Change Summary
.github/scripts/main/main.sh Added OPAM_DEPENDS support; refactored repo preparation into prepare_project; added test_project for dependency testing and error reporting.
.github/scripts/main/preamble.sh Introduced OPAM_DEPENDS env var with default 0; updated init-bootstrap to include OPAM_DEPENDS=1 condition.
.github/workflows/ci.ml Added depends_job for reverse dependency testing; integrated it to run after Linux build and analyse jobs.
.github/workflows/main.yml Expanded push trigger to all branches; added Depends-Linux job with matrix OCaml versions; posts PR comments with dependency errors.
master_changes.md Updated changelog with new CI job, script improvements, and workflow enhancements.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Main Script
    participant Dependent Project Repo
    participant OPAM

    GitHub Actions->>Main Script: Set OPAM_DEPENDS=1 and run script
    Main Script->>OPAM: List libraries in current project
    Main Script->>OPAM: Find packages depending on these libraries
    loop For each dependent package
        Main Script->>Dependent Project Repo: Clone and checkout branch
        Main Script->>OPAM: Create switch, pin project, install dependencies
        Main Script->>OPAM: Install package and record errors
    end
    Main Script->>GitHub Actions: Export error info for reporting
Loading

Poem

🐇
In the warren of code where dependencies sprawl,
A new script hops forth to inspect them all.
With branches and switches, it tests every friend,
Reporting each burrow where errors might end.
Now CI is smarter—oh what a delight!
The rabbit approves, with a nose twitch of might.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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 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.

coderabbitai[bot]

This comment was marked as off-topic.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch from 87e7a16 to db43d0b Compare June 25, 2025 06:13
coderabbitai[bot]

This comment was marked as resolved.

@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch 2 times, most recently from ac3dfe9 to a799a77 Compare June 25, 2025 11:46
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/workflows/main.yml Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread master_changes.md Outdated
Comment thread .github/scripts/main/main.sh
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh
Comment thread .github/workflows/main.yml Outdated
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch 3 times, most recently from 9144dca to 9e0d395 Compare June 26, 2025 12:39
Repository owner deleted a comment from github-actions Bot Jun 26, 2025
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch 3 times, most recently from 6e5e04e to e7440a9 Compare June 26, 2025 13:20
Repository owner deleted a comment from github-actions Bot Jun 26, 2025
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch from e7440a9 to 14343eb Compare June 26, 2025 13:32
Repository owner deleted a comment from github-actions Bot Jun 26, 2025
Repository owner deleted a comment from github-actions Bot Jun 26, 2025
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh Outdated
Comment thread .github/scripts/main/main.sh
Comment thread .github/scripts/main/main.sh Outdated
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch 5 times, most recently from 3edeb90 to 76873ef Compare June 30, 2025 17:33
Co-authored-by: arozovyk <artemiy.rozovyk@ocamlpro.com>
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch 2 times, most recently from 9556aa3 to 9f7faa2 Compare June 30, 2025 17:56
Comment thread .github/scripts/main/main.sh Outdated
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch from e237392 to b37100b Compare July 1, 2025 07:44
Repository owner deleted a comment from github-actions Bot Jul 1, 2025
Repository owner deleted a comment from github-actions Bot Jul 1, 2025
@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown

Tested projects: builder-web dream dune-release mvar odep odig odoc-driver opam-0install opam-0install-cudf opam-dune-lint opam-graph opam-lock opam-publish orb topkg-care
OCaml version: 5.3.0. Commit: 442f126.
Failed to build : dream odig opam-lock.

@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown

Tested projects: builder-web dream dune-release mvar odep odig odoc-driver opam-0install opam-0install-cudf opam-dune-lint opam-graph opam-lock opam-publish orb topkg-care
OCaml version: 4.14.2. Commit: 442f126.
Failed to build : dream odig opam-lock.

@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch 7 times, most recently from 650d9a8 to 442f126 Compare July 3, 2025 10:10
Co-authored-by: arozovyk <artemiy.rozovyk@ocamlpro.com>
@arozovyk arozovyk force-pushed the gha-revdep-packages.2407 branch from 442f126 to 11a3d02 Compare July 3, 2025 12:54
Comment on lines +245 to +250
FAIL=""
for critical in $FAIL_IF_DEPENDENT; do
if echo "$LIB_ERRORS" | grep -wq "$critical"; then
FAIL="$FAIL $critical"
fi
done

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
FAIL=""
for critical in $FAIL_IF_DEPENDENT; do
if echo "$LIB_ERRORS" | grep -wq "$critical"; then
FAIL="$FAIL $critical"
fi
done
FAIL=""
set +x
for critical in $FAIL_IF_DEPENDENT; do
if echo "$LIB_ERRORS" | grep -wq "$critical"; then
FAIL="$FAIL $critical"
fi
done
set -x

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.

3 participants