<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 28 Jun 2017, at 01:47, Daniel Dunbar <<a href="mailto:daniel_dunbar@apple.com" class="">daniel_dunbar@apple.com</a>> 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 23, 2017, at 1:24 PM, David Hart <<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">On 23 Jun 2017, at 16:04, Ricardo N Olivieri <<a href="mailto:ricardo.olivieri@us.ibm.com" class="">ricardo.olivieri@us.ibm.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><font size="2" face="sans-serif" class="">Got it, thx. I had wrongly assumed that
the "--configuration/-c" option would only be available when
code is getting compiled.</font><br class=""><br class=""><font size="2" face="sans-serif" class="">Another question/observation. All the
options associated with the "swift build" command can be used
during the execution of the build command (for specifying/passing a value).
For instance, you can execute a command like</font><br class=""><br class=""><font size="2" face="sans-serif" class="">"swift build --configuration release
--build-path=mydir1 --chdir=mydir2 -Xcc -I/usr/include/folder2 -v"</font><br class=""><br class=""><font size="2" face="sans-serif" class="">What would happen in the following case?</font><br class=""><br class=""><font size="2" face="sans-serif" class="">"swift build --configuration release
--build-path=mydir1 --chdir=mydir2 -Xcc -I/usr/include/folder2 --bin-path
-v"</font><br class=""></div></blockquote><div class=""><br class=""></div><div class="">I discussed this with Daniel Dunbar and we came to the conclusion that the above command would disregard the --build-path, --chdir and -Xcc options and only print the binary path. I think it's similar (can't test) to how the presence of --help just prints the help text.</div></div></div></blockquote><div class=""><br class=""></div>Sorry, was out on vacation.</div><div class=""><br class=""></div><div class="">This doesn't actually match my expectation, I would expect that command above to honor the `--build-path` argument and `--chdir` argument, but not the Xcc one. I haven't checked the current implementation, but I would kinda expect the natural implementation to do this by default, does it not?</div></div></div></blockquote><div><br class=""></div><div>You are totally right. It should take into account <b class="">—build-path</b> AND <b class="">—chdir</b> (recently renamed <b class="">—package-path</b>) and the implementation I pushed to master works that way. Sorry, my brain was not functioning correctly when I made that original statement.</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=""> - Daniel</div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><br class=""><blockquote type="cite" class=""><div class=""><font size="2" face="sans-serif" class="">In such case, would the "--bin-path"
option be ignored or would the bin-path value be displayed, say, at the
beginning beginning of the output?</font><br class=""><font size="2" face="sans-serif" class=""><br class=""><br class="">Regards,<br class=""> Ricardo Olivieri<br class=""> Software Engineer</font><br class=""><br class=""><br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">From:
</font><font size="1" face="sans-serif" class="">David Hart <<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>></font><br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">To:
</font><font size="1" face="sans-serif" class="">Ricardo N Olivieri
<<a href="mailto:ricardo.olivieri@us.ibm.com" class="">ricardo.olivieri@us.ibm.com</a>></font><br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Cc:
</font><font size="1" face="sans-serif" class="">Daniel Dunbar <<a href="mailto:daniel_dunbar@apple.com" class="">daniel_dunbar@apple.com</a>>,
Gregor Milos <<a href="mailto:gmilos@apple.com" class="">gmilos@apple.com</a>>, Kyle Fuller <<a href="mailto:kyle@fuller.li" class="">kyle@fuller.li</a>>,
"<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>" <<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>></font><br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Date:
</font><font size="1" face="sans-serif" class="">06/23/2017 01:04 AM</font><br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Subject:
</font><font size="1" face="sans-serif" class="">Re: [swift-build-dev]
SwiftPM platform-specific build folders</font><br class=""><hr noshade="" class=""><br class=""><br class=""><br class=""><br class=""><font size="3" class=""><br class="">On 23 Jun 2017, at 05:41, Ricardo N Olivieri <</font><a href="mailto:ricardo.olivieri@us.ibm.com" class=""><font size="3" color="blue" class=""><u class="">ricardo.olivieri@us.ibm.com</u></font></a><font size="3" class="">>
wrote:<br class=""></font><br class=""><font size="2" face="sans-serif" class="">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><font size="3" class=""><br class=""></font><font size="2" face="sans-serif" class=""><br class="">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><font size="3" class=""><br class=""></font><font size="2" face="sans-serif" class=""><br class="">Does that make sense or did I miss something?</font><br class=""><br class=""><font size="3" class="">The build command already has a --configuration/-c option,
so I would expect it to be:</font><br class=""><br class=""><font size="3" class="">$ swift build --bin-path</font><br class=""><font size="3" class="">.build/macosx-x86_64/debug</font><br class=""><font size="3" class="">$ swift build -c release --bin-path</font><br class=""><font size="3" class="">.build/macosx-x86_64/release</font><br class=""><br class=""><font size="2" face="sans-serif" class="">Regards,<br class=""> Ricardo Olivieri<br class=""> Software Engineer<br class=""> IBM Swift Engineering at IBM Cloud</font><font size="3" class=""><br class=""><br class=""></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">From: </font><font size="1" face="sans-serif" class="">David
Hart <</font><a href="mailto:david@hartbit.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">david@hartbit.com</u></font></a><font size="1" face="sans-serif" class="">></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">To: </font><font size="1" face="sans-serif" class="">Ricardo
N Olivieri <</font><a href="mailto:ricardo.olivieri@us.ibm.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">ricardo.olivieri@us.ibm.com</u></font></a><font size="1" face="sans-serif" class="">></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Cc: </font><font size="1" face="sans-serif" class="">Daniel
Dunbar <</font><a href="mailto:daniel_dunbar@apple.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">daniel_dunbar@apple.com</u></font></a><font size="1" face="sans-serif" class="">>,
Gregor Milos <</font><a href="mailto:gmilos@apple.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">gmilos@apple.com</u></font></a><font size="1" face="sans-serif" class="">>,
Kyle Fuller <</font><a href="mailto:kyle@fuller.li" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">kyle@fuller.li</u></font></a><font size="1" face="sans-serif" class="">>,
"</font><a href="mailto:swift-build-dev@swift.org" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">swift-build-dev@swift.org</u></font></a><font size="1" face="sans-serif" class="">"
<</font><a href="mailto:swift-build-dev@swift.org" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">swift-build-dev@swift.org</u></font></a><font size="1" face="sans-serif" class="">></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Date: </font><font size="1" face="sans-serif" class="">06/22/2017
03:50 PM</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Subject: </font><font size="1" face="sans-serif" class="">Re:
[swift-build-dev] SwiftPM platform-specific build folders</font><font size="3" class=""><br class=""></font><hr noshade="" class=""><font size="3" class=""><br class=""><br class=""><br class="">Response inline:<br class=""><br class="">On 22 Jun 2017, at 21:00, Ricardo N Olivieri <</font><a href="mailto:ricardo.olivieri@us.ibm.com" class=""><font size="3" color="blue" class=""><u class="">ricardo.olivieri@us.ibm.com</u></font></a><font size="3" class="">>
wrote:<br class=""></font><font size="2" face="sans-serif" class=""><br class="">Thanks Daniel for the heads up.<br class=""><br class="">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:<br class=""><br class="">swift build --configuration debug --build-path .build-ubuntu-1404<br class=""><br class="">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><font size="3" class=""><br class=""><br class="">Actually, I think it should contain the full path, including the configuration
folder:<br class=""><br class="">.build/macosx-x86_64/debug<br class=""></font><font size="2" face="sans-serif" class=""><br class="">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 class="">"--build-path" option that exists now:</font><font size="3" class=""><br class=""><br class="">The path mentioned by those options are different.<br class=""><br class="">--build-path allows setting the root build folder, and the build process
will then create the necessary platform/configuration folder structure
inside there.<br class=""><br class="">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.<br class=""><br class="">But we are open to other name suggestions.<br class=""></font><font size="2" face="Menlo-Regular" class=""><br class="">$ swift build --help<br class="">OVERVIEW: Build sources into binary products<br class=""><br class="">USAGE: swift build [options]<br class=""><br class="">OPTIONS:<br class=""> --build-path Specify build/cache
directory [default: ./.build]<br class=""> --chdir, -C Change working directory
before any other operation<br class=""> --color Specify
color mode (auto|always|never) [default: auto]<br class=""> --configuration, -c Build with configuration (debug|release)
[default: debug]<br class=""> --enable-prefetching Enable prefetching in resolver<br class=""> --verbose, -v Increase verbosity of
informational output<br class=""> -Xcc Pass
flag through to all C compiler invocations<br class=""> -Xlinker Pass flag
through to all linker invocations<br class=""> -Xswiftc Pass flag
through to all Swift compiler invocations<br class=""> --help Display
available options</font><font size="3" class=""><br class=""></font><font size="2" face="sans-serif" class=""><br class=""><br class=""><br class="">Regards,<br class=""> Ricardo Olivieri<br class=""> Software Engineer<br class=""> IBM Swift Engineering at IBM Cloud</font><font size="3" class=""><br class=""></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class=""><br class="">From: </font><font size="1" face="sans-serif" class="">Daniel
Dunbar <</font><a href="mailto:daniel_dunbar@apple.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">daniel_dunbar@apple.com</u></font></a><font size="1" face="sans-serif" class="">></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">To: </font><font size="1" face="sans-serif" class="">David
Hart <</font><a href="mailto:david@hartbit.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">david@hartbit.com</u></font></a><font size="1" face="sans-serif" class="">>,
Kyle Fuller <</font><a href="mailto:kyle@fuller.li" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">kyle@fuller.li</u></font></a><font size="1" face="sans-serif" class="">>,
Gregor Milos <</font><a href="mailto:gmilos@apple.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">gmilos@apple.com</u></font></a><font size="1" face="sans-serif" class="">>,
Ricardo N Olivieri <</font><a href="mailto:ricardo.olivieri@us.ibm.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">ricardo.olivieri@us.ibm.com</u></font></a><font size="1" face="sans-serif" class="">></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Cc: </font><font size="1" face="sans-serif" class="">"</font><a href="mailto:swift-build-dev@swift.org" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">swift-build-dev@swift.org</u></font></a><font size="1" face="sans-serif" class="">"
<</font><a href="mailto:swift-build-dev@swift.org" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">swift-build-dev@swift.org</u></font></a><font size="1" face="sans-serif" class="">></font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Date: </font><font size="1" face="sans-serif" class="">06/19/2017
05:49 PM</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Subject: </font><font size="1" face="sans-serif" class="">Re:
[swift-build-dev] SwiftPM platform-specific build folders</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">Sent by: </font><a href="mailto:daniel_dunbar@apple.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">daniel_dunbar@apple.com</u></font></a><font size="3" class=""><br class=""></font><hr noshade="" class=""><font size="3" class=""><br class=""><br class=""><br class="">(CC'ing a couple people I know have worked on build packs in the past.)<br class=""><br class="">Thanks David!<br class=""><br class="">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 class=""><br class="">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 class=""><br class="">We'd love feedback on whether this seems like a reasonable plan.<br class=""><br class="">- Daniel<br class=""><br class="">On Jun 19, 2017, at 3:19 PM, David Hart via swift-build-dev <</font><a href="mailto:swift-build-dev@swift.org" class=""><font size="3" color="blue" class=""><u class="">swift-build-dev@swift.org</u></font></a><font size="3" class="">>
wrote:<br class=""><br class="">Hello mailing-list,<br class=""><br class="">I’m implementing </font><a href="https://bugs.swift.org/browse/SR-3583" class=""><font size="3" color="blue" class=""><u class="">SR-3583</u></font></a><font size="3" class="">that
builds SwiftPM products into platform-specific sub-folders. For example,
on macOS, a default build will no longer build products into <b class="">.build/debug</b>but
instead in <b class="">.build/macosx-x86_64/debug</b>.<br class=""><br class="">To alleviate this breaking change, several solutions have been planned:</font><ul class=""><li class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0179-swift-run-command.md" class=""><font size="3" color="blue" class=""><u class="">SE-0179</u></font></a><font size="3" class="">:
A new <b class="">swift run</b> tool to allow users to run executable products without
knowing their exact location.</font></li><li class=""><font size="3" class="">SR-3583 will create a symlink after each build pointing
from the old to the new build folder for backwards compatibility.</font></li><li class=""><a href="https://bugs.swift.org/browse/SR-5259" class=""><font size="3" color="blue" class=""><u class="">SR-5259</u></font></a><font size="3" class="">:
A new <b class="">—bin-path</b> option for the <b class="">swift build</b> command to print
the build folder for 3rd party tools to use.</font></li></ul><font size="3" class=""><br class="">Of the above, only SE-0179 is currently fully implemented in master.<br class=""><br class="">What does everybody think about this change and the solutions put into
place to support it?<br class=""><br class="">Regards,<br class="">David.<br class="">_______________________________________________<br class="">swift-build-dev mailing list</font><font size="3" color="blue" class=""><u class=""><br class=""></u></font><a href="mailto:swift-build-dev@swift.org" class=""><font size="3" color="blue" class=""><u class="">swift-build-dev@swift.org</u></font></a><font size="3" color="blue" class=""><u class=""><br class=""></u></font><a href="https://lists.swift.org/mailman/listinfo/swift-build-dev" class=""><font size="3" color="blue" class=""><u class="">https://lists.swift.org/mailman/listinfo/swift-build-dev</u></font></a><font size="3" class=""><br class=""><br class=""><br class=""><br class=""><br class=""></font><br class=""><br class=""><br class="">
</div></blockquote></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>