crystal tool dependencies
: Displaying compile-time source dependencies
#11481
Labels
crystal tool dependencies
: Displaying compile-time source dependencies
#11481
The require order between the same files can change the semantics of the program even when the file contents remain unchanged, for example:
class T
, it must be required before any other file that definesclass T::U
, otherwiseT
would become a module;It seems there is no way to extract this information from the compiler, so I propose a new tool
dependencies
that shows the require chain and perhaps files loaded in macros as well. The default output format would be a tree of files similar tohierarchy
:Files already required do not branch again, so that the tree would always be finite.
Some additional output formats might be a flattened list of only the file names, a JSON, or a list of Makefile dependencies.
The text was updated successfully, but these errors were encountered: