[PiranhaJava] Does not not clean up properly after removing feature flag
See original GitHub issueThe un-referenced methods inside the code Piranha cleaned up is not removed. I was hoping the code which is no more referenced after clean up (dummyMethod in below example) will also be removed and hence a deep cleanup.
Before:
public void bar() {
if (expt.flagDisabled(TestExperimentName.SAMPLE_STALE_FLAG)) {
System.out.println("Hi World");
dummyMethod();
}
}
private void dummyMethod() {
System.out.println("Dummy Method");
}
After:
public void bar() {
}
private void dummyMethod() {
System.out.println("Dummy Method");
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Issues · uber/piranha - GitHub
A tool for refactoring code related to feature flag APIs - Issues ... [PiranhaJava] Does not not clean up properly after removing feature...
Read more >Piranha: Reducing Feature Flag Debt at Uber - Manu Sridharan
Therefore, even when flags are completely rolled out, they may not necessarily be stale. • Flag ownership: Since flags were not cleaned up...
Read more >Introducing Piranha: An Open Source Tool to Automatically ...
Uber developed Piranha to seamlessly delete code related to obsolete feature flags, leading to improved developer productivity and a cleaner ...
Read more >Cleaning Up Unused Flags - DevCycle Docs
Cleaning Up Unused Flags. Overview. This article outlines practices to help minimize technical debt from feature flags.
Read more >How to Manage Outdated Feature Flags - Optimizely
Not cleaning up feature flags can introduce risk to your code base. Learn how Feature Flag Removal Day can lead to better feature...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Other variants of Piranha (Swift, JS) have already implemented some form of deep cleaning. AFAIK, Proguard may be able to delete the deadcode from bytecode but not from source. We expect to add this feature to PiranhaJava. Unfortunately, we haven’t yet gotten to this milestone yet.
@NikitashP We are working on making this much easier with a newer implementation of Piranha. See here. Please check it out as we expect it to be very customizable and adaptable for various use cases. cc @ketkarameya