c3c icon indicating copy to clipboard operation
c3c copied to clipboard

Cmdline argument feature to list all files used for compilation

Open fvpfvpfvp opened this issue 2 years ago • 2 comments

Proposal Given a file C:/path/to/test.c3:

import std::io;
fn int main(char[][] argv) {
	io::println("Hello World!");
	return 0;
}

Calling 'c3c compile test.c3 --print-input' will yield the following output:

# input-files-begin
C:/path/to/test.c3
C:/path/to/std/io.c3
...
# input-files-end

And so forth, in the same style as the --print-output command. So all input files specified on the cmdline, all imported module files, all $include'd files, etc.

Relevance This is useful for external build systems, so they know they should rebuild when a file changes.

fvpfvpfvp avatar Aug 21 '23 17:08 fvpfvpfvp

Would it be fine to return it as json?

lerno avatar Aug 30 '23 12:08 lerno

Yes, sure!

fvpfvpfvp avatar Aug 31 '23 01:08 fvpfvpfvp

This is now in 0.5.6

lerno avatar Mar 26 '24 15:03 lerno