Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Add SwiftSyntax as a dependency #1

Merged
merged 1 commit into from
Feb 3, 2020
Merged

Conversation

chriseidhof
Copy link
Contributor

I don't know if you want this, won't be offended if you close it without merging =). But as a user of SwiftSemantics there's no way around using SwiftSyntax, right?

@mattt
Copy link
Contributor

mattt commented Feb 3, 2020

Not at all! You're spot on with this patch — you really do need to have SwiftSyntax to use SwiftSemantics in its current form. This discrepancy arose from a last-minute decision to change the interface for declaration collection (previously, you passed Swift source as a String, and it took care of creating and walking the AST).

So my question to you, as an API consumer: Is it a better trade-off to require SwiftSyntax to keep flexibility in how to manage the AST? Or should SwiftSemantics aim to plug the leaky abstraction and provide an all-in-one encapsulation so that you could use it as a stand-alone?

@chriseidhof
Copy link
Contributor Author

Either way would work. There's no way around pulling in SwiftSyntax anyway, so why not just go with what they have? Makes everything more flexible, you'll have less code, and if they add other ways of loading files people will get it for free.

@mattt
Copy link
Contributor

mattt commented Feb 3, 2020

Thanks for weighing in. That sounds like the right approach. Merging this now, and making a note to myself to update it when I resolve #2.

@mattt mattt merged commit 55bf7ad into SwiftDocOrg:master Feb 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants