<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SPM on Daniel Lyons</title><link>https://dandylyons.net/topics/spm/</link><description>Recent content in SPM on Daniel Lyons</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Wed, 02 Oct 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://dandylyons.net/topics/spm/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Visualize a Dependency Graph of Swift Dependencies</title><link>https://dandylyons.net/posts/swift-dependency-graph-visualization/</link><pubDate>Wed, 02 Oct 2024 00:00:00 +0000</pubDate><guid>https://dandylyons.net/posts/swift-dependency-graph-visualization/</guid><description>&lt;p>As projects grow in complexity, it is common to use two techniques:&lt;/p>
&lt;ol>
&lt;li>Depend on external libraries.&lt;/li>
&lt;li>Split your codebase into multiple smaller modules.&lt;/li>
&lt;/ol>
&lt;p>These techniques have a number of benefits including:&lt;/p>
&lt;ol>
&lt;li>You can reduce build times by only building select modules, instead of the entire project.&lt;/li>
&lt;li>You can reuse modules in other projects.&lt;/li>
&lt;li>Swift forces you to define external APIs with the &lt;code>public&lt;/code> keyword, thus enforcing best practices.&lt;/li>
&lt;/ol>
&lt;p>But a modularized codebase also increases complexity by creating a web of dependencies. Small changes in one module, can have vast ripple effects down the dependency chain. For this reason, it can be immensely helpful to visualize your dependency graph like this.&lt;/p></description></item><item><title>How to Take Full Advantage of Swift Package Index</title><link>https://dandylyons.net/posts/spi-tips/</link><pubDate>Tue, 13 Aug 2024 00:00:00 +0000</pubDate><guid>https://dandylyons.net/posts/spi-tips/</guid><description>&lt;p>The &lt;a href="https://swiftpackageindex.com">Swift Package Index&lt;/a> (SPI) is an invaluable resource for both package users and maintainers, streamlining the process of discovering, using, and managing Swift packages. Whether you&amp;rsquo;re looking to integrate a package into your project or contribute your own, SPI offers a range of features to maximize your productivity and collaboration. This blog post will guide you through the best practices for leveraging SPI to its full potential.&lt;/p>
&lt;h2 id="tips-for-package-users">Tips for Package Users&lt;/h2>
&lt;h3 id="how-to-open-spi-from-github">How to Open SPI From GitHub&lt;/h3>
&lt;p>Perhaps you&amp;rsquo;ve already found a package you like on GitHub. You can easily jump to viewing the package on SPI simply by changing the url to &lt;code>swiftpackageindex.com&lt;/code>. For example, if you are currently at the GitHub repo for the new &lt;a href="https://github.com/swiftlang/swift-testing">Swift Testing&lt;/a> framework at &lt;a href="https://github.com/swiftlang/swift-testing">https://github.com/swiftlang/swift-testing&lt;/a> then simply change the url to &lt;a href="https://swiftpackageindex.com/swiftlang/swift-testing">https://swiftpackageindex.com/swiftlang/swift-testing&lt;/a>. If the package is already indexed on SPI then it will take you to the page. If not, then it will guide you through an easy process to request adding it to SPI.&lt;/p></description></item></channel></rss>