fix(preset): remove unnecessary mutable reference warning#169
Conversation
Remove `emit_mutable_warning()` and `GitHubVersion::is_mutable()` as mutable references (tags, branches) are the standard way to reference presets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 addresses an issue where tag-based version specifiers were incorrectly triggering mutable reference warnings during preset loading. By removing the warning mechanism, the system now correctly handles these common versioning patterns without generating unnecessary alerts, leading to a cleaner and more intuitive user experience. Highlights
Changelog
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
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #169 +/- ##
==========================================
- Coverage 89.63% 89.62% -0.02%
==========================================
Files 38 38
Lines 7195 7178 -17
==========================================
- Hits 6449 6433 -16
+ Misses 746 745 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request removes the warning for mutable preset references, such as tags and branches. The changes are straightforward, involving the removal of the emit_mutable_warning function, its call site, the GitHubVersion::is_mutable helper function, and their associated tests. The implementation correctly aligns with the stated goal of allowing tag-based version specifiers without generating warnings. The changes are self-contained, and I found no issues with the implementation.
The mutable reference warning was removed from the codebase, so the corresponding documentation is now outdated: the caution block in extends.md and the troubleshooting section in common-issues.md both describe behavior that no longer exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Why
@v1should be supported without warningsWhat
emit_mutable_warning()and its call siteGitHubVersion::is_mutable()and its associated tests, which were only used byemit_mutable_warning