<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><br>On 23 Jun 2017, at 05:41, Ricardo N Olivieri &lt;<a href="mailto:ricardo.olivieri@us.ibm.com">ricardo.olivieri@us.ibm.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><font size="2" face="sans-serif">I see. One question though. If the output
from "swift build --bin-path" includes the configuration folder
(e.g. ".build/macosx-x86_64/debug), wouldn't the command then need
to include the configuration as a parameter?</font><br><br><font size="2" face="sans-serif">For instance, "swift build --bin-debug-path",
would output ".build/macosx-x86_64/debug", while "swift
build --bin-release-path" would output ".build/macosx-x86_64/release”.</font><br><br><font size="2" face="sans-serif">Does that make sense or did I miss something?</font><font size="2" face="sans-serif"><br></font></div></blockquote><div><br></div><div>The build command already has a --configuration/-c option, so I would expect it to be:</div><div><br></div><div>$ swift build --bin-path</div><div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">.build/macosx-x86_64/debug</span></font></div></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">$ swift build -c release --bin-path</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">.build/macosx-x86_64/release</span></font></div><br><blockquote type="cite"><div><font size="2" face="sans-serif">Regards,<br> &nbsp; Ricardo Olivieri<br> &nbsp; Software Engineer<br> &nbsp; IBM Swift Engineering at IBM Cloud</font><br><br><br><font size="1" color="#5f5f5f" face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size="1" face="sans-serif">David Hart &lt;<a href="mailto:david@hartbit.com">david@hartbit.com</a>&gt;</font><br><font size="1" color="#5f5f5f" face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size="1" face="sans-serif">Ricardo N Olivieri
&lt;<a href="mailto:ricardo.olivieri@us.ibm.com">ricardo.olivieri@us.ibm.com</a>&gt;</font><br><font size="1" color="#5f5f5f" face="sans-serif">Cc: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size="1" face="sans-serif">Daniel Dunbar &lt;<a href="mailto:daniel_dunbar@apple.com">daniel_dunbar@apple.com</a>&gt;,
Gregor Milos &lt;<a href="mailto:gmilos@apple.com">gmilos@apple.com</a>&gt;, Kyle Fuller &lt;<a href="mailto:kyle@fuller.li">kyle@fuller.li</a>&gt;,
"<a href="mailto:swift-build-dev@swift.org">swift-build-dev@swift.org</a>" &lt;<a href="mailto:swift-build-dev@swift.org">swift-build-dev@swift.org</a>&gt;</font><br><font size="1" color="#5f5f5f" face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size="1" face="sans-serif">06/22/2017 03:50 PM</font><br><font size="1" color="#5f5f5f" face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size="1" face="sans-serif">Re: [swift-build-dev]
SwiftPM platform-specific build folders</font><br><hr noshade=""><br><br><br><font size="3">Response inline:</font><br><font size="3"><br>On 22 Jun 2017, at 21:00, Ricardo N Olivieri &lt;</font><a href="mailto:ricardo.olivieri@us.ibm.com"><font size="3" color="blue"><u>ricardo.olivieri@us.ibm.com</u></font></a><font size="3">&gt;
wrote:<br></font><br><font size="2" face="sans-serif">Thanks Daniel for the heads up.</font><font size="3"><br></font><font size="2" face="sans-serif"><br>I like the goals that SR-3583 and SR-5259 are targeting. For instance,
because the solution described in SR-3583 is not yet available, we have
been using the "--build-path" argument when building inside Docker
containers or VMs as a way to avoid overriding the .build folder on the
macOS host:</font><font size="3"><br></font><font size="2" face="sans-serif"><br>swift build --configuration debug --build-path .build-ubuntu-1404</font><font size="3"><br></font><font size="2" face="sans-serif"><br>If SR-3583 gets implemented, then SR-5259 would be certainly beneficial
for our buildpack. As you pointed out, with SR-5259, the buildpack would
be able to determine the build path at runtime without having to hard code
it. In our buildpack we could execute "swift build --bin-path",
which I assume would output something along these lines: “.build/macosx-x86_64”,
“.build/ubuntu-1404”, etc... correct?</font><br><br><font size="3">Actually, I think it should contain the full path, including
the configuration folder:</font><br><br><font size="3">.build/macosx-x86_64/debug</font><br><br><font size="2" face="sans-serif">Question... would "swift build
--display-build-path" be a better option than "swift build --bin-path"
to display the path to the build folder? I am thinking this would align
better with the current <br>"--build-path" option that exists now:</font><br><br><font size="3">The path mentioned by those options are different.</font><br><br><font size="3">--build-path allows setting the root build folder, and
the build process will then create the necessary platform/configuration
folder structure inside there.</font><br><br><font size="3">On the other hand, the option we plan to introduce will
output the full path the binaries will be built into for a run with the
same options, including the platform and configuration folders, hence the
bin in the name.</font><br><br><font size="3">But we are open to other name suggestions.</font><br><br><font size="2" face="Menlo-Regular">$ swift build --help<br>OVERVIEW: Build sources into binary products</font><font size="3"><br></font><font size="2" face="Menlo-Regular"><br>USAGE: swift build [options]</font><font size="3"><br></font><font size="2" face="Menlo-Regular"><br>OPTIONS:<br> &nbsp;--build-path &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Specify build/cache
directory [default: ./.build]<br> &nbsp;--chdir, -C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Change working
directory before any other operation<br> &nbsp;--color &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Specify color mode (auto|always|never) [default: auto]<br> &nbsp;--configuration, -c &nbsp; &nbsp; Build with configuration (debug|release)
[default: debug]<br> &nbsp;--enable-prefetching &nbsp; &nbsp;Enable prefetching in resolver<br> &nbsp;--verbose, -v &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Increase verbosity
of informational output<br> &nbsp;-Xcc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;Pass flag through to all C compiler invocations<br> &nbsp;-Xlinker &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Pass
flag through to all linker invocations<br> &nbsp;-Xswiftc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Pass
flag through to all Swift compiler invocations<br> &nbsp;--help &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Display
available options</font><font size="3"><br><br></font><font size="2" face="sans-serif"><br><br>Regards,<br> &nbsp;Ricardo Olivieri<br> &nbsp;Software Engineer<br> &nbsp;IBM Swift Engineering at IBM Cloud</font><font size="3"><br><br></font><font size="1" color="#5f5f5f" face="sans-serif"><br>From: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="1" face="sans-serif">Daniel
Dunbar &lt;</font><a href="mailto:daniel_dunbar@apple.com"><font size="1" color="blue" face="sans-serif"><u>daniel_dunbar@apple.com</u></font></a><font size="1" face="sans-serif">&gt;</font><font size="1" color="#5f5f5f" face="sans-serif"><br>To: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="1" face="sans-serif">David
Hart &lt;</font><a href="mailto:david@hartbit.com"><font size="1" color="blue" face="sans-serif"><u>david@hartbit.com</u></font></a><font size="1" face="sans-serif">&gt;,
Kyle Fuller &lt;</font><a href="mailto:kyle@fuller.li"><font size="1" color="blue" face="sans-serif"><u>kyle@fuller.li</u></font></a><font size="1" face="sans-serif">&gt;,
Gregor Milos &lt;</font><a href="mailto:gmilos@apple.com"><font size="1" color="blue" face="sans-serif"><u>gmilos@apple.com</u></font></a><font size="1" face="sans-serif">&gt;,
Ricardo N Olivieri &lt;</font><a href="mailto:ricardo.olivieri@us.ibm.com"><font size="1" color="blue" face="sans-serif"><u>ricardo.olivieri@us.ibm.com</u></font></a><font size="1" face="sans-serif">&gt;</font><font size="1" color="#5f5f5f" face="sans-serif"><br>Cc: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="1" face="sans-serif">"</font><a href="mailto:swift-build-dev@swift.org"><font size="1" color="blue" face="sans-serif"><u>swift-build-dev@swift.org</u></font></a><font size="1" face="sans-serif">"
&lt;</font><a href="mailto:swift-build-dev@swift.org"><font size="1" color="blue" face="sans-serif"><u>swift-build-dev@swift.org</u></font></a><font size="1" face="sans-serif">&gt;</font><font size="1" color="#5f5f5f" face="sans-serif"><br>Date: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="1" face="sans-serif">06/19/2017
05:49 PM</font><font size="1" color="#5f5f5f" face="sans-serif"><br>Subject: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size="1" face="sans-serif">Re:
[swift-build-dev] SwiftPM platform-specific build folders</font><font size="1" color="#5f5f5f" face="sans-serif"><br>Sent by: &nbsp; &nbsp; &nbsp; &nbsp;</font><a href="mailto:daniel_dunbar@apple.com"><font size="1" color="blue" face="sans-serif"><u>daniel_dunbar@apple.com</u></font></a><font size="3"><br></font><hr noshade=""><font size="3"><br><br><br>(CC'ing a couple people I know have worked on build packs in the past.)<br><br>Thanks David!<br><br>For those only on the mailing list, we discussed this plan on the SwiftPM
Slack channel, and I think making this change in the Swift 4 timeframe
is right, even though it may break some things.<br><br>One of the main goals of the compatibility work is to make sure that we
don't break any of the existing deployment workflows people have built
on top of SwiftPM (for example PaaS buildpacks). We don't have time for
a full "make install" type workflow which buildpacks could use,
but my hope was that SR-5259 would be something existing build packs could
migrate to to avoid having to hard code certain paths.<br><br>We'd love feedback on whether this seems like a reasonable plan.<br><br> - Daniel<br><br>On Jun 19, 2017, at 3:19 PM, David Hart via swift-build-dev &lt;</font><a href="mailto:swift-build-dev@swift.org"><font size="3" color="blue"><u>swift-build-dev@swift.org</u></font></a><font size="3">&gt;
wrote:<br><br>Hello mailing-list,<br><br>I’m implementing </font><a href="https://bugs.swift.org/browse/SR-3583"><font size="3" color="blue"><u>SR-3583</u></font></a><font size="3">that
builds SwiftPM products into platform-specific sub-folders. For example,
on macOS, a default build will no longer build products into <b>.build/debug</b>but
instead in <b>.build/macosx-x86_64/debug</b>.<br><br>To alleviate this breaking change, several solutions have been planned:</font><ul><li><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0179-swift-run-command.md"><font size="3" color="blue"><u>SE-0179</u></font></a><font size="3">:
A new <b>swift run</b> tool to allow users to run executable products without
knowing their exact location.</font></li><li><font size="3">SR-3583 will create a symlink after each build pointing
from the old to the new build folder for backwards compatibility.</font></li><li><a href="https://bugs.swift.org/browse/SR-5259"><font size="3" color="blue"><u>SR-5259</u></font></a><font size="3">:
A new <b>—bin-path</b> option for the <b>swift build</b> command to print
the build folder for 3rd party tools to use.</font></li></ul><font size="3"><br>Of the above, only SE-0179 is currently fully implemented in master.<br><br>What does everybody think about this change and the solutions put into
place to support it?<br><br>Regards,<br>David.<br>_______________________________________________<br>swift-build-dev mailing list</font><font size="3" color="blue"><u><br></u></font><a href="mailto:swift-build-dev@swift.org"><font size="3" color="blue"><u>swift-build-dev@swift.org</u></font></a><font size="3" color="blue"><u><br></u></font><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev"><font size="3" color="blue"><u>https://lists.swift.org/mailman/listinfo/swift-build-dev</u></font></a><font size="3"><br><br><br></font><br><br><br>
</div></blockquote></body></html>