Way for the swift compiler to display file dependency

Hello,

Let's say I have two files in the same directory:

dependency.swift
func func1() { print("ok") }

main.swift
func1()

Is there a way to run swiftc on main.swift that would work out that it needs dependency.swift and display that information to me?

Alternatively, can I run swiftc -dump-ast in a way that would look for dependencies in other files within the directory (and include them)?

I'm quite stuck as I'm not sure what place to look. Even the smallest nudge in the right direction would be greatly appreciated!

Cheers
Marcel

Terms of Service

Privacy Policy

Cookie Policy