In Color.swift I am trying to extend a type from Floor.swift (a nested type `Floor.Room` to be exact). This works just fine when building the project via Xcode (xcodeproj generated with SPM). On running `swift build` however I get the following error.
error: 'Room' is not a member type of 'Floor'
Whilst debugging this I was asked to rename the Models directory to AModels, so that it would come before Extensions when listing the dirs alphabetically. Interestingly enough this resolves the issue and SPM is now able to build the project.
Depending on the alphabetical order of subdirectories feels very odd
Environment
Apple Swift version 4.0 (swiftlang-900.0.65 clang-900.0.37) Target: x86_64-apple-macosx10.9Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 052111b251fc6166095d251a9b4e9549Issue Description:
I'm currently running into an inconsistency between Xcode and Swift when trying to build a library.
My project's layout looks something like this:
In Color.swift I am trying to extend a type from Floor.swift (a nested type `Floor.Room` to be exact). This works just fine when building the project via Xcode (xcodeproj generated with SPM). On running `swift build` however I get the following error.
Whilst debugging this I was asked to rename the Models directory to AModels, so that it would come before Extensions when listing the dirs alphabetically. Interestingly enough this resolves the issue and SPM is now able to build the project.
Depending on the alphabetical order of subdirectories feels very odd
–
Posted on behalf of kiliankoe (JIRA User)