Skip to content

fix(build): wasteful go ffi tests rebuild - #7466

Open
LesnyRumcajs wants to merge 1 commit into
mainfrom
fix-wasteful-rebuilds
Open

fix(build): wasteful go ffi tests rebuild#7466
LesnyRumcajs wants to merge 1 commit into
mainfrom
fix-wasteful-rebuilds

Conversation

@LesnyRumcajs

@LesnyRumcajs LesnyRumcajs commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary of changes

Changes introduced in this pull request:

  • don't regenerate some Go test files on every test build (effectively just bumping the mtime...)
  • this reduces the test re-runs A LOT - right now each consecutive cargo nextest... takes around a minute to rebuild (most likely linking) even though NOTHING changed. With this change, consecutive cargo nextest... runs just run the tests without any hold-up.
  • the fix is not super nice but the precedence is in the root already

    forest/build.rs

    Lines 37 to 44 in 9199a82

    // the generated Go file has been committed to the git repository,
    // uncomment to regenerate the code locally
    // .with_regen_arg(rust2go::RegenArgs {
    // src: "./src/f3/go_ffi.rs".into(),
    // dst: "./f3-sidecar/ffi_gen.go".into(),
    // without_main: true,
    // ..Default::default()
    // })
    and the files themselves don't change a lot (last change in 2025). I also don't expect them to change anytime soon.

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • This pull request is based on an issue that a maintainer has accepted (see Before Opening a Pull Request).
  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Chores
    • Updated the build configuration to prevent automatic regeneration of generated integration files.
    • Retained local regeneration instructions for developers when needed.

@LesnyRumcajs
LesnyRumcajs requested a review from a team as a code owner August 7, 2026 15:39
@LesnyRumcajs
LesnyRumcajs requested review from EclesioMeloJunior and hanabi1224 and removed request for a team August 7, 2026 15:39
@LesnyRumcajs
LesnyRumcajs enabled auto-merge August 7, 2026 15:39
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The interop test build script no longer regenerates ffi_gen.go automatically. It retains commented instructions for local regeneration.

Changes

Go FFI regeneration

Layer / File(s) Summary
Build regeneration configuration
interop-tests/build.rs
The active with_regen_arg configuration is replaced with commented local-regeneration instructions.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: akaladarshi, eclesiomelojunior, gregthegreek, hanabi1224, sudo-shashank

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the build change that prevents wasteful Go FFI test rebuilds.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-wasteful-rebuilds
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix-wasteful-rebuilds

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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@interop-tests/build.rs`:
- Around line 12-18: Add a CI step for the interop tests that enables the
regeneration configuration in build.rs and compares the regenerated ffi_gen.go
with the committed version, failing when they differ. Use the existing
rust2go::RegenArgs source and destination symbols, and keep normal builds
unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 73735eaa-40f3-44a0-8184-7ebba7383fd2

📥 Commits

Reviewing files that changed from the base of the PR and between 9199a82 and d1eb007.

📒 Files selected for processing (1)
  • interop-tests/build.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • filecoin-project/lotus (manual)

Comment thread interop-tests/build.rs
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.13%. Comparing base (9199a82) to head (d1eb007).
✅ All tests successful. No failed tests found.

Additional details and impacted files

see 9 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9199a82...d1eb007. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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