groue / GRMustache.swift

Flexible Mustache templates for Swift
http://mustache.github.com/
MIT License
597 stars 155 forks source link

Swift Package Manager #23

Closed mackoj closed 8 years ago

mackoj commented 8 years ago

Hi,

I have this issue when I try to use GRMustache.swift with Swift Package Manager. Zewo/Mustache which is a fork of GRMustache.swift seems to work with Swift Package Manager.

➜  MyPackage swift build
Cloning https://github.com/groue/GRMustache.swift
Using version 1.0.0 of package GRMustache.swift
Compiling Swift Module 'Mustache' (32 sources)
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Context.swift:218:18: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
    private enum Type {
                 ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Context.swift:218:18: note: backticks can escape this name if it is important to use
    private enum Type {
                 ^~~~
                 `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Context.swift:218:18: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
    private enum Type {
                 ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Context.swift:218:18: note: backticks can escape this name if it is important to use
    private enum Type {
                 ^~~~
                 `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:80:46: warning: '++' is deprecated: it will be removed in Swift 3
                        self.indentationLevel++
                                             ^~
                                              += 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:86:46: warning: '--' is deprecated: it will be removed in Swift 3
                        self.indentationLevel--
                                             ^~
                                              -= 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:80:46: warning: '++' is deprecated: it will be removed in Swift 3
                        self.indentationLevel++
                                             ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:86:46: warning: '--' is deprecated: it will be removed in Swift 3
                        self.indentationLevel--
                                             ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateAST.swift:38:10: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
    enum Type {
         ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateAST.swift:38:10: note: backticks can escape this name if it is important to use
    enum Type {
         ^~~~
         `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateAST.swift:38:10: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
    enum Type {
         ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateAST.swift:38:10: note: backticks can escape this name if it is important to use
    enum Type {
         ^~~~
         `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:383:14: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
        enum Type {
             ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:383:14: note: backticks can escape this name if it is important to use
        enum Type {
             ^~~~
             `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:383:14: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
        enum Type {
             ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:383:14: note: backticks can escape this name if it is important to use
        enum Type {
             ^~~~
             `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:62:21: warning: '++' is deprecated: it will be removed in Swift 3
                    ++lineNumber
                    ^~
                                 += 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:77:21: warning: '++' is deprecated: it will be removed in Swift 3
                    ++lineNumber
                    ^~
                                 += 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:126:21: warning: '++' is deprecated: it will be removed in Swift 3
                    ++lineNumber
                    ^~
                                 += 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:248:21: warning: '++' is deprecated: it will be removed in Swift 3
                    ++lineNumber
                    ^~
                                 += 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:266:21: warning: '++' is deprecated: it will be removed in Swift 3
                    ++lineNumber
                    ^~
                                 += 1
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateToken.swift:25:10: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
    enum Type {
         ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateToken.swift:25:10: note: backticks can escape this name if it is important to use
    enum Type {
         ^~~~
         `Type`
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateToken.swift:25:10: error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression
    enum Type {
         ^
/Users/jeffreymacko/project/MyPackage/Packages/GRMustache.swift-1.0.0/Sources/TemplateToken.swift:25:10: note: backticks can escape this name if it is important to use
    enum Type {
         ^~~~
         `Type`
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a.xctoolchain/usr/bin/swift-build-tool", "-f", "/Users/jeffreymacko/project/MyPackage/.build/debug/Mustache.o/llbuild.yaml"]
groue commented 8 years ago

It used to work, so SPM has evolved since. Do you understand what the issues are?

mackoj commented 8 years ago

I think it's due to enum Type and private enum Type because it generate this error error: type member may not be named 'Type', since it would conflict with the 'foo.Type' expression and the compiler advice us to use back-ticks to fix it