Skip to content

Conversation

@jjl9807
Copy link
Collaborator

@jjl9807 jjl9807 commented Oct 14, 2025

This PR addresses two issues:

  • Prevents duplicate generation of build-script-related rules (e.g., buildscript_run), which previously caused build errors.
  • Introduces dynamic version injection (e.g., buckal 0.0.0 (108061b 2025-10-14)) to improve traceability in binaries.

@genedna genedna requested a review from Copilot October 16, 2025 02:53
Copy link

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 fixes duplicate build script rule generation and adds dynamic version injection with git metadata. The changes prevent build errors from duplicate buildscript_run rules and enhance version traceability by including git commit hash and date in the binary version string.

Key changes:

  • Refactored build script handling to eliminate duplicate rule generation by extracting patch logic into a reusable function
  • Implemented dynamic version string generation using build-time git metadata
  • Added a dedicated version subcommand to display the enhanced version information

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/buckify.rs Refactored build script rule generation to prevent duplicates by centralizing patching logic and removing redundant code blocks
src/main.rs Added build_version() function to generate version strings with git metadata using OnceLock for caching
src/commands/version.rs New version subcommand that displays the dynamically generated version string
src/commands/mod.rs Registered the new version command module
src/cli.rs Integrated dynamic version into CLI and added version subcommand handler
build.rs Build script to extract git commit hash and date at compile time

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@genedna genedna requested a review from Copilot October 17, 2025 16:02
@genedna genedna merged commit e77f11a into buck2hub:main Oct 17, 2025
5 checks passed
Copy link

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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