Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate Version.h if the git hash changes #16881

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NomAnor
Copy link
Contributor

@NomAnor NomAnor commented Sep 27, 2024

Prevous Version.h was not regenerated after it was initially created. This prevented an accurate commit hash in the About dialog when incrementally building from source.

Now the file is always rewritten when it's content is changed.

Fixes #16871

Prevous Version.h was not regenerated after it was initially created.
This prevented an accurate commit hash in the About dialog when
incrementally building from source.

Now the file is always rewritten when it's content is changed.
@maxwxyz maxwxyz added this to the 1.0 milestone Sep 28, 2024
@kadet1090
Copy link
Member

Does it impact build times?

@NomAnor
Copy link
Contributor Author

NomAnor commented Sep 29, 2024

If you change the HEAD commit (e.g. create new commit), you obiously have to rebuild all files that depend on Version.h. That seems to be around 67 build steps (mostly relinks). This could make builds take a little bit longer when you are actively creating new commits, but I would assume, that the changes in those commits will impact the build more than the Version.h file.

It would be nice if other developers can check that this works with other generators. I currently only tested on Linux with ninja. I can try make later. The copy_if_different function should prevent too much rebuilds.

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.

Git revision is not updated on incremental builds
3 participants