Skip to content

Hogmaker: Only rebuild the hog file if any input file changed#635

Closed
sebholt wants to merge 1 commit intoDescentDevelopers:mainfrom
sebholt:hogmaker_time_check
Closed

Hogmaker: Only rebuild the hog file if any input file changed#635
sebholt wants to merge 1 commit intoDescentDevelopers:mainfrom
sebholt:hogmaker_time_check

Conversation

@sebholt
Copy link
Contributor

@sebholt sebholt commented Oct 20, 2024

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

This lets the hogmaker (re)build the hogfile only if

  • the hog doesn't exist
  • the hogmaker executable is newer than the hog
  • the inputs source file is newer than the hog
  • any of the input files is newer than the hog

otherwise only "Already up to date" is printed.

In the build process this

  • reduces the build log spamming by hogmaker, especially in repeated builds where the hog doesn't change
  • reduces the filesystem io because the hog isn't overwritten with the same content all the time
  • keeps the hog timestamp as old as possible

Also some unused code is removed from the hogmaker.

Related Issues

Screenshots (if applicable)

Checklist

  • I have tested my changes locally and verified that they work as intended.
  • I have documented any new or modified functionality.
  • I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

Additional Comments

@winterheart
Copy link
Collaborator

I would like to retain ability to generate hog file no matter of what in cmd-line. Still, I understand your intentions and can propose alternative based on properly cmake dependencies detection. In result all hog files will be generated only if any of packed files was changed.

@sebholt
Copy link
Contributor Author

sebholt commented Oct 20, 2024

Still, I understand your intentions and can propose alternative based on properly cmake dependencies detection.

That'd be great. I'd prefer a CMake based solution which integrates into the build system more nicely.

@winterheart winterheart mentioned this pull request Oct 20, 2024
13 tasks
@sebholt
Copy link
Contributor Author

sebholt commented Oct 27, 2024

I'm closing this PR because we have a better CMake based solution in #637.

@sebholt sebholt closed this Oct 27, 2024
@sebholt sebholt deleted the hogmaker_time_check branch October 29, 2024 22:19
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.

2 participants