PerfectlySoft / PerfectTemplate

Empty Perfect Starter Project.
https://www.perfect.org
Apache License 2.0
223 stars 83 forks source link

Move main.swift into "PerfectTemplate" module directory. #7

Closed JoshuaSullivan closed 2 years ago

JoshuaSullivan commented 7 years ago

The swift package generate-xcodeproj command fails using Swift 3.1 because main.swift is not in a module sub-directory. This pull request simply adds a "PerfectTemplate" module directory and moves main.swift into it.

The result of running swift build is identical to the output before this pull request.

RockfordWei commented 7 years ago

Hi Joshua, I didn't find anything wrong with the current PerfectTemplate:

$ swift --version
Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41)
Target: x86_64-apple-macosx10.9

$ git clone https://github.com/PerfectlySoft/PerfectTemplate.git
Cloning into 'PerfectTemplate'...
remote: Counting objects: 187, done.
remote: Total 187 (delta 0), reused 0 (delta 0), pack-reused 187

$ cd PerfectTemplate/
$ swift package generate-xcodeproj
Fetching https://github.com/PerfectlySoft/Perfect-HTTPServer.git
Fetching https://github.com/PerfectlySoft/Perfect-HTTP.git
...
Cloning https://github.com/PerfectlySoft/PerfectLib.git
Resolving https://github.com/PerfectlySoft/PerfectLib.git at 2.0.9
generated: ./PerfectTemplate.xcodeproj

I built the project and run in Xcode and found nothing wrong. Please confirm your Xcode / Swift version , sorry about that.

aiden-leong commented 7 years ago

Hi Joshua,

You should run that command in PerfectTemplate/ , not in PerfectTemplate/Sources, nor PerfectTemplate/Sources/PerfectTemplate.