Package Details: swift-format 510.1.0-1

Git Clone URL: https://aur.archlinux.org/swift-format.git (read-only, click to copy)
Package Base: swift-format
Description: Formatting technology for Swift source code
Upstream URL: https://github.com/apple/swift-format
Licenses: Apache
Submitter: ShinoYasx
Maintainer: ShinoYasx (gonsolo)
Last Packager: ShinoYasx
Votes: 1
Popularity: 0.000000
First Submitted: 2020-09-27 00:23 (UTC)
Last Updated: 2024-04-27 10:05 (UTC)

Required by (0)

Sources (1)

Latest Comments

gonsolo commented on 2024-04-27 08:31 (UTC) (edited on 2024-04-27 08:32 (UTC) by gonsolo)

Latest update (with email to maintainer):

# Maintainer: Hugo Haldi <hugo dot haldi at gmail dot com>

pkgname=swift-format
pkgver=510.1.0
pkgrel=1
pkgdesc="Formatting technology for Swift source code"
url="https://github.com/apple/swift-format"
arch=('any')
license=('APACHE')
depends=('swift-language')
makedepends=('git')
source=("swift-format-${pkgver}.tar.gz::https://github.com/apple/swift-format/archive/${pkgver}.tar.gz")
sha256sums=('2174db6f721e66ddc95263239e4dd6112f81833bbf9cd4051cf9d3dca0f7b7fe')
prepare() {
    rm -rf swift-format
    mv swift-format-${pkgver} swift-format
}

build() {
    cd "$srcdir/swift-format"
    swift build -c release
}

check() {
    cd "$srcdir/swift-format"
    swift test --parallel
}

package() {
    cd "$srcdir/swift-format"
    mkdir -p "$pkgdir/usr/bin"
    install -m755 .build/release/swift-format "$pkgdir/usr/bin"
}

JisuWoniu commented on 2024-01-25 07:14 (UTC)

Apply this patch to use the latest build, and fix the _InternalSwiftSyntaxParser error.

diff --git a/PKGBUILD b/PKGBUILD
index 12869c7..6006087 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Hugo Haldi <hugo dot haldi at gmail dot com>

 pkgname=swift-format
-pkgver=0.50300.0
+pkgver=509.0.0
 pkgrel=1
 pkgdesc="Formatting technology for Swift source code"
 url="https://github.com/apple/swift-format"
@@ -9,7 +9,7 @@ arch=('any')
 license=('APACHE')
 depends=('swift-language')
 source=("swift-format-${pkgver}.tar.gz::https://github.com/apple/swift-format/archive/${pkgver}.tar.gz")
-sha256sums=('1bd9916234e2f7c525694d1a48865b8e6f753c4bae26c4acd8ee55885c87ae29')
+sha256sums=('3041b470f6de7c156cf5898bc59645073c29def8dea66f9f356681163cae371e')

 prepare() {
     rm -rf swift-format

MikeWalrus commented on 2023-11-14 10:09 (UTC)

Please add git to makedepends.

WalterSmuts commented on 2023-09-12 14:39 (UTC)

I'm getting what looks like dependency errors when compiling:

/home/walter/.cache/yay/swift-format/src/swift-format/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxParser.swift:17:8: error: no such module '_InternalSwiftSyntaxParser'
import _InternalSwiftSyntaxParser