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

refactor(build script): rewrite the main build script #2319

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jan 13, 2025

Previous build script were highly unstable and relied on the MM_DATETIME and MM_VERSION files which was very annoying. These files caused cargo to invalidate the build cache, so even if you ran cargo build multiple times without changing anything, it would still rebuild because the build script triggered cache invalidation.

This PR makes the build script straightforward and more stable without causing cache invalidation. The final versioning output remains as is, but the implementation side is robust than ever.

Major effects:

  • No more cache invalidations.
  • The MM_VERSION and MM_DATETIME files are no longer needed in the project root.
  • Datetime handling is now more stable. Previously MM_DATETIME file could become outdated as it wasn't consistently updated.

Get rid of annoying file reading/writing logics

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the cache-invalidation-fix branch from 3575651 to 5f4d0f6 Compare January 13, 2025 11:07
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to revise our docs... This is extremely outdated.

@onur-ozkan onur-ozkan marked this pull request as ready for review January 13, 2025 11:31
Copy link
Member Author

Choose a reason for hiding this comment

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

Since this is re-written from scratch, I suggest you to review this by opening the file directly as the diff view will make it likely impossible to understand the logic.

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

Successfully merging this pull request may close these issues.

1 participant