Nexus: Remove unused/useless variables from nexus_core - #6198
Nexus: Remove unused/useless variables from nexus_core#6198brockdyer03 wants to merge 5 commits into
nexus_core#6198Conversation
…imulation` and `ProjectManager` accordingly
…e`, and simplify code that referenced them
…les from `nexus_core`
|
|
|
Static analysis (and partial runtime analysis) gives: |
|
The changes to verbose/debug result in errors and/or cause the logging to always be on. Fix. Details: |
…exus_core`, and simplify code that referenced them" This reverts commit 5e35c6e.
|
I expect the best way to address these issues is to revert the changes and then just reintroduce removals of the ones that actually do nothing. |
The ability to turn off logging was undocumented, and additionally is not what
These settings were also undocumented, untested, and produced unexpected behavior. While they may have served a purpose, the best plan is to remove them for now and consider possibly replacing them in the future. As of now they just introduce more legacy code baggage that isn't tested or documented. Here are responses to why these are not useful/expected:
These did nothing to actually change
This doesn't actually fully set up a calculation, you need
This is equivalent to
Undocumented no-op, useless.
This was redundant and never documented. |
|
The best solution for features that are not understood, but are useful, is documentation. We should include something like this in the manual rather than ripping out intentional, and intentionally preserved, functionality: Please limit this PR to true non-functional (does nothing) variables. |
|
Closing because it is replaced by #6207. |
Proposed changes
I noticed that there were a significant number of variables in
nexus_corethat were either unused, constant and unchangeable, or redundant. The complete list of removed variables is given below:modesmodemodeSettings.process_core_settings()stages_setstages, essentially always the samestagesmodeprimary_modesstagesdependent_modesstages_set, which is essentially always the case.verboseTrue.debugverbosetoTrue, butverboseis alwaysTrueno matter what.tracestatus_modesstatusstatusProjectManager.write_simulation_status(), butstandardandnonedo the same thing, and since every status other thanstandardandnoneare basically unreachable via the user, this is useless.emulateWhat type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Desktop, Fedora Linux 44 (KDE Plasma Desktop Edition)
AMD Ryzen 9 7900X (12 cores, 24 logical processors)
Checklist