Coder Social home page Coder Social logo

Comments (11)

czechboy0 avatar czechboy0 commented on May 4, 2024

Hi @donut, which SwiftPM version are you using? Which snapshot? Can you try to build and run https://github.com/qutheory/vapor-example?

from vapor.

donut avatar donut commented on May 4, 2024

@czechboy0 Latest development snapshot from February 25, 2016.

β†ͺ  swift --version                                                    0@16:08:10
Apple Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift fc261045a5)
Target: x86_64-apple-macosx10.9

Here's my attempt at building vapor-example:

[I] ~/Dropbox/Projects/vapor-example (master)                                   
β†ͺ  swift build                                                        0@16:08:19
Linking App
ld: framework not found XCTest for architecture x86_64
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a.xctoolchain/usr/bin/swift-build-tool -f /Users/me/Dropbox/Projects/vapor-example/.build/debug.yaml default

from vapor.

czechboy0 avatar czechboy0 commented on May 4, 2024

Yeah you need to run the ./run script or upgrade to the newest Swift snapshot (there was an issue with accidentally linked tests). Please run ./run and let me know what that did.

from vapor.

donut avatar donut commented on May 4, 2024
[I] ~/Dropbox/Projects/vapor-example (master)
β†ͺ  ./run                                                              0@16:43:10
Downloading dependencies...
Fixing SPM bug...
Building...
Running...
Visit http://localhost:8080
[2016-03-01 23:43:27 +0000] [INFO] Server has started on port 8080
[2016-03-01 23:43:34 +0000] [VERBOSE] Received Get request for /
[2016-03-01 23:43:34 +0000] [VERBOSE] Received Get request for /styles/app.css
[2016-03-01 23:43:34 +0000] [VERBOSE] Received Get request for /images/vapor-logo.png
[2016-03-01 23:43:34 +0000] [VERBOSE] Received Get request for /favicon.ico
[2016-03-01 23:43:34 +0000] [WARNING] Response had no 'Content-Type' header.
[2016-03-01 23:43:42 +0000] [VERBOSE] Received Get request for /json
[2016-03-01 23:43:43 +0000] [VERBOSE] Received Get request for /

from vapor.

czechboy0 avatar czechboy0 commented on May 4, 2024

All working then! 😊 How is your original project now? If this work then it should also work, the dependencies are the same (just Vapor).

from vapor.

donut avatar donut commented on May 4, 2024

I cleared out the .build and Packages folders and tried again and got a new error:

[I] ~/Dropbox/Projects/My App/My App (master *+%)           
β†ͺ  swift build                                                        0@16:44:14
Cloning https://github.com/qutheory/vapor.git
Resolved version: 0.2.7
Cloning https://github.com/czechboy0/Jay.git
Resolved version: 0.3.5
error: InvalidLayout((extension in Transmute):PackageType.Package.InvalidLayoutType.InvalidLayout)

Thanks for the help with this, by the way.

from vapor.

donut avatar donut commented on May 4, 2024

Maybe I should be building off of the Example project instead of just adding Vapor to my Package.swift file?

from vapor.

czechboy0 avatar czechboy0 commented on May 4, 2024

Hmm try that. And rebuild after every change to detect where things break. It's possible there's a bug in swiftpm or vapor, so it'd be great to get to the bottom of this.

from vapor.

donut avatar donut commented on May 4, 2024

I'll do that tomorrow when I get into work.

from vapor.

tanner0101 avatar tanner0101 commented on May 4, 2024

While Swift 2.2 is still in beta, we recommend forking the Vapor Example and building your project from that template.

The vapor example is tested against DEVELOPMENT-SNAPSHOT-2016-02-25-a.

from vapor.

donut avatar donut commented on May 4, 2024

It looks like I found the issue. Basically, something doesn't like spaces in the project path. When I remove the spaces, it works fine. The log below shows first with spaces and then without.

[I] ~/Dropbox/Projects                                                          
β†ͺ  git clone https://github.com/qutheory/vapor-example.git "My App"   0@15:59:08
Cloning into 'My App'...
remote: Counting objects: 339, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 339 (delta 29), reused 0 (delta 0), pack-reused 283
Receiving objects: 100% (339/339), 3.61 MiB | 1.66 MiB/s, done.
Resolving deltas: 100% (163/163), done.
Checking connectivity... done.
[I] ~/Dropbox/Projects                                                          
β†ͺ  cd My\ App/                                                        0@15:59:19
[I] ~/Dropbox/Projects/My App (master)                                          
β†ͺ  ./run                                                              0@15:59:27
Downloading dependencies...
Cloning https://github.com/qutheory/vapor.git
Resolved version: 0.2.8
Cloning https://github.com/czechboy0/Jay.git
Resolved version: 0.3.5
Cloning https://github.com/qutheory/vapor-stencil.git
Resolved version: 0.1.1
Cloning https://github.com/kylef/Stencil.git
Resolved version: 0.5.3
Cloning https://github.com/kylef/PathKit.git
Resolved version: 0.6.1
error: NoSources("/Users/me/Dropbox/Projects/My App/Packages/PathKit-0.6.1/Tests/Fixtures")
Fixing SPM bug...
Building...
Compiling Swift Module 'PathKit' (1 sources)
Compiling Swift Module 'Jay' (19 sources)
Compiling Swift Module 'Stencil' (12 sources)
Linking libJay.dylib
Compiling Swift Module 'JayExample' (1 sources)
Compiling Swift Module 'Vapor' (39 sources)
/Users/me/Dropbox/Projects/My App/Packages/Jay-0.3.5/Sources/JayExample/main.swift:1:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Stencil-0.5.3/Sources/Include.swift:1:8: error: no such module 'PathKit'
import PathKit
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
/Users/me/Dropbox/Projects/My App/Packages/Vapor-0.2.8/Sources/Vapor/JSON/JSONSerializer.swift:2:8: error: no such module 'Jay'
import Jay
       ^
<unknown>:0: error: build had 3 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a.xctoolchain/usr/bin/swift-build-tool -f /Users/me/Dropbox/Projects/My\ App/.build/debug.yaml default
Running...
./run: line 5: .build/debug/App: No such file or directory
[I] ~/Dropbox/Projects/My App (master)                                          
β†ͺ  cd ..                                                              0@15:59:42
[I] ~/Dropbox/Projects                                                          
β†ͺ  rm -rf My\ App/                                                    0@15:59:58
[I] ~/Dropbox/Projects                                                          
β†ͺ  git clone https://github.com/qutheory/vapor-example.git "My-App"   0@16:00:05
Cloning into 'My-App'...
remote: Counting objects: 339, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 339 (delta 29), reused 0 (delta 0), pack-reused 283
Receiving objects: 100% (339/339), 3.61 MiB | 746.00 KiB/s, done.
Resolving deltas: 100% (163/163), done.
Checking connectivity... done.
[I] ~/Dropbox/Projects                                                          
β†ͺ  cd My-App/                                                         0@16:00:26
[I] ~/Dropbox/Projects/My-App (master)                                          
β†ͺ  ./run                                                              0@16:00:40
Downloading dependencies...
Cloning https://github.com/qutheory/vapor.git
Resolved version: 0.2.8
Cloning https://github.com/czechboy0/Jay.git
Resolved version: 0.3.5
Cloning https://github.com/qutheory/vapor-stencil.git
Resolved version: 0.1.1
Cloning https://github.com/kylef/Stencil.git
Resolved version: 0.5.3
Cloning https://github.com/kylef/PathKit.git
Resolved version: 0.6.1
error: NoSources("/Users/me/Dropbox/Projects/My-App/Packages/PathKit-0.6.1/Tests/Fixtures")
Fixing SPM bug...
Building...
Compiling Swift Module 'PathKit' (1 sources)
Compiling Swift Module 'Jay' (19 sources)
Compiling Swift Module 'Stencil' (12 sources)
Linking libJay.dylib
Compiling Swift Module 'JayExample' (1 sources)
Compiling Swift Module 'Vapor' (39 sources)
Linking JayExample
Linking libVapor.dylib
Compiling Swift Module 'VaporStencil' (2 sources)
Compiling Swift Module 'VaporDev' (2 sources)
Compiling Swift Module 'App' (3 sources)
Linking VaporDev
Linking App
Running...
Visit http://localhost:8080
[2016-03-02 23:01:06 +0000] [INFO] Server has started on port 8080
[2016-03-02 23:01:14 +0000] [VERBOSE] Received Get request for /
[2016-03-02 23:01:14 +0000] [VERBOSE] Received Get request for /styles/app.css
[2016-03-02 23:01:14 +0000] [WARNING] Response had no 'Content-Type' header.
[2016-03-02 23:01:14 +0000] [VERBOSE] Received Get request for /images/vapor-logo.png
[2016-03-02 23:01:14 +0000] [WARNING] Response had no 'Content-Type' header.
[2016-03-02 23:01:15 +0000] [VERBOSE] Received Get request for /
[2016-03-02 23:01:15 +0000] [VERBOSE] Received Get request for /styles/app.css
[2016-03-02 23:01:15 +0000] [WARNING] Response had no 'Content-Type' header.
[2016-03-02 23:01:15 +0000] [VERBOSE] Received Get request for /images/vapor-logo.png
[2016-03-02 23:01:15 +0000] [WARNING] Response had no 'Content-Type' header.
^C⏎   

from vapor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.