Conversation
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 significantly improves the user experience during builds by adding the capability to display the name of the target currently being processed directly within the build progress output. This enhancement provides immediate feedback on which part of the project is active, making it easier to monitor and understand the build flow, especially in large multi-target projects. The change is configurable via a new policy, allowing users to tailor the verbosity of their build logs. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 adds a useful feature to display the target name in the build progress output. The implementation is solid, introducing a new policy and making the progress system aware of the current build job's context via coroutines. My review includes suggestions for improving code consistency by using the new helper functions everywhere, simplifying some of the new logic, and cleaning up redundant formatting codes in progress messages now that the new system handles target name display automatically.
I am having trouble creating individual review comments. Click here to see my feedback.
xmake/modules/private/action/build/target.lua (483-485)
For consistency with other changes in this file and to leverage the new helper function, please use progress_utils.set_target(opt.progress, target) here. This encapsulates the logic for setting the target name and includes necessary checks, making the code cleaner and more robust.
progress_utils.set_target(opt.progress, target)
xmake/modules/private/action/build/target.lua (547-549)
For consistency with other changes in this file and to leverage the new helper function, please use progress_utils.set_target(opt.progress, target) here. This encapsulates the logic for setting the target name and includes necessary checks, making the code cleaner and more robust.
progress_utils.set_target(opt.progress, target)
xmake/modules/utils/progress.lua (354-366)
This function's implementation can be simplified. The logic to determine show_target from the policy can be made more concise. You can directly assign the computed boolean to _g.show_target.
function _is_show_target_enabled()
if _g.show_target == nil then
_g.show_target = project.policy("build.progress_show_target") ~= false
end
return _g.show_target
end
xmake/modules/utils/progress.lua (388-391)
This block of code to prepend the target name prefix is duplicated in the text function (lines 507-510). To improve maintainability and follow the DRY principle, consider extracting this logic into a private helper function. This function could then be called from both show and text.
xmake/rules/c++/modules/builder.lua (615)
The progress.show function now automatically adds a colored target prefix, like ${color.build.target}<target>${clear} . Your format string also includes ${color.build.target}, which is now redundant. Please remove it to avoid unnecessary color codes.
progress.show(jobopt.progress, "generating.module.metadata %s", module.name)
xmake/rules/c++/modules/builder.lua (660)
Since the automatically-added target prefix in progress.show already ends with ${clear}, the ${clear} in this header variable is redundant. You can remove it to simplify the code.
local header = dim
xmake/rules/c++/modules/clang/scanner.lua (40)
The progress.show function now automatically adds a target prefix that ends with ${clear}. The ${clear} at the beginning of your format string is therefore redundant and can be removed.
progress.show(opt.progress, "generating.module.deps %s", sourcefile)
xmake/rules/c++/modules/gcc/scanner.lua (47)
The progress.show function now automatically adds a target prefix that ends with ${clear}. The ${clear} at the beginning of your format string is therefore redundant and can be removed.
progress.show(opt.progress, "scanning.module.deps %s", sourcefile)
xmake/rules/c++/modules/msvc/scanner.lua (48)
The progress.show function now automatically adds a target prefix that ends with ${clear}. The ${clear} at the beginning of your format string is therefore redundant and can be removed.
progress.show(opt.progress, "generating.module.deps %s", sourcefile)
xmake/rules/swift/xmake.lua (133)
The progress.show function now automatically adds a target prefix that ends with ${clear}. The ${clear} at the beginning of your format string is therefore redundant and can be removed.
progress.show(opt.progress, "generating.swift.header %s", headername)
#7364