<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 24, 2017, at 11:57 AM, Maxim Veksler via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">The most recent change I've done is add the Sources/extensions/Jay.swift, now I'm unable to build the project.</div><div class=""><br class=""></div><div class="">No idea what could have gone wrong, feedback?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">➜ Collection git:(master) ✗ find Sources</div><div class="">Sources</div><div class="">Sources/extensions</div><div class="">Sources/extensions/Jay.swift</div><div class="">Sources/main.swift</div></div></div></blockquote><div><br class=""></div></div><div>If you want one module with both sources but some in a subdirectory, you need to write it as:</div><div><br class=""></div><div><div>Sources/Collection/main.swift</div><div class=""><div>Sources/Collection/extensions/Jay.swift</div></div><div><br class=""></div><div><div>If you want two modules then you need to lay this out as:</div><div> Sources/extensions/Jay.swift</div><div>and</div><div> Sources/Collection/main.swift</div><div><br class=""></div></div><div>We know this UX is not very good and are debating how to best resolve this...</div><div><br class=""></div><div> - Daniel</div><div class=""><br class=""></div></div><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">➜ Collection git:(master) ✗ cat Package.swift</div><div class="">import PackageDescription</div><div class=""><br class=""></div><div class="">let package = Package(</div><div class=""> name: "Collection",</div><div class=""> dependencies: [</div><div class=""> .Package(url: "<a href="https://github.com/GraphQLSwift/GraphQL.git" class="">https://github.com/GraphQLSwift/GraphQL.git</a>", majorVersion: 0),</div><div class=""> .Package(url: "<a href="https://github.com/czechboy0/Jay.git" class="">https://github.com/czechboy0/Jay.git</a>", majorVersion: 1)</div><div class=""> ]</div><div class="">)</div><div class=""><br class=""></div><div class="">➜ Collection git:(master) ✗ swift build</div><div class="">error: the package has an unsupported layout, unexpected source file(s) found: /Users/maximveksler/Project/Org/Collection/Sources/main.swift<br class=""></div><div class="">fix: move the file(s) inside a module</div></div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></body></html>