Shader_Minifier icon indicating copy to clipboard operation
Shader_Minifier copied to clipboard

Debugging quality of life imporvements: --preserve-crlf and --export-mapping [FILE]

Open LeStahL opened this issue 1 year ago • 2 comments

I noticed recently that it would be very nice to have certain debugging information available, like

  • A --preserve-crlf flag to preserve line numbers (because I find myself using clang-format to find lines in the minified source manually a lot).

  • The mapping of ids, in a format like

main="a"
main.fragColor="a.b"
trace="c"
trace.dist="c.d"
[email protected]="[email protected]"
unneccessary=""
 ...

maybe exposed over a command line parameter --export-mapping file.txt? This would simplify identifying the origin of expressions that break in the minified source.

LeStahL avatar Feb 27 '24 08:02 LeStahL

For the first point, wouldn't it be sufficient to use the existing --format indented flag?

eldritchconundrum avatar Feb 27 '24 10:02 eldritchconundrum

For the first point, wouldn't it be sufficient to use the existing --format indented flag?

Yes, that's exactly what I was looking for, thank you for pointing it out! (And sorry for not RTFM enough) :)

LeStahL avatar Feb 27 '24 10:02 LeStahL