Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Road to basic Linux compatibility #630

Closed
felix91gr opened this issue Jun 8, 2018 · 5 comments
Closed

Road to basic Linux compatibility #630

felix91gr opened this issue Jun 8, 2018 · 5 comments

Comments

@felix91gr
Copy link

I want to try and make a PR that lets you compile Sourcery and get basic, on-demand, templating working.

This idea has two goals:
a) Make Sourcery-based projects available for Linux
b) Make generation of the LinuxMain.swift file possible on Linux.

How should I start? @mxcl gave some hints at #306 but I don't really know how to make that more concrete.

@mxcl
Copy link
Contributor

mxcl commented Jun 9, 2018

I just pushed what work I did to my fork.

@felix91gr
Copy link
Author

felix91gr commented Jun 9, 2018

Thank you!

What's left to do in order to get a working "baseline Sourcery"?

I got this output:

Output of swift build
Fetching https://github.com/kylef/Commander.git
Fetching https://github.com/kylef/PathKit.git
Fetching https://github.com/jpsim/SourceKitten.git
Fetching https://github.com/IBM-Swift/CommonCrypto.git
Fetching https://github.com/SwiftGen/StencilSwiftKit.git
Fetching https://github.com/xcodeswift/xcproj.git
Fetching https://github.com/drmohundro/SWXMLHash.git
Fetching https://github.com/kylef/Spectre.git
Fetching https://github.com/kylef/Stencil.git
Fetching https://github.com/tadija/AEXML.git
Fetching https://github.com/JohnSundell/ShellOut.git
Fetching https://github.com/antitypical/Result.git
Fetching https://github.com/norio-nomura/Clang_C.git
Fetching https://github.com/norio-nomura/SourceKit.git
Fetching https://github.com/jpsim/Yams.git
Fetching https://github.com/tomlokhorst/XcodeEdit.git
Fetching https://github.com/Carthage/Commandant.git
Fetching https://github.com/seanparsons/SwiftTryCatch.git
Cloning https://github.com/seanparsons/SwiftTryCatch.git
Resolving https://github.com/seanparsons/SwiftTryCatch.git at e7074a72e4d4dc516f391bc4d4afd8ca6a845b4b
Cloning https://github.com/Carthage/Commandant.git
Resolving https://github.com/Carthage/Commandant.git at 0.12.0
Cloning https://github.com/drmohundro/SWXMLHash.git
Resolving https://github.com/drmohundro/SWXMLHash.git at 4.2.5
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.7.2
Cloning https://github.com/IBM-Swift/CommonCrypto.git
Resolving https://github.com/IBM-Swift/CommonCrypto.git at 0.1.5
Cloning https://github.com/JohnSundell/ShellOut.git
Resolving https://github.com/JohnSundell/ShellOut.git at 2.1.0
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.8.0
Cloning https://github.com/norio-nomura/Clang_C.git
Resolving https://github.com/norio-nomura/Clang_C.git at 1.0.2
Cloning https://github.com/kylef/Stencil.git
Resolving https://github.com/kylef/Stencil.git at 0.9.0
Cloning https://github.com/jpsim/SourceKitten.git
Resolving https://github.com/jpsim/SourceKitten.git at 0.18.4
Cloning https://github.com/jpsim/Yams.git
Resolving https://github.com/jpsim/Yams.git at 0.4.1
Cloning https://github.com/antitypical/Result.git
Resolving https://github.com/antitypical/Result.git at 3.2.4
Cloning https://github.com/tadija/AEXML.git
Resolving https://github.com/tadija/AEXML.git at 4.2.2
Cloning https://github.com/SwiftGen/StencilSwiftKit.git
Resolving https://github.com/SwiftGen/StencilSwiftKit.git at 2.3.0
Cloning https://github.com/xcodeswift/xcproj.git
Resolving https://github.com/xcodeswift/xcproj.git at 4.0.0
Cloning https://github.com/kylef/Commander.git
Resolving https://github.com/kylef/Commander.git at 0.6.1
Cloning https://github.com/norio-nomura/SourceKit.git
Resolving https://github.com/norio-nomura/SourceKit.git at 1.0.1
Cloning https://github.com/tomlokhorst/XcodeEdit.git
Resolving https://github.com/tomlokhorst/XcodeEdit.git at 1.1.0
error: could not find target(s): Sourcery; use the 'path' property in the Swift 4 manifest to set a custom target path

Edit: fixed it, but now I get a different error. I added path: "Sourcery" to the target called mainTarget.

This is what I get now. It might not be fixable, sounds like it depends on ObjC:

Output of swift build after adding custom path
home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Diffable.generated.swift:33:16: error: method cannot be marked @objc because its result type cannot be represented in Objective-C
    @objc func diffAgainst(_ object: Any?) -> DiffableResult {
               ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Diffable.generated.swift:33:47: note: classes not annotated with @objc cannot be represented in Objective-C
    @objc func diffAgainst(_ object: Any?) -> DiffableResult {
                                              ^~~~~~~~~~~~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Equality.generated.swift:29:26: error: declarations in extensions cannot override yet
    override public func isEqual(_ object: Any?) -> Bool {
                         ^
Foundation.NSObject:30:15: note: overridden declaration is here
    open func isEqual(_ object: Any?) -> Bool
              ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Attribute.swift:113:77: error: use of unresolved identifier 'NSException'
            guard let name: String = aDecoder.decode(forKey: "name") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["name"])); fatalError() }; self.name = name
                                                                            ^~~~~~~~~~~
SwiftGlibc.exception:1:15: note: did you mean 'exception'?
public struct exception {
              ^
Foundation.NSExpression:1:12: note: did you mean 'NSExpression'?
open class NSExpression : Foundation.NSObject, NSSecureCoding, NSCopying {
           ^
Foundation.NSExceptionName:2:15: note: did you mean 'NSExceptionName'?
public struct NSExceptionName : RawRepresentable, Equatable, Hashable {
              ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Attribute.swift:113:174: error: use of unresolved identifier 'getVaList'
            guard let name: String = aDecoder.decode(forKey: "name") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["name"])); fatalError() }; self.name = name
                                                                                                                                                                             ^~~~~~~~~
Swift.withVaList:16:13: note: did you mean 'withVaList'?
public func withVaList<R>(_ args: [CVarArg], _ body: (CVaListPointer) -> R) -> R
            ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Attribute.swift:114:99: error: use of unresolved identifier 'NSException'
            guard let arguments: [String: NSObject] = aDecoder.decode(forKey: "arguments") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["arguments"])); fatalError() }; self.arguments = arguments
                                                                                                  ^~~~~~~~~~~
SwiftGlibc.exception:1:15: note: did you mean 'exception'?
public struct exception {
              ^
Foundation.NSExpression:1:12: note: did you mean 'NSExpression'?
open class NSExpression : Foundation.NSObject, NSSecureCoding, NSCopying {
           ^
Foundation.NSExceptionName:2:15: note: did you mean 'NSExceptionName'?
public struct NSExceptionName : RawRepresentable, Equatable, Hashable {
              ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Attribute.swift:114:196: error: use of unresolved identifier 'getVaList'
            guard let arguments: [String: NSObject] = aDecoder.decode(forKey: "arguments") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["arguments"])); fatalError() }; self.arguments = arguments
                                                                                                                                                                                                   ^~~~~~~~~
Swift.withVaList:16:13: note: did you mean 'withVaList'?
public func withVaList<R>(_ args: [CVarArg], _ body: (CVaListPointer) -> R) -> R
            ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Attribute.swift:115:93: error: use of unresolved identifier 'NSException'
            guard let _description: String = aDecoder.decode(forKey: "_description") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["_description"])); fatalError() }; self._description = _description
                                                                                            ^~~~~~~~~~~
SwiftGlibc.exception:1:15: note: did you mean 'exception'?
public struct exception {
              ^
Foundation.NSExpression:1:12: note: did you mean 'NSExpression'?
open class NSExpression : Foundation.NSObject, NSSecureCoding, NSCopying {
           ^
Foundation.NSExceptionName:2:15: note: did you mean 'NSExceptionName'?
public struct NSExceptionName : RawRepresentable, Equatable, Hashable {
              ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Attribute.swift:115:190: error: use of unresolved identifier 'getVaList'
            guard let _description: String = aDecoder.decode(forKey: "_description") else { NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: getVaList(["_description"])); fatalError() }; self._description = _description
                                                                                                                                                                                             ^~~~~~~~~
Swift.withVaList:16:13: note: did you mean 'withVaList'?
public func withVaList<R>(_ args: [CVarArg], _ body: (CVaListPointer) -> R) -> R
            ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Method.swift:88:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftMethod) @objcMembers public final class Method: NSObject, SourceryModel, Annotated, Definition {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Class.swift:5:2: error: only classes that inherit from NSObject can be declared @objc
@objc(SwiftClass) @objcMembers public final class Class: Type {
~^~~~
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:9:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:18:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:29:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:218:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:38:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:218:25: note: overridden declaration is here
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:47:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:59:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:69:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:218:25: note: overridden declaration is here
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:79:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:91:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:105:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:114:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:122:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:142:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:156:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:218:25: note: overridden declaration is here
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:164:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:218:25: note: overridden declaration is here
    override public var description: String {
                        ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:172:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:190:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:200:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:209:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:250:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:261:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
/home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/Sources/SourceryRuntime/Description.generated.swift:269:25: error: declarations in extensions cannot override yet
    override public var description: String {
                        ^
Foundation.NSObject:56:14: note: overridden declaration is here
    open var description: String { get }
             ^
error: terminated(1): /home/felix/.swiftenv/versions/4.0/usr/bin/swift-build-tool -f /home/felix/Documents/Programming/AwesomeSystemSwift/InternalWork/LinuxMainSynth/custom-sourcery/.build/debug.yaml main

@krzysztofzablocki
Copy link
Owner

@felix91gr it looks like you just need to change base to NSObject, and tweak couple of declarations to happen inside the definition and not extension, the error messages here are looking normal, those changes are just required with newer toolchain

@felix91gr
Copy link
Author

it looks like you just need to change base to NSObject

I understood this on principle, but I looked up those classes and all of them directly or transitively inherit from NSObject. I must be missing something 🤔

the error messages here are looking normal, those changes are just required with newer toolchain

Which toolchain should I use? I was using Swift 4.0 to compile these.

@art-divin
Copy link
Collaborator

This is implemented with #1188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants