remove-feature-flag

Remove a feature flag from Cargo.toml, FeatureFlag enum, and runtime checks.

64.1k|5.4k|Updated Jul 8, 2021
One-click install
npx skills add https://github.com/warpdotdev/warp --skill remove-feature-flag-warpdotdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remove-feature-flag
Source: https://github.com/warpdotdev/warp/tree/main/.agents/skills/remove-feature-flag
Command: npx skills add https://github.com/warpdotdev/warp --skill remove-feature-flag-warpdotdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Remove a feature flag after it has been rolled out and stabilized in the Warp codebase. Flags that are no longer configurable and not needed for behavior complicate the codebase and future maintenance.

Core Features & Use Cases

  • Remove the flag from Cargo.toml feature lists and the default features so it is no longer compiled.
  • Remove the corresponding variant from the FeatureFlag enum and any conditional compilation blocks.
  • Eliminate runtime checks, keybindings, and dead code branches that reference the flag.
  • Ensure the project builds and tests pass after removal, with no remaining references to the flag.

Quick Start

Submit a PR that removes the feature flag from configuration, code paths, and runtime checks and then run the full build and tests.

Frequently Asked Questions about remove-feature-flag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely remove a feature flag from a Rust codebase after rollout?

To remove a feature flag, delete it from Cargo.toml feature lists, remove the corresponding FeatureFlag enum variant, eliminate conditional compilation blocks and runtime checks, then run a full build and tests to confirm no regressions.

What does removing a stabilized feature flag involve in Cargo and Rust?

Removing a stabilized feature flag involves cleaning up Cargo.toml default features, stripping the FeatureFlag enum variant, deleting conditional compilation and runtime check branches, and verifying the project builds and tests pass.

When should I retire a feature flag from my codebase?

You should retire a feature flag once it has been fully rolled out and stabilized, meaning it is no longer configurable and keeping it would complicate the codebase and future maintenance.

How do I clean up dead code branches left behind after removing a feature flag?

Clean up dead code branches by eliminating runtime checks, keybindings, and conditional compilation blocks that reference the removed flag, then validate by running the full build and test suite to ensure no remaining references.

Does removing a feature flag require running the full build and test suite?

Yes, removing a feature flag requires running the full build and test suite to validate that eliminating the flag from configuration, code paths, and runtime checks introduces no regressions or remaining references.