Releases: krzysztofzablocki/Sourcery
Releases · krzysztofzablocki/Sourcery
1.0.3
Internal Changes
- updated xcodeproj, Stencil and StencilSwiftKit to newest versions
Bug fixes
- Fixes type resolution when using xcode project integration
- Matches the behaviour of
allMethods
toallVariables
by only listing the same method once, even if defined in both base protocol and extended class. You could still walk the inheritance tree if you need to (to get all original methods), but for purpose of majority of codegen this is unneccessary.
1.0.2
Bug fixes
- Fixes an issue when a very complicated variable initialization that contained
.init
call to unrelated case would cause the parser to assume the whole codeblock was a type and that could lead to mistakes in processing and even stack overflows
1.0.1
Internal Changes
- Updated project and CI to Xcode 12.1
- Updated SourceKitten, Commander.
Bug fixes
- Fix multiline method declarations parsing
- Fix an issue, where "types.implementing." did not work due to an additional module name.
- Using tuple for associated values in enum case is deprecated since Swift 5.2. Fix AutoEquatable and AutoHashable templates to avoid the warning (#842)
1.0.0
New Features
- Added support for associated types (#539)
Bug fixes
- Disallow protocol compositions from being considered as the
rawType
of anenum
(#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)
0.18.0
New Features
- Added
optional
filter for variables - Added
json
filter to output raw JSON objects - Added
.defaultValue
toAssociatedValue
- 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
andtypesaliasesByName
- 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)
0.17.0
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
0.16.2
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
0.16.1
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.
0.16.0
- 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 ofarguments
, 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 fromHashable
, 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.
0.15.0
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