Skip to content

build: emit rerun-if-changed for cmake sources in cargo build scripts - #2472

Open
eclark0426 wants to merge 1 commit into
mainfrom
ellis/build-rerun-cmake-sources
Open

build: emit rerun-if-changed for cmake sources in cargo build scripts#2472
eclark0426 wants to merge 1 commit into
mainfrom
ellis/build-rerun-cmake-sources

Conversation

@eclark0426

Copy link
Copy Markdown
Contributor

No description provided.

@eclark0426 eclark0426 self-assigned this Jul 31, 2026
Copilot AI review requested due to automatic review settings July 31, 2026 15:56
@eclark0426
eclark0426 force-pushed the ellis/build-rerun-cmake-sources branch from 0c7f9da to 09d929d Compare July 31, 2026 15:56

Copilot AI 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.

Pull request overview

This PR improves Cargo build-script change tracking for the CMake-based execution build by explicitly emitting cargo:rerun-if-changed directives for key repository CMake/source inputs.

Changes:

  • Store the CMake source_dir in MonadCMake so it can be reused at build time.
  • Add emit_source_watches(...) to print cargo:rerun-if-changed for CMakeLists.txt and core source directories.
  • Invoke the watch emission before running the CMake build target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/crates/monad-build/src/cmake.rs Outdated
@eclark0426
eclark0426 force-pushed the ellis/build-rerun-cmake-sources branch from 09d929d to 68d07a7 Compare July 31, 2026 16:20
maxkozlovsky
maxkozlovsky previously approved these changes Aug 3, 2026

@maxkozlovsky maxkozlovsky 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.

Approving,
non-blocking suggestion - exclude test files from the watch list, third_party alone has >50K test files which aren't needed for dependency checks

@eclark0426
eclark0426 force-pushed the ellis/build-rerun-cmake-sources branch from 68d07a7 to 31cbb7c Compare August 4, 2026 14:15
@eclark0426
eclark0426 requested a review from maxkozlovsky August 4, 2026 14:27
@eclark0426
eclark0426 force-pushed the ellis/build-rerun-cmake-sources branch 2 times, most recently from 87b8f9e to 5519ae8 Compare August 4, 2026 18:05
@eclark0426
eclark0426 force-pushed the ellis/build-rerun-cmake-sources branch from 5519ae8 to 2dbb69d Compare August 4, 2026 18:05
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.

4 participants