Skip to content

fix(preset): remove unnecessary mutable reference warning#169

Merged
fohte merged 2 commits intomainfrom
fohte/impl-runok-presets-rm-warning
Mar 8, 2026
Merged

fix(preset): remove unnecessary mutable reference warning#169
fohte merged 2 commits intomainfrom
fohte/impl-runok-presets-rm-warning

Conversation

@fohte
Copy link
Owner

@fohte fohte commented Mar 8, 2026

Why

  • Tag-based version specifiers like @v1 should be supported without warnings
    • Preset loading emitted an unnecessary warning for mutable references (tags and branches)

What

  • Remove emit_mutable_warning() and its call site
  • Remove GitHubVersion::is_mutable() and its associated tests, which were only used by emit_mutable_warning

Open with Devin

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>
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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

  • Warning Removal: Eliminated the unnecessary warning emitted for mutable preset references, specifically for tag-based version specifiers like @v1.
  • Code Cleanup: Removed the emit_mutable_warning() function and its associated call site, along with the GitHubVersion::is_mutable() method and its corresponding tests, as they are no longer needed.
Changelog
  • src/config/preset_remote.rs
    • Removed the is_mutable method from the GitHubVersion enum.
    • Deleted the emit_mutable_warning function.
    • Removed the call to emit_mutable_warning within the load_remote_preset function.
    • Removed tests related to GitHubVersion mutability.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

devin-ai-integration[bot]

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.62%. Comparing base (eff4b56) to head (ea44917).
⚠️ Report is 1 commits behind head on main.

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     
Flag Coverage Δ
Linux 89.48% <ø> (-0.02%) ⬇️
macOS 91.34% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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>
@fohte fohte merged commit c1d9d3c into main Mar 8, 2026
10 checks passed
@fohte fohte deleted the fohte/impl-runok-presets-rm-warning branch March 8, 2026 09:10
@fohte-bot fohte-bot bot mentioned this pull request Mar 8, 2026
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.

1 participant