98 curated breaking changes across major versions of sourcekitten. Use this as a migration checklist before bumping dependencies.
None. ##### Bug Fixes
Bazel users only: rules_swift 2.x is now required. [Luis Padron](https://github.com/luispadron) ##### Enhancements
Support docs generation with SwiftPM in Swift 5.10. Added new syntax, attribute and declaration kinds introduced in Swift 5.10. [John Fairhurst](https://github.com/johnfairh)
Added new syntax, attribute and declaration kinds introduced in Swift 5.8. [JP Simard](https://github.com/jpsim)
Added support for static\_assert declaration introduced in C11. [Zach Jaquish](https://github.com/jaquish) ##### Bug Fixes
Added new syntax, attribute and declaration kinds introduced in Swift 5.9. [John Fairhurst](https://github.com/johnfairh)
None. ##### Enhancements
None. ##### Enhancements
Add `Request.sendAsync()` function. [JP Simard](https://github.com/jpsim) [#759](https://github.com/jpsim/SourceKitten/issues/759) ##### Bug Fixes
Added support for bzlmod. [Keith Smiley](https://github.com/keith) ##### Bug Fixes
SourceKitten now requires Swift 5.7 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
None. ##### Enhancements
Add a `File.clearCaches()` function to clear a file's cached data. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
SourceKitten now requires Swift 5.6 or higher to build, and macOS 12 or higher to run. [JP Simard](https://github.com/jpsim)
SourceKitten now always uses the in-process version of sourcekitd on macOS. The `IN_PROCESS_SOURCEKIT` environment variable is ignored and the `SourceKittenConfiguration.preferInProcessSourceKit` API has been completely removed. [JP Simard](https://github.com/jpsim) ##### Enhancements
Adds Bazel Build Support. [Maxwell Elliott](https://github.com/maxwellE)
Support docs generation with Xcode 14 projects. [John Fairhurst](https://github.com/johnfairh) ##### Bug Fixes
SourceKitten now requires Swift 5.3 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
Support docs generation on Swift 5.6. [John Fairhurst](https://github.com/johnfairh)
Added `SwiftDeclarationAttributeKind` values introduced in Swift 5.6. [JP Simard](https://github.com/jpsim)
Add `IN_PROCESS_SOURCEKIT` environment variable, which causes to use the in-process version of sourcekitd on macOS. This avoids the use of XPC, which is prohibited in some sandboxed environments, such as in Swift Package Manager plugins. [Juozas Valancius](https://github.com/juozasvalancius) ##### Bug Fixes
Add `key.attributes` and `key.attribute` enum cases to `SwiftDocKey`. [Erick Sanchez](https://github.com/ErickESGoogle)
None. ##### Enhancements
Objective C Union support. [Brian Osborn](https://github.com/bosborn) [#705](https://github.com/jpsim/SourceKitten/issues/705)
Add `--prettify` and `--sort-keys` flags to complete command, both of which default to false. Previously these options were hardcoded to be enabled, which slowed down the command when processing large inputs. [Paul Taykalo](https://github.com/PaulTaykalo) [#710](https://github.com/jpsim/SourceKitten/issues/710)
Add new `SwiftDeclarationAttributeKind` members available starting with Swift 5.4/5.5. [John Fairhurst](https://github.com/johnfairh) ##### Bug Fixes
SourceKitten now requires Swift 5.2 or higher to build. [JP Simard](https://github.com/jpsim)
SourceKittenFramework can no longer be integrated as a Carthage depdendency. [JP Simard](https://github.com/jpsim)
`SourceKitten.xcworkspace` and `sourcekitten.xcproject` have been completely removed. You can still use Xcode to develop SourceKitten by opening it as a Swift Package by typing `xed .` or `xed Package.swift` from your shell. [JP Simard](https://github.com/jpsim)
The command line syntax has slightly changed due to migrating from the Commandant command line parsing library to swift-argument-parser. For the most part the breaking changes are all to make the syntax more unix compliant and intuitive to use. For example, commands such as `sourcekitten --help` or `sourcekitten -h` now work as expected. The help output from various commands has greatly improved as well. A few notable breaking changes:
`doc --spm-module` was removed (use `--spm --module-name` instead)
None. ##### Enhancements
Add `SwiftDeclarationAttributeKind` values introduced in Swift 5.3. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
SourceKitten now requires Swift 5.1 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
Update Yams to 4.0.0. [Keith Smiley](https://github.com/keith) [JP Simard](https://github.com/jpsim)
Add `SwiftDeclarationAttributeKind` values introduced in Swift 5.2. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
Fix crashes when parsing .m files. [Joe Laws](https://github.com/jlaws)
Stop the program immediately if the `xcodebuild` command fails. [John Fairhurst](https://github.com/johnfairh) [#643](https://github.com/jpsim/SourceKitten/issues/643)
Replace all uses of `Int`/`Int64`/`NSRange` representing byte offsets to use newly introduced `ByteCount` and `ByteRange` values instead. This will minimize the risk of accidentally using a byte-based offset in character-based contexts. [Paul Taykalo](https://github.com/PaulTaykalo) [JP Simard](https://github.com/jpsim) ##### Enhancements
None. ##### Bug Fixes
Improve `key.parsed_declaration` in Swift 5.1+ for declarations on multiple lines without a body. [John Fairhurst](https://github.com/johnfairh) [#633](https://github.com/jpsim/SourceKitten/issues/633)
Replace many of the public extensions on String, and its internal caching mechanism `CacheContainer`, with a new `StringView` type. [Paul Taykalo](https://github.com/PaulTaykalo) ##### Enhancements
Allow inline html tags in ObjC doc comments. [Chris Williams](https://github.com/ultramiraculous) [#409](https://github.com/jpsim/SourceKitten/issues/409) [realm/jazzy#976](https://github.com/realm/jazzy/issues/976)
Support code formatting in ObjC doc comments with `@c`, `@code` and `@endcode`. [Bryce Pauken](https://github.com/brycepauken) [#631](https://github.com/jpsim/SourceKitten/issues/631) ##### Bug Fixes
Fix crash when SourceKit returns out of bounds string byte offsets. [JP Simard](https://github.com/jpsim)
Update Commandant dependency to version 0.17.0, removing the `antitypical/Result` dependency in favor of the Swift standard library's `Result` type. [JP Simard](https://github.com/jpsim) [#623](https://github.com/jpsim/SourceKitten/issues/623) ##### Enhancements
None. ##### Bug Fixes
Add new libclang types introduced between 0.49 and 0.59. [JP Simard](https://github.com/jpsim)
SourceKitten now requires Swift 5.0 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
Support building SourceKitten with Swift 5.1. [Pedro Larroy](https://github.com/larroy)
Add new `SwiftDeclarationAttributeKind` and `SwiftDeclarationKind` members introduced in Swift 5.1. [JP Simard](https://github.com/jpsim)
`SyntaxKind` now conforms to `CaseIterable`. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
Add `--spm` option to guess the name of a Swift Package Manager module for documentation generation. [John Fairhurst](https://github.com/johnfairh)
Support doc generation for modules built with Xcode 11. [John Fairhurst](https://github.com/johnfairh)
None. ##### Enhancements
Add `Module.init?(spmArguments:spmName:inPath)` and use in `doc` command to ensure Swift Package Manager module documentation is up to date. [John Fairhurst](https://github.com/johnfairh) ##### Bug Fixes
Fix crash with misplaced documentation comment. [John Fairhurst](https://github.com/johnfairh)
Change `Module.init?(spmName:)` to `Module.init?(spmName:inPath:)`. [Norio Nomura](https://github.com/norio-nomura)
`SourceKitObjectConvertible` now has `SourceKitObject` parameter requirement instead of `sourcekitd_object_t`. SourceKitObject isn't publicly initializable (this helps memory management). [Colton Schlosser](https://github.com/cltnschlosser)
`Dictionary` and `Array` now conditionally conform to `SourceKitObjectConvertible`, instead of crashing when using unexpected types. [Colton Schlosser](https://github.com/cltnschlosser) ##### Enhancements
Add `cursorInfoUSR` case to the `Request`. [Timofey Solonin](https://github.com/biboran)
Add a `Dictionary<String, SourceKitRepresentable>.referencedUSRs` computed property to retrieve referenced USRs from a SourceKit cursor info response. [Colton Schlosser](https://github.com/cltnschlosser) ##### Bug Fixes
None. ##### Enhancements
Add parsed extension declarations to Swift docs. [John Fairhurst](https://github.com/johnfairh)
Make `File` conform to `Equatable` and `Hashable`. [Elliott Williams](https://github.com/elliottwilliams) ##### Bug Fixes
None. ##### Enhancements
None. ##### Bug Fixes
Fix warnings or errors when compiling in Swift 5 language mode. [Yi Wang](https://github.com/neakor) [JP Simard](https://github.com/jpsim)
None. ##### Enhancements
Introduce `XcodeBuildSetting` for interacting with project build settings. [Chris Zielinski](https://github.com/chriszielinski)
Improve module name inference for `Module`. [Chris Zielinski](https://github.com/chriszielinski)
Add Swift 5 support. Add new `SwiftDeclarationAttributeKind` and `SwiftDeclarationKind` members and make those enums conform to `CaseIterable`. [Norio Nomura](https://github.com/norio-nomura) ##### Bug Fixes
“.swift”-suffixed directory in xcodebuild arguments no longer detected as Swift file. [Minh Nguyễn](https://github.com/1ec5) [#574](https://github.com/jpsim/SourceKitten/issues/574)
Fix crash in `NSString.location(fromByteOffset:)` when using unicode characters. [JP Simard](https://github.com/jpsim) [realm/SwiftLint#2276](https://github.com/realm/SwiftLint/issues/2276)
SourceKitten now requires Swift 4.2 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
Add `Request.syntaxTree` to get a serialized representation of the file's SwiftSyntax tree. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
None. ##### Enhancements
If New Build System is enabled on Xcode, the `doc` command does not need to use the `clean` action on `xcodebuild`. [Norio Nomura](https://github.com/norio-nomura)
Use 'as' bridging on Linux when using Swift 4.2. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
None. ##### Enhancements
Add support for C-language annotations (e.g. `__attribute__((annotate("This is an annotation")))`). [Jeff Verkoeyen](https://github.com/jverkoey)
Improve support for building & running with Swift 4.2. [Norio Nomura](https://github.com/norio-nomura)
Add new values for `SwiftDeclarationAttributeKind` and `SyntaxKind` with Swift 4.2. [JP Simard](https://github.com/jpsim) ##### Bug Fixes
None. ##### Enhancements
None. ##### Bug Fixes
Support building with Swift 4.2. There are still runtime issues to resolve. [Norio Nomura](https://github.com/norio-nomura)
Fix a crash when running with Swift 4.2. [Norio Nomura](https://github.com/norio-nomura) [SR-7954](https://bugs.swift.org/browse/SR-7954)
Fix issue locating `libsourcekitdInProc.so` on some Linux distributions. [Mike Hovan](https://github.com/mhovan) [#513](https://github.com/jpsim/SourceKitten/issues/513)
SourceKitten now requires Swift 4.0 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
Make all `SwiftDeclarationAttributeKind` cases available no matter which version of Swift was used to compile SourceKitten. [Marcelo Fabri](https://github.com/marcelofabri) ##### Bug Fixes
SourceKitten now requires Swift 4.0 or higher to build. [JP Simard](https://github.com/jpsim) ##### Enhancements
Make all `SwiftDeclarationAttributeKind` cases available no matter which version of Swift was used to compile SourceKitten. [Marcelo Fabri](https://github.com/marcelofabri) ##### Bug Fixes
Fix issue locating `libsourcekitdInProc.so` on some Linux distributions. [Mike Hovan](https://github.com/mhovan) [#513](https://github.com/jpsim/SourceKitten/issues/513)
`SwiftDocs.init(file:dictionary:cursorInfoRequest:)` [Norio Nomura](https://github.com/norio-nomura)
Change type of parameter from `sourcekitd_object_t` to `SourceKitObject?`.
Remove `File.lines:setter`. [Norio Nomura](https://github.com/norio-nomura) ##### Enhancements
`File.process(dictionary:cursorInfoRequest:syntaxMap:)`
`Request.customRequest(request:)`
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/homebrew/sourcekitten