sou

SourceKittenFramework

An adorable little framework and command line tool for interacting with SourceKit.

Showing:

33 Versions

0.31.0

Breaking
  • SourceKitten now requires Swift 5.2 or higher to build.
    JP Simard

  • SourceKittenFramework can no longer be integrated as a Carthage depdendency.
    JP Simard

  • 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

  • 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)
    • sourcekitten module_info is now sourcekitten module-info
      JP Simard
Enhancements
  • None.
Bug Fixes

0.30.1

Breaking
  • None.
Enhancements
  • Add SwiftDeclarationAttributeKind values introduced in Swift 5.3.
    JP Simard
Bug Fixes
  • None.

0.30.0

Breaking
  • SourceKitten now requires Swift 5.1 or higher to build.
    JP Simard
Enhancements Bug Fixes

0.29.0

Breaking
  • 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 JP Simard
Enhancements
  • None.
Bug Fixes
  • Improve key.parsed_declaration in Swift 5.1+ for declarations on multiple lines without a body.
    John Fairhurst #633

0.28.0

Breaking
  • Replace many of the public extensions on String, and its internal caching mechanism CacheContainer, with a new StringView type.
    Paul Taykalo
Enhancements Bug Fixes
  • Fix crash when SourceKit returns out of bounds string byte offsets.
    JP Simard

0.27.0

Breaking
  • 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 #623
Enhancements
  • None.
Bug Fixes
  • None.

0.26.0

Breaking
  • SourceKitten now requires Swift 5.0 or higher to build.
    JP Simard
Enhancements
  • Support building SourceKitten with Swift 5.1.
    Pedro Larroy

  • Add new libclang types introduced between 0.49 and 0.59.
    JP Simard

  • Add new SwiftDeclarationAttributeKind and SwiftDeclarationKind members introduced in Swift 5.1.
    JP Simard

  • SyntaxKind now conforms to CaseIterable.
    JP Simard

Bug Fixes
  • Fix Swift response files for paths including special characters.
    John Fairhurst

0.25.0

Breaking
  • None.
Enhancements
  • Add --spm option to guess the name of a Swift Package Manager module for documentation generation.
    John Fairhurst

  • Support doc generation for modules built with Xcode 11.
    John Fairhurst

  • Add Module.init?(spmArguments:spmName:inPath) and use in doc command to ensure Swift Package Manager module documentation is up to date.
    John Fairhurst

Bug Fixes

0.24.0

Breaking
  • Change Module.init?(spmName:) to Module.init?(spmName:inPath:).
    Norio Nomura

  • SourceKitObjectConvertible now has SourceKitObject parameter requirement instead of sourcekitd_object_t. SourceKitObject isn't publicly initializable (this helps memory management).
    Colton Schlosser

  • Dictionary and Array now conditionally conform to SourceKitObjectConvertible, instead of crashing when using unexpected types.
    Colton Schlosser

Enhancements
  • Add cursorInfoUSR case to the Request.
    Timofey Solonin

  • Add a Dictionary<String, SourceKitRepresentable>.referencedUSRs computed property to retrieve referenced USRs from a SourceKit cursor info response.
    Colton Schlosser

Bug Fixes
  • Fix testCommandantDocsSPM failed on using Swift Package in Xcode 11, because Xcode 11 does not use SRCROOT as current directory on executing tests in Package.swift.
    Norio Nomura

  • Release memory created for sourcekitd requests.
    Colton Schlosser realm/SwiftLint#2812

0.23.2

Breaking
  • None.
Enhancements Bug Fixes
  • None.

0.23.1

Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • Fix warnings or errors when compiling in Swift 5 language mode.
    Yi Wang JP Simard

0.23.0

Breaking
  • None.
Enhancements
  • Introduce XcodeBuildSetting for interacting with project build settings.
    Chris Zielinski

  • Improve module name inference for Module.
    Chris Zielinski

  • Add Swift 5 support. Add new SwiftDeclarationAttributeKind and SwiftDeclarationKind members and make those enums conform to CaseIterable.
    Norio Nomura

Bug Fixes
  • “.swift”-suffixed directory in xcodebuild arguments no longer detected as Swift file.
    Minh Nguyễn #574

  • Fix xcodebuild clean path for new build system and Xcode 10.2.
    John Fairhurst realm/jazzy#1057

  • Pathnames containing shell-escaped characters in xcodebuild arguments no longer prevent documentation generation.
    John Fairhurst

  • swiftc no longer passed as a compiler argument when using doc and the new build system.
    John Fairhurst

0.22.0

Breaking
  • SourceKitten now requires Swift 4.2 or higher to build.
    JP Simard
Enhancements
  • Add Request.syntaxTree to get a serialized representation of the file's SwiftSyntax tree.
    JP Simard
Bug Fixes

0.21.3

This is the last release to support building with Swift 4.0 and Swift 4.1.

Breaking
  • 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

  • Use 'as' bridging on Linux when using Swift 4.2.
    JP Simard

Bug Fixes
  • None.

0.21.2

Breaking
  • None.
Enhancements
  • Add support for C-language annotations (e.g. __attribute__((annotate("This is an annotation")))).
    Jeff Verkoeyen

  • Improve support for building & running with Swift 4.2.
    Norio Nomura

  • Add new values for SwiftDeclarationAttributeKind and SyntaxKind with Swift 4.2.
    JP Simard

Bug Fixes
  • None.

0.21.1

Breaking
  • None.
Enhancements
  • None.
Bug Fixes

0.21.0

Breaking
  • SourceKitten now requires Swift 4.0 or higher to build.
    JP Simard
Enhancements
  • Make all SwiftDeclarationAttributeKind cases available no matter which version of Swift was used to compile SourceKitten.
    Marcelo Fabri
Bug Fixes
  • Fix issue locating libsourcekitdInProc.so on some Linux distributions.
    Mike Hovan #513

0.20.0

This is the last release to support Swift 3.2 and Swift 3.3. The next release will require Swift 4.0 or higher.

Breaking
  • Change type of parameter from sourcekitd_object_t to SourceKitObject?.

    • File.process(dictionary:cursorInfoRequest:syntaxMap:)
    • Request.customRequest(request:)
    • SwiftDocs.init(file:dictionary:cursorInfoRequest:) Norio Nomura
  • Remove File.lines:setter.
    Norio Nomura

Enhancements
  • Add SwiftDeclarationAttributeKind that represents declaration attributes in Swift.
    Daniel Metzing #504

  • Add SourceKitObject that represents sourcekitd_object_t in Swift.
    Norio Nomura #489

  • Replaced linear index search with binary search in NSString extension.
    Tamas Lustyik

  • SourceKit search strategy improved on Linux. Supports swiftenv.
    Alexander Lash

  • Add elements case to SwiftDocKey.
    Sho Ikeda

  • Added module_info command to sourcekitten CLI.
    Erik Abair

Bug Fixes

0.19.1

Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • Fix Swift Package Manager warnings when using SourceKitten targets as dependencies.
    JP Simard #478

0.19.0

Breaking
  • SourceKitten now requires Xcode 9 and Swift 3.2+ to build.
    Norio Nomura

  • Deprecated Request.failableSend(). Please use Request.send() instead.
    Norio Nomura

  • Some APIs changed to throws.

    • File.format(trimmingTrailingWhitespace:useTabs:indentWidth:) throws
    • Structure.init(file:) throws
    • SyntaxMap.init(file:) throws Norio Nomura
Enhancements Bug Fixes
  • Fix Swift declarations when generating Objective-C docs for generic types.
    John Fairhurst

0.18.4

Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • Fix Swift 4.0.2 deprecation warnings in dependencies, specifically SWXMLHash.
    Norio Nomura

0.18.3

Breaking
  • None.
Enhancements Bug Fixes
  • Preserve horizontal alignment in multi-line Swift declarations.
    John Fairhurst

0.18.2

Breaking
  • None.
Enhancements
  • Add tabWidth parameter (default: 1) for lineAndCharacter.
    Marcel Jackwerth

  • Add File(pathDeferringReading:) initializer.
    JP Simard

Bug Fixes
  • Fix Swift declarations when generating Objective-C docs being truncated where ampersands were included.
    JP Simard

0.18.1

Breaking
  • None.
Enhancements
  • Updates to support Xcode 9 beta 5 & accompanying versions of Swift 3.2/4.0.
    JP Simard
Bug Fixes
  • Fix compilation failures due to long debug times by removing compiler flag: -warn-long-function-bodies=200.
    Marcelo Fabri

0.18.0

Breaking
  • Xcode 8.3 or later and Swift 3.1 or later are required to build.
    Norio Nomura
Enhancements
  • Cache NSString.CacheContainer on Linux, matching behavior on Darwin, speeding up many repeated operations on NSString on Linux.
    JP Simard realm/SwiftLint#1577

  • Process Swift 3.2/4 doc comments.
    John Fairhurst

  • Support building with Xcode 9 beta 3 and the latest Swift 4 snapshots.
    JP Simard

Bug Fixes
  • None.

0.17.6

0.17.5

Just one change in this release, but it has a remarkable improvement on the quality & accuracy of Swift interfaces for Objective-C declarations when generating Objective-C docs.

  • Improve quality & accuracy of Swift interfaces for Objective-C declarations when generating Objective-C docs.
    Norio Nomura #385

0.17.4

Breaking
  • None.
Enhancements
  • Generate Swift declaration for more Objective-C methods.
    Zheng Li #376
Bug Fixes
  • Fix running sourcekitten version when building with Swift Package Manager.
    JP Simard

  • Fix crash in lineAndCharacter(forByteOffset:) with strings including multi-byte unicode characters.
    Marcelo Fabri realm/SwiftLint#1006

  • Fix compilation with latest Swift 4 snapshots.
    Norio Nomura

0.17.3

This release addresses some incorrect Swift doc associations where some declarations were confused as to which docs were theirs. Also some Linux & Swift snapshot fixes. Thanks @norio-nomura & @johnfairh 👏 🏆

Breaking
  • None.
Enhancements
  • None.
Bug Fixes

0.17.2

Breaking
  • None.
Enhancements
  • Update Cartfile.resolved & corresponding git submodule to point to Yams 0.3.1. Also loosen the Yams version dependency in Package.swift to only specify ~> 0.3 and not = 0.3.0.
    Norio Nomura
Bug Fixes
  • None.

0.17.1

This release is dedicated to flying cats. Dare to dream. And to @norio-nomura, @KelvinJin and @Lukas-Stuehrk for their contributions.

Breaking
  • None.
Enhancements
  • Added a new field numBytesToErase in CodeCompletionItem to indicate how many bytes should be deleted prior to the cursor in order to finish the completion.
    @KelvinJin

  • Support Swift 3.1 on macOS. sourcekitInProc appears to be broken on Linux as of Swift 3.1.
    Norio Nomura #348

Bug Fixes
  • Fix a crash that occurred when a documentation comment ended with an extended grapheme cluster.
    Lukas Stührk #350

0.17.0

Threads! We love to hate them. This release makes it safer to use SourceKitten in multi-threaded scenarios.

Breaking
  • Change Text enum case names to match Swift 3 API guidelines.
    @istx25
Enhancements
  • None.
Bug Fixes

0.16.0

Breaking
  • The SourceKitten CocoaPods podspec used to actually refer to SourceKittenFramework, so it has been renamed. Existing pushes to CocoaPods trunk will be preserved, but from now on if you use SourceKittenFramework via CocoaPods, please specify to use the SourceKittenFramework pod.
    JP Simard
Enhancements
  • Add Request.yaml API to create a sourcekit request from yaml and expose as a request --yaml [file|text] CLI command.
    Keith Smiley #312
Bug Fixes
  • None.