Skip to content

Conversation

@IceTDrinker
Copy link
Contributor

  • bindgen via the CargoCallbacks can rerun the build script if headers and various files have changed
  • the header here being auto-generated it can appear as having changed vs. the build timestamp because it will always be generated after the script invokation so the timestamp can appear as having changed
  • disable the rerun on header change, given the header is unique for a given xsf version it should be fine

fixes: #131

hopefully

I have been able to verify that it was fixing the issue on my end and all the other rerun-if-changed emitted by bindgen are kept

Copy link
Owner

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

Yup, makes sense; thanks!

@IceTDrinker
Copy link
Contributor Author

IceTDrinker commented Oct 31, 2025

hey @jorenham I see an unrelated fail in the Lint job, should it be fixed here or do you plan on opening a separate PR to take care of it ? :)

@jorenham
Copy link
Owner

Ah lemme fix the new 1.91 clippy issue real quick in a separate PR

@jorenham jorenham added the enhancement New feature or request label Oct 31, 2025
@jorenham jorenham requested a review from Copilot October 31, 2025 15:40
@jorenham
Copy link
Owner

let's see what to robot has to say in the meantime

Copy link
Contributor

Copilot AI left a comment

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 optimizes the build script to avoid unnecessary reruns by disabling header file modification time tracking in bindgen's CargoCallbacks. Since the C++ header files are generated deterministically by the build script itself, their modification time changes shouldn't trigger rebuilds.

  • Adds .rerun_on_header_files(false) to the bindgen CargoCallbacks configuration

@jorenham
Copy link
Owner

the new clippy warnings are fixed on master, so if you could rebase this then those checkmarks should turn nice and green

- bindgen via the CargoCallbacks can rerun the build script if headers and
various files have changed
- the header here being auto-generated it can appear as having changed vs.
the build timestamp because it will always be generated after the script
invokation so the timestamp can appear as having changed
- disable the rerun on header change, given the header is unique for a
given xsf version it should be fine
@IceTDrinker IceTDrinker force-pushed the am/fix/do-not-rerun-bindgen-on-autogenerated-header-change branch from 56afa15 to b7dadb4 Compare October 31, 2025 15:47
@IceTDrinker
Copy link
Contributor Author

rebase done

@IceTDrinker IceTDrinker requested a review from jorenham October 31, 2025 15:47
@jorenham jorenham enabled auto-merge October 31, 2025 15:58
@jorenham
Copy link
Owner

Did you by any chance notice any other issues? Otherwise I'll do a quick release now.

@jorenham jorenham merged commit 5864d21 into jorenham:master Oct 31, 2025
4 checks passed
@IceTDrinker
Copy link
Contributor Author

Not that I can think of no, I have a very limited usage to be able to use the mathematically stable primitives of scipy in rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xsf(build) reruns every time on a large project

2 participants