Skip to content

Recompile when Prism headers change#3967

Merged
kddnewton merged 3 commits intoruby:mainfrom
eregon:recompile-when-headers-change
Mar 5, 2026
Merged

Recompile when Prism headers change#3967
kddnewton merged 3 commits intoruby:mainfrom
eregon:recompile-when-headers-change

Conversation

@eregon
Copy link
Member

@eregon eregon commented Mar 5, 2026

@Earlopain
Copy link
Collaborator

I think your previous PR can be reverted, since this covers that? I can check that tomorrow if you don't want to

@eregon
Copy link
Member Author

eregon commented Mar 5, 2026

Right, all *.c and *.h should be tracked, and if config.yml changes without changing those it shouldn't matter for the extension, i.e. it doesn't need to be recompiled then.
I'll push a revert of that commit.

eregon added 2 commits March 5, 2026 21:42
* This reverts commit ffe8f7a.
* No longer necessary as the Makefile depends on all *.c and *.h.
@eregon
Copy link
Member Author

eregon commented Mar 5, 2026

Done.
FWIW changing config.yml by e.g. adding a comment still recompiles everything most likely because the generated .h files are still regenerated (Prism::Template.render writes unconditionally) and get a new mtime. That's fine though (and not a common use case, most changes to config.yml would change .h/.c files).

Copy link
Collaborator

@kddnewton kddnewton left a comment

Choose a reason for hiding this comment

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

Oh nice that seems cleaner

@kddnewton kddnewton merged commit d4575f6 into ruby:main Mar 5, 2026
67 checks passed
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