7 Commits
Author SHA1 Message Date
Alexandre Podlewski d2e3d8bc4f Feature/typed throws support (#1401)
* Update Swift Syntax dependency

* Replace deprecated use of `throwsSpecifier` with `throwsClause.throwsSpecifier`

* Add support to typed throws for Method

* Add support to typed throws for Variables

* Add support to typed throws for Subscript

* Add support to typed throws for Closure

* Update AutoMokable stencil to support typed throws

* Consider throws(Never) as non throwing

* Add a flag on Method to know if the thrown error is a generic type

* Safely handle unsupported generic typed throws in AutoMockable template

* Test AutoMockable support for typed throws in inits

* Add missing code for Linux

* Prevent sourcery crash when running tests on Linux

* Fix Linux tests by removing nested types from tests as it cause a crash

This Linux crash is due to the encoding/decoding operation done with NSArchiver in Sourcery.swift (where requiresFileParserCopy is used)
This crash is due to an infinite loop while decoding nested Type because of a cycle between Type and itself (containedTypes / parent), also Type and Typealias have the same issue

* update internal boilerplate code.
2025-02-18 17:00:51 +01:00
Sergio Campamá ad01b78758 fix: Fixes description of Method's genericParameters (#1386) 2024-12-06 15:50:08 +01:00
Ruslan A 7153768c65 Fix associatedtype generics (#1345)
* Preliminary associatedtype support

* Implemented associatedtype support with generic requirements

* Fixed failing test

* Squashed commit of the following:

commit 9d01e6f99a
Author: Ruslan A <r.alikhamov@gmail.com>
Date:   Fri Jun 14 20:06:41 2024 +0400

    Improved concurrency support in SwiftTemplate caching (#1344)

* Removed test code

* Removed comment

* Updated Linux classes

* update internal boilerplate code.

* Updated generated code

* Removed warnings

* Updated expected file

* Updated expected file

* Adjusted protocol type for Linux

* Removed protocol composition due to Swift compiler crash under Linux
2024-06-19 22:50:18 +04:00
Ruslan Alikhamov 08567d9ec5 Disabled type resolving for local method generic parameters (#1327) 2024-05-01 19:51:17 +04:00
Ruslan Alikhamov 9fb3d03ada Added isDistributed to Actor and Method (#1318)
* Added isDistributed to Actor and Method

* update internal boilerplate code.
2024-03-29 03:57:04 +04:00
Ruslan Alikhamov 0032a6b9d7 Fixed typo (#1315) 2024-03-28 23:57:19 +04:00
Ruslan Alikhamov cec7895f0a Adjusted file structure to accommodate two generated files (#1299)
* Adjusted file structure to accommodate two generated files

* Adjusted scripting

* Removed Description, Diffable, Equality for now

* Removed Stencil import

* Updated templates

* Updated scripting

* Updated generated coding

* Disable build deletion (temp)

* Updated template

* Updated generated code

* updated generated code

* Updated generated code

* Adjusted scripting

* Updated scripting

* Updated generated code

* Reverted template deletion

* Removed Stencil imports

* Updated generated code

* trigger CI

* Removed description, diffable and equality stencil templates

* Reverted temporary changes

* Commented failing tests

* Skipping JSExport for description & hash

* Updated generated code

* Enabled failing tests

* Adding stencil templates back to test tests

* Reset generated file for linux for test

* Reverted Extensions for testing

* Reverted ParserResultsComposed

* Attempt to fix unit tests

* Attempt to resolve unit test

* Reverted TypeName asSource

* Reverted TypeName revertion

* Reverted revert of ParserResultComposed

* Reverted revert of Extensions

* Reverted revert of Linux.content.generated

* Reverted attempts to fix unit tests

* Fix for the failing codegen tests

* Added clarifying comment

* Removed description, diffable and equality stencil templates

* Updated generated code

* Tinkering with optimization level for speed boost

* Excluded stencil templates for codegen

* Fixed wrong compiler flag

* Removed speed optimization to a separate PR

* Reverted test code
2024-03-13 00:01:29 +04:00