<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta name="Generator" content="Zarafa WebApp v7.2.1-51838">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>AW: [swift-users] Build specific Target instead of all</title>
</head>
<body>
<p data-mce-style="padding: 0; margin: 0;" style="padding: 0; margin: 0;"><span id="_mce_caret" data-mce-bogus="true"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"></span></span></p><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: #325fba; padding-left: 5px; margin: 0px 5px 1em;" data-mce-style="border-left-width: 2px; border-left-style: solid; border-left-color: #325fba; padding-left: 5px; margin: 0px 5px 1em;"><div><pre wrap="" style="white-space: pre-wrap; word-wrap: break-word;" data-mce-style="white-space: pre-wrap; word-wrap: break-word;"><br>This feature is not there yet (sorry, SwiftPM is super young still), but you can invoke swift-build-tool manually:<br><br> swift-build-tool -f .build/debug/llbuild.yaml TARGETNAME<br><br>Open up the file to figure out the target name.</pre></div></blockquote><p data-mce-style="padding: 0; margin: 0;" style="padding: 0; margin: 0;"><span id="_mce_caret" data-mce-bogus="true"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"><br></span></span></p><p data-mce-style="padding: 0; margin: 0;" style="padding: 0; margin: 0;" id="dirtyP"><span id="_mce_caret" data-mce-bogus="true"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"> I'm tried your suggestion, but that is no "working" solution to build just specific targets. ( Although and can be done under some cirumstances ).</span></span></p><p data-mce-style="padding: 0; margin: 0;" style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"><br data-mce-bogus="1"></span></p><p data-mce-style="padding: 0; margin: 0;" style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;">First of all, if there is a <strong style="null">"name":"ProjectName" </strong><span id="_mce_caret" data-mce-bogus="true" style="null">in the <span id="_mce_caret" data-mce-bogus="true"><strong style="null">Package.swift</strong><span id="_mce_caret" data-mce-bogus="true" style="null"> the command to invoke must be called in this way:</span></span></span></span></p><p data-mce-style="padding: 0; margin: 0;" style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"><br data-mce-bogus="1"></span></p><pre style="white-space: pre-wrap; word-wrap: break-word;" data-mce-style="white-space: pre-wrap; word-wrap: break-word;">swift-build-tool -f .build/debug/<strong>ProjectName</strong>/llbuild.yaml TARGETNAME<br><br>And the second issue with this is, that to run this command there must be a full build before. (swift build). Otherwise there will not be and filed in the .build/ folder.<br><br>So this is no solution to checkout the source and just build the one or other target instead of all XXX targets all togheter, if we need to build all to build one specific.<br><br>Okay, maybe it could be a solution to checkin the llbuild.yaml (and maybe other needed files) into a seperate folder in the git repository. But that seems to be so hacky and a even worse solution, so we discarded the way to provider several indepentent small util binaries.<br><br>Instead of that we changed to one binard which could be symlinked on the target machine, checking the symlink name from which the binary was invoked, and instancing indivudial "BinaryInstance" classes which do the argument/work splitting. The result is a binary with all stuff into it. This was for us the best way currently.<br><br><br>> This feature is not there yet (sorry, SwiftPM is super young still), but you can invoke swift-build-tool manually:<br><br>It's a known fact thet the SwiftPM is a young project, so i'm not require that it should do all needed things just yet. <br>You mentioned this feature is not there yet .. but i think this feature would be a very common used feature. So where is the correct place to look if this feature is maybe on the roadmap or start a discussion about this feature ?<br><br>Another nice to have feature could be another ( not found it, but maybe it exists ):<br><br>Currently with involing <br><br>swift build<br><br>it reads the Package.swift (recursivly), checking out the Package git repositories and build all at once. A feature to just do that git repository checkout WITHOUT involing a build in one run would be nice.<br><br>ex. swift fetch or swift build --fetch<br><br>stefan</pre>
</body>
</html>