Feature flags are commonly used to enable gradual rollout or experiment with new features. In a few cases, even after the purpose of the flag is accomplished, the code pertaining to the feature flag is not removed. We refer to such flags as stale flags. The presence of code pertaining to stale flags can have the following drawbacks. Unnecessary code clutter increases the overall complexity w.r.t maintenance resulting in reduced developer productivity The flags can interfere with other experimental flags (e.g., due to nesting under a flag that is always false) Presence of unused code in the source as well as the binary. Stale flags can also cause bugs. Piranha is a tool to automatically refactor code related to stale flags. At a higher level, the input to the tool is the name of the flag and the expected behavior, after specifying a list of APIs related to flags in a properties file.

Features

  • Unnecessary code clutter increases the overall complexity w.r.t maintenance resulting in reduced developer productivity
  • The flags can interfere with other experimental flags (e.g., due to nesting under a flag that is always false)
  • Presence of unused code in the source as well as the binary
  • Stale flags can also cause bugs
  • Piranha is licensed under the Apache 2.0 license
  • Piranha is a tool to automatically refactor code related to stale flags

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow Piranha

Piranha Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Piranha!

Additional Project Details

Programming Language

Java

Related Categories

Java Libraries

Registered

2023-08-10