nicklockwood / Expression

A cross-platform Swift library for evaluating mathematical expressions at runtime
MIT License
824 stars 50 forks source link

Adding swift pm #3

Closed frranck closed 7 years ago

frranck commented 7 years ago

Hello; I had to rename a few directories and add a tag for a 0.3.0 version to respect their format; I could test it under linux and mac os x successfully referring to the package as: .Package(url: "https://github.com/frranck/Expression", Version(0,3,0)) Cheers Franck

frranck commented 7 years ago

This is the error I'm getting if I remove import foundation:

Compile Swift Module 'Expression' (1 sources) /Packages/Expression-0.3.0/Sources/Expression.swift:244:50: error: use of unresolved identifier 'sqrt' symbols[.function("sqrt", arity: 1)] = { sqrt($0[0]) } ^~~~ /Packages/Expression-0.3.0/Sources/Expression.swift:245:51: error: use of unresolved identifier 'floor' symbols[.function("floor", arity: 1)] = { floor($0[0]) } ^~~~~ /Packages/Expression-0.3.0/Sources/Expression.swift:246:50: error: use of unresolved identifier 'ceil' symbols[.function("ceil", arity: 1)] = { ceil($0[0]) } ^~~~ /Packages/Expression-0.3.0/Sources/Expression.swift:247:51: error: use of unresolved identifier 'round' symbols[.function("round", arity: 1)] = { round($0[0]) } ^~~~~ /Packages/Expression-0.3.0/Sources/Expression.swift:248:49: error: use of unresolved identifier 'cos' symbols[.function("cos", arity: 1)] = { cos($0[0]) } ^~~ Swift._cos:1:13: note: did you mean '_cos'? public func cos( x: Float) -> Float ^ Swift._cos:1:13: note: did you mean '_cos'? public func cos( x: Double) -> Double ^ /Packages/Expression-0.3.0/Sources/Expression.swift:249:50: error: use of unresolved identifier 'acos' symbols[.function("acos", arity: 1)] = { acos($0[0]) } ^~~~ Swift._cos:1:13: note: did you mean '_cos'? public func cos( x: Float) -> Float ^ Swift._cos:1:13: note: did you mean '_cos'? public func cos( x: Double) -> Double ^ /Packages/Expression-0.3.0/Sources/Expression.swift:250:49: error: use of unresolved identifier 'sin' symbols[.function("sin", arity: 1)] = { sin($0[0]) } ^~~ Swift.min:7:13: note: did you mean 'min'? public func min( x: T, y: T) -> T ^ Swift.min:10:13: note: did you mean 'min'? public func min( x: T, y: T, z: T, rest: T...) -> T ^ Swift._sin:1:13: note: did you mean '_sin'? public func sin( x: Float) -> Float ^ Swift._sin:1:13: note: did you mean '_sin'? public func sin( x: Double) -> Double ^ /Packages/Expression-0.3.0/Sources/Expression.swift:251:50: error: use of unresolved identifier 'asin' symbols[.function("asin", arity: 1)] = { asin($0[0]) } ^~~~ Swift._sin:1:13: note: did you mean '_sin'? public func sin( x: Float) -> Float ^ Swift._sin:1:13: note: did you mean '_sin'? public func sin( x: Double) -> Double ^ /Packages/Expression-0.3.0/Sources/Expression.swift:252:49: error: use of unresolved identifier 'tan' symbols[.function("tan", arity: 1)] = { tan($0[0]) } ^~~ /Packages/Expression-0.3.0/Sources/Expression.swift:253:50: error: use of unresolved identifier 'atan' symbols[.function("atan", arity: 1)] = { atan($0[0]) } ^~~~ /Packages/Expression-0.3.0/Sources/Expression.swift:257:49: error: use of unresolved identifier 'pow' symbols[.function("pow", arity: 2)] = { pow($0[0], $0[1]) } ^~~ /Packages/Expression-0.3.0/Sources/Expression.swift:260:51: error: use of unresolved identifier 'atan2' symbols[.function("atan2", arity: 2)] = { atan2($0[0], $0[1]) } ^~~~~ /Packages/Expression-0.3.0/Sources/Expression.swift:261:49: error: use of unresolved identifier 'fmod' symbols[.function("mod", arity: 2)] = { fmod($0[0], $0[1]) } ^~~~

nicklockwood commented 7 years ago

I've pushed a 0.3 release. Let me know if there's anything else I need to do.