yonaskolb / Mint

A package manager that installs and runs executable Swift packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question to build tasks and build time

AF-cgi opened this issue · comments

@yonaskolb
Mint is a nice tool to run and install Swift CLI packages. But I have figured out, that with each build and run process, the compilable tasks increments. For example: I have added SwiftGen and SwiftLint to my project and configure the execution of both CLIs in Xcode build phases. Now I can see two main differences in comparison to integrate it via Cocoapods. The build time for each build and run process is pretty much higher then the Cocoapods version. And also in each build and run process the build tasks will be increment continuously without any code changes from my side.
Why this will happen by using Mint in build phases?

Hi @AF-cgi. Interesting, I have no idea. Make sure you are specifying a specific version with mint run, otherwise it will have to hit the network to check what the latest version is. Also note that if the specific version isn't installed yet, it will have to do that first. If this is on CI, you can add the mint install path to your cache (which by default is /usr/local/lib/mint)
Let me know how you go

Hi @yonaskolb, it's pretty interesting. But I found the mistake. In my build phrases script I check, if mint is installed via if brew ls --versions mint > /dev/null; then. If I remove this check, all things works perfect. Do you have any idea, how can I check, if Mint is installed? The idea to check, if existing a Mintfile via if [ -e "Mintfile" ]; then isn't enough. Because if somebody hasn't installed Mint, the build phrases are not compilable. That was my idea behind the brew-check.