fix: show which buildkit we're currently using if non standard#390
fix: show which buildkit we're currently using if non standard#390
Conversation
Signed-off-by: Giles Cope <gilescope@gmail.com>
➖ Are we earthbuild yet?No change in "earthly" occurrences 📈 Overall Progress
Keep up the great work migrating from Earthly to Earthbuild! 🚀 💡 Tips for finding more occurrencesRun locally to see detailed breakdown: ./.github/scripts/count-earthly.shNote that the goal is not to reach 0. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the clarity of the warning message displayed when the system detects that a non-standard Buildkit version is in use. By providing the expected and actual package names, it helps users quickly identify and resolve potential compatibility issues. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request improves the warning message for non-standard buildkit usage by including both the expected and actual package paths, which provides clearer diagnostic information. I have one suggestion to improve maintainability by avoiding a duplicated string.
| " expected: github.com/EarthBuild/buildkit\n"+ | ||
| " actual: %s", info.BuildkitVersion.Package) |
There was a problem hiding this comment.
The hardcoded string "github.com/EarthBuild/buildkit" is also used in the if condition on line 1153. To improve maintainability and avoid duplication, this string should be defined as a constant at the package level. This constant can then be used in both places.
While defining the constant and modifying the if statement is outside the scope of this diff, you can still avoid duplicating the string in this log message by using a format specifier and passing the string as an argument. This prepares the code for the eventual refactoring to a constant.
| " expected: github.com/EarthBuild/buildkit\n"+ | |
| " actual: %s", info.BuildkitVersion.Package) | |
| " expected: %s\n"+ | |
| " actual: %s", "github.com/EarthBuild/buildkit", info.BuildkitVersion.Package) |
Let't see what buildkit we're pointing to.