Thread overview
[Issue 21597] Compiler flag should output a "normalized" file without unittests and comments
Dec 17, 2022
Iain Buclaw
January 30, 2021
https://issues.dlang.org/show_bug.cgi?id=21597

Steven Schveighoffer <schveiguy@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy@gmail.com

--- Comment #1 from Steven Schveighoffer <schveiguy@gmail.com> ---
Note: if some comparison is to be done, it should remove all whitespace as well (spacing is actually something that does get changed)

--
January 31, 2021
https://issues.dlang.org/show_bug.cgi?id=21597

--- Comment #2 from Andrei Alexandrescu <andrei@erdani.com> ---
Yah, ideally normalization would be in some canonical format that is the same for all styles of coding.

--
January 31, 2021
https://issues.dlang.org/show_bug.cgi?id=21597

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moonlightsentinel@disroot.o
                   |                            |rg

--- Comment #3 from moonlightsentinel@disroot.org ---
Why should this be included in the compiler instead of being a seperate project using libdparse?

See e.g. the test extractor used by the `publictests` target for druntime/phobos.

--
January 31, 2021
https://issues.dlang.org/show_bug.cgi?id=21597

--- Comment #4 from Andrei Alexandrescu <andrei@erdani.com> ---
(In reply to moonlightsentinel from comment #3)
> Why should this be included in the compiler instead of being a seperate project using libdparse?
> 
> See e.g. the test extractor used by the `publictests` target for druntime/phobos.

A syntactic tool would be incomplete but probably still useful. It won't be able to do much with mixin-generated code.

As with other tools (dependency detection/management) the conclusion is that only the compiler has access to all information needed.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21597

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--