Linux support
Closed this issue · 7 comments
Looks like it should work on Linux #16 , but it actually throws tons of errors and warnings:
swift build
Compiling Swift Module 'Mustache' (32 sources)
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:81:232: error: cannot convert value of type 'String' to type 'NSString' in coercion
if (try! NSRegularExpression(pattern: "^CONTENT_TYPE\\s*:\\s*TEXT$", options: NSRegularExpressionOptions(rawValue: 0))).firstMatchInString(pragma, options: NSMatchingOptions(rawValue: 0), range: NSMakeRange(0, (pragma as NSString).length)) != nil {
^~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:88:239: error: cannot convert value of type 'String' to type 'NSString' in coercion
} else if (try! NSRegularExpression(pattern: "^CONTENT_TYPE\\s*:\\s*HTML$", options: NSRegularExpressionOptions(rawValue: 0))).firstMatchInString(pragma, options: NSMatchingOptions(rawValue: 0), range: NSMakeRange(0, (pragma as NSString).length)) != nil {
^~~~~~
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Template.swift:64:22: error: cannot convert value of type 'String' to type 'NSString' in coercion
let nsPath = path as NSString
^~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Template.swift:91:50: error: cannot convert value of type 'String' to type 'NSString' in coercion
let templateName = (URL.lastPathComponent! as NSString).stringByDeletingPathExtension
~~~~~~~~~~~~~~~~~~~~~^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/NSFormatter.swift:88:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/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 {
^
/home/saulius/temp/GRMustacheSPM/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`
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:178:54: error: type 'NSURL' has no member 'fileURLWithPath'
self.init(dataSource: URLDataSource(baseURL: NSURL.fileURLWithPath(directoryPath, isDirectory: true), templateExtension: templateExtension, encoding: encoding))
^~~~~ ~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:445:74: error: value of optional type 'String?' not unwrapped; did you mean to use '!' or '?'?
self.baseURLAbsoluteString = baseURL.URLByStandardizingPath!.absoluteString
^
!
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:468:37: error: cannot convert value of type 'String' to type 'NSString' in coercion
templateFilename = (normalizedName as NSString).stringByAppendingPathExtension(templateExtension)!
^~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:484:16: error: value of optional type 'String?' not unwrapped; did you mean to use '!' or '?'?
if templateAbsoluteString.rangeOfString(baseURLAbsoluteString)?.startIndex == templateAbsoluteString.startIndex {
^
!
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:484:91: error: value of optional type 'String?' not unwrapped; did you mean to use '!' or '?'?
if templateAbsoluteString.rangeOfString(baseURLAbsoluteString)?.startIndex == templateAbsoluteString.startIndex {
^
!
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:492:24: error: cannot convert value of type 'NSString' to type 'String' in coercion
return try NSString(contentsOfURL: NSURL(string: templateID)!, encoding: encoding) as String
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:528:37: error: cannot convert value of type 'TemplateID' (aka 'String') to type 'NSString' in coercion
let relativePath = (normalizedBaseTemplateID as NSString).stringByDeletingLastPathComponent.stringByReplacingOccurrencesOfString(bundle.resourcePath!, withString:"")
^~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:536:24: error: cannot convert value of type 'NSString' to type 'String' in coercion
return try NSString(contentsOfFile: templateID, encoding: encoding) as String
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:145:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:572:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:612:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:696:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1192:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1557:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:517:38: error: use of undeclared type 'NSFastEnumeration'
if let enumerable = self as? NSFastEnumeration {
^~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:521:43: error: use of unresolved identifier 'NSFastGenerator'
let array = GeneratorSequence(NSFastGenerator(enumerable)).map(BoxAnyObject)
^~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:621:43: error: value of type 'NSNumber' has no member 'objCType'
let objCType = String.fromCString(self.objCType)!
^~~~ ~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:650:13: error: use of unresolved identifier 'NSLog'
NSLog("GRMustache support for NSNumber of type \(objCType) is not implemented: value is discarded.")
^~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:697:20: error: cannot convert value of type 'NSString' to type 'String' in coercion
return Box(self as String)
^~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:906:9: error: use of unresolved identifier 'NSLog'
NSLog("Mustache.BoxAnyObject(): value `\(object)` is does not conform to MustacheBoxable: it is discarded.")
^~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1202:39: error: use of unresolved identifier 'NSFastGenerator'
let array = GeneratorSequence(NSFastGenerator(self)).map(BoxAnyObject)
^~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1560:52: error: use of unresolved identifier 'NSFastGenerator'
dictionaryValue: GeneratorSequence(NSFastGenerator(self)).reduce([String: MustacheBox](), combine: { (boxDictionary, key) in
^~~~~~~~~~~~~~~
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/home/saulius/Downloads/swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a-ubuntu15.10/usr/bin/swift-build-tool", "-f", "/home/saulius/temp/GRMustacheSPM/.build/debug/Mustache.o/llbuild.yaml"]
Hello @saulius. Which version of Swift do you target, and which branch are you using?
@groue version is visible in the output swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a-ubuntu15.10
, it also fails with slightly older versions too. I'm trying to build your project https://github.com/groue/GRMustacheSPM .
@sauliusgrigaitis OK so I guess Swift has evolved since. Dev snapshots are bleeding edge, and break things. You know that, don't you?
@groue as I wrote above "it also fails with slightly older versions too":
saulius@necolt:~/temp/GRMustacheSPM$ swift build
Compiling Swift Module 'Mustache' (32 sources)
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:47:20: error: value of type 'String' has no member 'substringFromIndex'
return templateString.substringFromIndex(index).hasPrefix(string)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:62:21: warning: '++' is deprecated: it will be removed in Swift 3
++lineNumber
^~
+= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:77:21: warning: '++' is deprecated: it will be removed in Swift 3
++lineNumber
^~
+= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:126:21: warning: '++' is deprecated: it will be removed in Swift 3
++lineNumber
^~
+= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:143:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:154:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:165:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:176:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:187:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:198:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:209:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:220:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex.successor()..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:231:39: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:248:21: warning: '++' is deprecated: it will be removed in Swift 3
++lineNumber
^~
+= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:251:35: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:266:21: warning: '++' is deprecated: it will be removed in Swift 3
++lineNumber
^~
+= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateParser.swift:269:35: error: value of type 'String' has no member 'substringWithRange'
let content = templateString.substringWithRange(tagInitialIndex..<i)
^~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:80:34: error: value of type 'String' has no member 'stringByTrimmingCharactersInSet'
let pragma = content.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:394:25: error: value of type 'String' has no member 'stringByTrimmingCharactersInSet'
let blockName = string.stringByTrimmingCharactersInSet(whiteSpace)
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateCompiler.swift:407:27: error: value of type 'String' has no member 'stringByTrimmingCharactersInSet'
let partialName = string.stringByTrimmingCharactersInSet(whiteSpace)
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Template.swift:64:22: error: cannot convert value of type 'String' to type 'NSString' in coercion
let nsPath = path as NSString
^~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Template.swift:91:50: error: cannot convert value of type 'String' to type 'NSString' in coercion
let templateName = (URL.lastPathComponent! as NSString).stringByDeletingPathExtension
~~~~~~~~~~~~~~~~~~~~~^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/NSFormatter.swift:88:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:113:38: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:116:38: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:119:38: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:125:42: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:134:42: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:147:38: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:151:38: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:155:38: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:162:42: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:172:42: error: value of type 'String' has no member 'substringWithRange'
let identifier = string.substringWithRange(identifierStart..<i)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:295:34: error: value of type 'String' has no member 'substringFromIndex'
let identifier = string.substringFromIndex(identifierStart)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/ExpressionParser.swift:303:34: error: value of type 'String' has no member 'substringFromIndex'
let identifier = string.substringFromIndex(identifierStart)
^~~~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:178:54: error: type 'NSURL' has no member 'fileURLWithPath'
self.init(dataSource: URLDataSource(baseURL: NSURL.fileURLWithPath(directoryPath, isDirectory: true), templateExtension: templateExtension, encoding: encoding))
^~~~~ ~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:445:74: error: value of optional type 'String?' not unwrapped; did you mean to use '!' or '?'?
self.baseURLAbsoluteString = baseURL.URLByStandardizingPath!.absoluteString
^
!
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:455:34: error: value of type 'String' has no member 'substringFromIndex'
normalizedName = name.substringFromIndex(name.startIndex.successor())
^~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:468:37: error: cannot convert value of type 'String' to type 'NSString' in coercion
templateFilename = (normalizedName as NSString).stringByAppendingPathExtension(templateExtension)!
^~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:484:16: error: value of type 'String?' has no member 'rangeOfString'
if templateAbsoluteString.rangeOfString(baseURLAbsoluteString)?.startIndex == templateAbsoluteString.startIndex {
^~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:492:24: error: cannot convert value of type 'NSString' to type 'String' in coercion
return try NSString(contentsOfURL: NSURL(string: templateID)!, encoding: encoding) as String
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:516:34: error: value of type 'String' has no member 'substringFromIndex'
normalizedName = name.substringFromIndex(name.startIndex.successor())
^~~~ ~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:528:37: error: cannot convert value of type 'TemplateID' (aka 'String') to type 'NSString' in coercion
let relativePath = (normalizedBaseTemplateID as NSString).stringByDeletingLastPathComponent.stringByReplacingOccurrencesOfString(bundle.resourcePath!, withString:"")
^~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/TemplateRepository.swift:536:24: error: cannot convert value of type 'NSString' to type 'String' in coercion
return try NSString(contentsOfFile: templateID, encoding: encoding) as String
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:145:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:572:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:612:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:696:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1192:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1557:25: error: declarations in extensions cannot override yet
public override var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:516:16: note: overridden declaration is here
public var mustacheBox: MustacheBox {
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:517:38: error: use of undeclared type 'NSFastEnumeration'
if let enumerable = self as? NSFastEnumeration {
^~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:521:43: error: use of unresolved identifier 'NSFastGenerator'
let array = GeneratorSequence(NSFastGenerator(enumerable)).map(BoxAnyObject)
^~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:621:43: error: value of type 'NSNumber' has no member 'objCType'
let objCType = String.fromCString(self.objCType)!
^~~~ ~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:650:13: error: use of unresolved identifier 'NSLog'
NSLog("GRMustache support for NSNumber of type \(objCType) is not implemented: value is discarded.")
^~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:697:20: error: cannot convert value of type 'NSString' to type 'String' in coercion
return Box(self as String)
^~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:906:9: error: use of unresolved identifier 'NSLog'
NSLog("Mustache.BoxAnyObject(): value `\(object)` is does not conform to MustacheBoxable: it is discarded.")
^~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1202:39: error: use of unresolved identifier 'NSFastGenerator'
let array = GeneratorSequence(NSFastGenerator(self)).map(BoxAnyObject)
^~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Box.swift:1560:52: error: use of unresolved identifier 'NSFastGenerator'
dictionaryValue: GeneratorSequence(NSFastGenerator(self)).reduce([String: MustacheBox](), combine: { (boxDictionary, key) in
^~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Localizer.swift:189:68: error: value of type 'String' has no member 'stringByReplacingOccurrencesOfString'
let localizableFormat = localizableFormatRendering.string.stringByReplacingOccurrencesOfString("%", withString: "%%").stringByReplacingOccurrencesOfString(Placeholder.string, withString: "%@")
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Localizer.swift:262:24: error: argument labels '(format:)' do not match any available overloads
return String(format: format)
^ ~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Localizer.swift:262:24: note: overloads for 'String' exist with these partially matching parameter lists: (_StringCore), (Character), (String.CharacterView), (_builtinUnicodeScalarLiteral: Int32), (unicodeScalarLiteral: String), (extendedGraphemeClusterLiteral: String), (stringLiteral: String), (_storage: _StringBuffer), (S), (stringInterpolation: String...), (stringInterpolationSegment: T), (stringInterpolationSegment: String), (stringInterpolationSegment: Character), (stringInterpolationSegment: UnicodeScalar), (stringInterpolationSegment: Bool), (stringInterpolationSegment: Float32), (stringInterpolationSegment: Float64), (stringInterpolationSegment: UInt8), (stringInterpolationSegment: Int8), (stringInterpolationSegment: UInt16), (stringInterpolationSegment: Int16), (stringInterpolationSegment: UInt32), (stringInterpolationSegment: Int32), (stringInterpolationSegment: UInt64), (stringInterpolationSegment: Int64), (stringInterpolationSegment: UInt), (stringInterpolationSegment: Int), (UnicodeScalar), (T), (String.UnicodeScalarView), (String.UTF16View), (String.UTF8View), (reflecting: T)
return String(format: format)
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/MustacheBox.swift:526:25: error: declarations in extensions cannot override yet
override public var description: String {
^
Foundation.NSObject:9:16: note: overridden declaration is here
public var description: String { get }
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/URLEscapeHelper.swift:70:16: error: value of type 'String' has no member 'stringByAddingPercentEncodingWithAllowedCharacters'
return string.stringByAddingPercentEncodingWithAllowedCharacters(s) ?? ""
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:61:30: error: use of unresolved identifier 'NSLog'
self.log = { NSLog($0) }
^~~~~
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:80:46: warning: '++' is deprecated: it will be removed in Swift 3
self.indentationLevel++
^~
+= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:86:46: warning: '--' is deprecated: it will be removed in Swift 3
self.indentationLevel--
^~
-= 1
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:80:46: warning: '++' is deprecated: it will be removed in Swift 3
self.indentationLevel++
^
/home/saulius/temp/GRMustacheSPM/Packages/GRMustache.swift-1.0.0/Sources/Logger.swift:86:46: warning: '--' is deprecated: it will be removed in Swift 3
self.indentationLevel--
^
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/home/saulius/Downloads/swift-2.2-SNAPSHOT-2016-01-06-a-ubuntu15.10/usr/bin/swift-build-tool", "-f", "/home/saulius/temp/GRMustacheSPM/.build/debug/Mustache.o/llbuild.yaml"]
@sauliusgrigaitis I can feel that you're upset, but please stop pasting tons of lines that I will not read: it does not help.
I'm not sorry if I did test my package on OSX, with success, despite your insinuations, and that you thought you could integrate this library on linux in a snap. Now if you want help, please choose your words, because I don't earn a living answering questions on Github.
Great. I'm glad you found your solution. Happy templating!