[SERVER-69704] Remove unused StatusWith::andThen, StatusWith::transform Created: 14/Sep/22 Updated: 29/Oct/23 Resolved: 30/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Service Arch 2022-10-03, Service Arch 2022-10-17 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
These are unused and make up the majority of StatusWith's implementation in terms of LoC, and a vast majority of its unit test is dedicated to testing these. andThen is used in one place but that place would be much better off without it. |
| Comments |
| Comment by Githook User [ 30/Sep/22 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Githook User [ 30/Sep/22 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 29/Sep/22 ] |
|
thanks! |
| Comment by Jacob Evans [ 29/Sep/22 ] |
|
Sure, go ahead and remove them. |
| Comment by Billy Donahue [ 29/Sep/22 ] |
|
jacob.evans@mongodb.com after 3 years these functions are unused. They represent about half of the bulk of the StatusWith class definition so they're making its API harder to navigate. The tests are also pretty intense. There was one use ( I would be interested in knowing whether there are places where these could be used but just haven't had the uptake. Would you object to removing them? |
| Comment by Billy Donahue [ 14/Sep/22 ] |