<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 Dec 5, 2015, at 1:23 PM, Lander Brandt &lt;<a href="mailto:landerbrandt@gmail.com" class="">landerbrandt@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Interactive by default would definitely be better for newcomers. I’ll see about submitting a formal proposal soon although it may not appear until after this upcoming Wednesday as I have university finals that are <i class="">slightly</i>&nbsp;higher priority.</div></div></div></blockquote><div><br class=""></div>Cool!</div><div><br class=""></div><div>The kinds of issues I'd like to see some kind of plan for are:</div><div><br class=""></div><div>1. Interactivity model</div><div>2. Conflict resolution: Does the command refuse to run if there is an existing Package.swift, or should it also be the same mechanism that is used to automatically update the Package.swift.</div><div>3. Source files: When should the command help create source files?</div><div>4. Automation: When can we automatically invoke this tool? Swift build with empty dir? When we notice a new target? etc.</div><div><br class=""></div><div>&nbsp;- Daniel</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 5, 2015, at 13:17, Daniel Dunbar &lt;<a href="mailto:daniel_dunbar@apple.com" class="">daniel_dunbar@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Dec 5, 2015, at 1:15 PM, Daniel Dunbar via swift-build-dev &lt;<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">This is indeed something we have discussed and agree it would make sense to add, just haven't gotten there yet.</span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Patches in this direction are welcome, although I recommend as with any new feature coming up with a concrete proposal and outline before you set in on the implementation...</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><blockquote type="cite" class=""><div class="">On Dec 5, 2015, at 1:01 PM, Lander Brandt via swift-build-dev &lt;<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On the Swift package manager page on&nbsp;<a href="http://swift.org/" class="">swift.org</a>&nbsp;(<a href="https://swift.org/package-manager/#example-usage" class="">https://swift.org/package-manager/#example-usage</a>) the requirements for creating a package/application are clearly outlined, but why not include a command in the swift tool for autogenerating the require? I did a quick look and didn’t see any existing discussion, so I apologize if this has already been discussed.<div class=""><br class=""></div><div class="">Example of the tool command: `swift init foo --type=(lib|app)`</div></div></div></blockquote><div class=""><br class=""></div>One question we would need to resolve is whether or not the tool should be interactive. If one goal</div></div></div></blockquote><div class=""><br class=""></div>To finish my thought:</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">If one goal of the tool is to help out newcomers, it might make sense for the default invocation to be interactive with command line prompts, and then provide options which advanced users can use to efficiently create new projects.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">&nbsp;- Daniel</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><br class=""></div><div class="">Would create a new directory called “foo” with the following tree structure for a project of type app:</div><div class=""><br class=""></div><div class=""><div class="">foo</div><div class="">├── Package.swift</div><div class="">├── Packages</div><div class="">├── README.md</div><div class="">└── main.swift</div></div></div></div></blockquote><div class=""><br class=""></div>This is most likely not the initial layout we want to recommend, because it is less obvious how to migrate upwards. This flat layout is a little confusing as well to newcomers because Package.swift here *isn't* part of their actual larget. We included support for this style for "micro-framework" type packages, where it can be useful for the simplicity of the project to be obvious in the initial repo view, but this is something more advanced users can come to discover.<br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><br class=""></div><div class="">And for project of type lib:</div><div class=""><br class=""></div><div class=""><div class="">foo</div><div class="">├── Package.swift</div><div class="">├── README.md</div><div class="">└── Sources</div><div class="">&nbsp; &nbsp; └── Foo.swift</div></div><div class=""><br class=""></div><div class="">In both cases Package.swift would contain something basic like:</div><div class=""><br class=""></div><div class=""><div class="">import PackageDescription</div><div class=""><br class=""></div><div class="">let package = Package(</div><div class="">&nbsp; &nbsp; name: “Foo",</div><div class="">&nbsp; &nbsp; dependencies: [</div><div class="">&nbsp; &nbsp; ]</div><div class="">)</div></div></div></div></blockquote><div class=""><br class=""></div>I'd probably leave dependencies: out of this. I presume you added it to help people know where to add things, but another related thing we would like to see develop is tools for automatically editing this file (e.g., a command to add a new dependency). Tools like that will help people get their manifest files right w/o needing to memorize the package syntax.</div><div class=""><br class=""></div><div class="">&nbsp;- Daniel</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br class=""></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHbERtY5det-2FDBvSxuhs4q2N4okriDL-2FUfZUyn8Pj3XXHJVrMUfLsD9aMwDH4KeI4Ww9JaW4YW4fKZmqqyulcFeBC8Hndmvjm-2Fo0nemH9iNzznyhEksqcVH0QN-2BT8MP-2BuPVgmYKB6HFhc2UP8jacAPTflJGQOQeJTNiywbk4ZEVXSleaHRi6TjAwduE7A1pXnL3sfL-2FWnfjJI2mIvPVTI154-3D" alt="" width="1" height="1" border="0" class="" style="height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"></div>_______________________________________________<br class="">swift-build-dev mailing list<br class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev" class="">https://lists.swift.org/mailman/listinfo/swift-build-dev</a><br class=""></div></blockquote></div><br class=""></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHbERtY5det-2FDBvSxuhs4q2M1UtJrrdX6NYWBkeC6GQFdcSmViXsT-2BZtTpXpwdUdhrPmSBf7r2EBcVSYgzSI5U6O91sj-2BbjTQPRxICg9kL0yVlBV81CG3D0G-2BQkmkBjhsAMI5N6bnNSK1WB-2FZfvyMobjo6PnPJnrCk-2BcYsgHazAjgTnJeBxBW5AGhbPhstyTkEzsd1Lr91enGrtl7pw0Pab0-3D" alt="" width="1" height="1" border="0" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;"><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">swift-build-dev mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="mailto:swift-build-dev@swift.org" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">swift-build-dev@swift.org</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://lists.swift.org/mailman/listinfo/swift-build-dev</a></div></blockquote></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>