-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph validation at compile-time #22
Comments
Should potentially work with https://github.com/jpsim/SourceKitten/pull/615/files |
SourceKitten still seems to not print out information about annotations. Postponing this one to 1.5.0 (or later). |
I am going to tackle that one again, version |
Could potentially work with |
In a nutshell @brototyp: my idea was as described above to check for circular dependencies and to check if all desired injections can be resolved successfully. I did not want to do any type of preprocessing magic in terms of what Java or Kotlin offers with the annotation preprocessor magic as it would not feel idiomatic for Swift / Xcode. So I thought about using something like SourceKitten to traverse the Sources, collect the use of DIKit with the AST (which is provided by SourceKitten) and then infer the actual graph for some validation. |
Hm. I see. And then the users of DIKit would add a build phase that basically just calls a script? I'll try to understand this on a high level, maybe I can help out 😊 |
Could be implemented by traversing the Sources and collect each
@Inject
for creating the dependency-graph. If no circular dependencies are found, continue with collecting information about the dependency container creations and derive the final module catalogue. From here on it is rather easy to validate.The text was updated successfully, but these errors were encountered: