feat: Allow turning off error-context, auto-help, and auto-usage #4236
+1,980
−1,497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I originally hesitated over doing this because I do not want these feature flags to be a crutch. However, as I was analyzing where our size goes, I felt it'd be useful to see where the size goes broken up by major feature.
Features and sizes
Option
Removing everything gets you 422.6 KiB.
I collected the numbers based on subtracting from default because
color
s cost might scale with the number of features using it so I wanted to see the largest difference.I optimized
color
because I'm hoping we can get similar looking code in the future and wanted to see what the potential gains would look like.StyledStr
itself appears to be expensive and I'm hoping we can switch from delayed rendered to eager rendering to ANSI with conversion to wincon when needed.Fixes #1384