Untangle setting headers#66404
Conversation
|
This is an automated comment for commit 6e67edf with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
|
The changes LGTM. |
|
@Algunenano, what do you think about this? #58797 |
I'm planning on fixing it and hiding the object contents completely right after this PR. The idea is that the For the other 1%, we could have special functions (we already have some here and there) |
|
@Algunenano |
We could do for something like (using
Does that makes more sense? |
|
Yes, exactly. This is what was written in Alexey's issue I suppose 🤣 |
We are not passing, copying and modifying CurrentMetrics objects all the time. If everyone knows about Settings, everyone needs to know about BaseSettings and SettingEnums, and again adding a new setting or a value might involve rebuilding thousands of files. Most of the users never hold an object, just a reference, so it's more natural to not expose it. |
|
Another reason to prefer forward declarations: Many times when we use objects, it's by mistake: 56f497b. I should probably remove |
|
Yes, I'm in favor of this change. Maybe rename |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Documentation entry for user-facing changes
x
This is a step towards private Setting* objects, which is a step itself towards Setting categories.
Massively reduces the number of affected files when SettingEnums.h / Settings.h / MergeSettings.h are changed. For example changing
SettingEnums.hgoes from affecting ~2500 files to ~650, and Settings.h goes from ~1500 to ~550. This helps massively developing anything that relates to settings, or adding new settings.I'm merging this first since it's already affecting 440 files and it's only a refactor so far, but it's better to confirm everything is fine before doing additional, hundreds of, changes on top.
CI Settings (Only check the boxes if you know what you are doing):