Skip to content

@krzysztofzablocki krzysztofzablocki released this Aug 14, 2020

New Features

  • Added support for associated types (#539)

Bug fixes

  • Disallow protocol compositions from being considered as the rawType of an enum (#830)
  • Add missing documentation for the ProtocolComposition type.
  • Fix incorrectly taking closure optional return value as sign that whole variable is optional (#823)
  • Fix incorrectly taking return values with closure as generic type as sign that whole variable is a closure (#845)
  • Fix empty error at build time when using SwiftTemplate on Xcode 11.4 and higher (#817)
Assets 3
  • 0.18.0
  • 29fbf77
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.18.0
  • 29fbf77
  • Compare
    Choose a tag to compare
    Search for a tag

@erichoracek erichoracek released this Apr 28, 2020 · 12 commits to master since this release

New Features

  • Added optional filter for variables
  • Added json filter to output raw JSON objects
  • Added .defaultValue to AssociatedValue
  • Added support for parsing Protocol Compositions
  • Added support for parsing free functions
  • Added support for indirect enum cases
  • Added support for accessing all typealiases via typealiases and typesaliasesByName
  • Added support for parsing global typealiases

Internal Changes

  • Improved error logging when running with --watch option
  • Updated CI to Xcode 11.4.1

Bug fixes

  • Fixed expansion of undefined environment variables (now consistent with command line behaviour, where such args are empty strings)
  • Fixed a bug in inferring extensions of Dictionary and Array types
  • Fixed a bug that was including default values as part of AssociatedValues type names
  • Fixed an issue with AutoMockable.stencil template when mocked function's return type was closure
  • Fixed missing SourceryRuntime dependency of SourceryFramework (SPM)
Assets 3

@krzysztofzablocki krzysztofzablocki released this Sep 3, 2019 · 36 commits to master since this release

Internal Changes

  • Parallelized combining phase that yields 5-10x speed improvement for New York Times codebase
  • Switched cache logic to rely on file modification date instead of content Sha256
  • Additional benchmark logs showing how long does each phase take
  • update dependencies to fix cocoapods setup when using Swift 5.0 everywhere. Update Quick to 2.1.0, SourceKitten to 0.23.1 and Yams to 2.0.0
Assets 3

@Liquidsoul Liquidsoul released this Jul 18, 2019 · 41 commits to master since this release

New Features

  • Support automatic linking of files generated by annotations to project target

Bug fixes

  • Fixes always broken sourcery cache
  • Add missing SourceryFramework library product in Package.swift
Assets 3

@Liquidsoul Liquidsoul released this Apr 29, 2019 · 53 commits to master since this release

Bug fixes

  • Fix ReceivedInvocations's type for the method which have only one parameter in AutoMockable.stencil
  • Fix missing folder error that could happen when running a Swift template with existing cache
  • Don't add indentation to empty line when using inline generated code.

Internal Changes

  • Removed dependency on SwiftTryCatch pod in order to avoid Swift Package Manager errors.
Assets 3

@Liquidsoul Liquidsoul released this Mar 8, 2019 · 64 commits to master since this release

  • Replaces environment variables inside .yml configurations (like ${PROJECT_NAME}), if a value is set.
  • Fixes warning in generated AutoMockable methods that have implicit optional return values
  • Support for optional methods in ObjC protocols
  • Support for parsing lazy vars into Variable's attributes.
  • Updated Stencil to 0.13.1 and SwiftStencilKit to 2.7.0
  • In Swift templates CLI arguments should now be accessed via argument instead of arguments, to be consistent with Stencil and JS templates.
  • Now in swift templates you can define types, extensions and use other Swift features that require file scope, without using separate files. All templates code is now placed at the top level of the template executable code, instead of being placed inside an extension of TemplateContext type.
  • Fixed missing generated code annotated with inline annotation when corresponding annotation in sources are missing. This generated code will be now present in *.generated.swift file.
  • Updated AutoHashable template to use Swift 4.2's hash(into:) method from Hashable, and enable support for inheritance.
  • Record all method invocations in the AutoMockable template.
  • Replace swiftc with the Swift Package Manager to build Swift templates
  • Swift templates can now be used when using a SPM build of Sourcery.
Assets 3

@ilyapuchka ilyapuchka released this Sep 23, 2018 · 97 commits to master since this release

New Features

  • You can now pass a json string as a command line arg or annotation and have it parsed into a Dictionary or Array to be used in the template.
  • Support for Xcode 10 and Swift 4.2
  • Updated Stencil to 0.12.1
Assets 3

@krzysztofzablocki krzysztofzablocki released this Aug 28, 2018 · 105 commits to master since this release

New Features

  • You can now include entire Swift files in Swift templates
  • You can now use AutoEquatable with annotations
  • Content from multiple file annotations will now be concatenated instead of writing only the latest generated content.

For example content generated by two following templates

// sourcery:file:Generated/Foo.swift
line one
// sourcery:end

and

// sourcery:file:Generated/Foo.swift
line two
// sourcery:end

will be written to one file:

line one

line two

Internal Changes

  • Use AnyObject for class-only protocols

Bug fixes

  • Fixed parsing associated enum cases in Xcode 10
  • Fixed AutoEquatable access level for == func
  • Fixed path of generated files when linked to Xcode project
  • Fixed extraction of inline annotations in multi line comments with documentation style
  • Fixed compile error when used AutoHashable in NSObject subclass.
Assets 3

@ilyapuchka ilyapuchka released this May 8, 2018 · 123 commits to master since this release

New Features

  • Added support for enums in AutoCodable template
  • You can now specify the base path for the Sourcery cache directory with a cacheBasePath key in the config file
Assets 3

@ilyapuchka ilyapuchka released this Apr 21, 2018 · 130 commits to master since this release

New Features

Bug fixes

  • Fixed parsing protocol method return type followed by declaration with attribute
  • Fixed inserting auto-inlined code on the last line of declaration body
  • AutoEquatable and AutoHashable templates should not add protocol conformances in extensions
Assets 3
You can’t perform that action at this time.