objc-diff icon indicating copy to clipboard operation
objc-diff copied to clipboard

Swift support

Open victor-pavlychko opened this issue 4 years ago • 0 comments

Hey Matt!

Some time ago, I was looking for a “user-friendly” way to browse changes in the SDK and started https://sdk.news. I built a simple crawler to collect the data from developer.apple.com 😱

Recently, I found your project and started experimenting with objc-diff and SwiftSyntax to implements swift API diffing.

My fork introduces the following changes:

  • converted the project to the swift package manage and slightly restructured the original app itself into separate modules: main, objc diffing, reporting
  • implemented syntax analyzer library based on SwiftSyntax
  • implemented swift diffing and integrated it into the project

The implementation has some quirks; specifically, I can think of the following limitations:

  • I only focused on swiftinterface files; multiple source files are not supported
  • I assumed that all type names are fully qualified which seems to be the case for swiftinterface files

This still early work, but looks like I can successfully generate diff for SwiftUI for iOS 15! Please let me know if you are interested in merging such changes upstream once I’m done with the functionality. Here is the link to my current changes — https://github.com/victor-pavlychko/objc-diff/pulls

Additionally, as I already have a domain, I would like to propose starting a GitHub team/project to publish diffs there 🙂

victor-pavlychko avatar Sep 19 '21 19:09 victor-pavlychko