Package Details: swift-format 600.0.0-3

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-2.0
Submitter: ShinoYasx
Maintainer: ShinoYasx (gonsolo)
Last Packager: gonsolo
Votes: 1
Popularity: 0.000000
First Submitted: 2020-09-27 00:23 (UTC)
Last Updated: 2024-10-22 00:06 (UTC)

Latest Comments

gonsolo commented on 2024-10-22 00:07 (UTC)

@jkl: Done. Thanks.

jkl commented on 2024-10-21 20:34 (UTC)

This fails to build in a clean chroot during prepare, due to the use of some unknown $src variable for the patch source file. License ought to be SPDX identifier. This builds a native binary, so the architecture should not be "any".

--- PKGBUILD.old    2024-10-21 14:47:40.648378379 -0500
+++ PKGBUILD    2024-10-21 15:31:42.790195711 -0500
@@ -5,8 +5,8 @@
 pkgrel=2
 pkgdesc="Formatting technology for Swift source code"
 url="https://github.com/apple/swift-format"
-arch=('any')
-license=('APACHE')
+arch=('i686' 'x86_64')
+license=('Apache-2.0')
 depends=('swift-language')
 makedepends=('git')
 source=(
@@ -16,7 +16,7 @@
 sha256sums=('5d03930216701939bd34f82575a475bcb8d1962e095066449eedc5e22226d8b6'
             '15b59fbab0cdea348b9888260d5615320a1610ff8a9921438e81fd59cd42f9e8')
 prepare() {
-    patch -d $pkgname-$pkgver -Np1 < "../$src/0001-Fix-infinite-loop-on-Windows-caused-by-checking-path.patch"
+    patch -d $pkgname-$pkgver -Np1 < "$srcdir/0001-Fix-infinite-loop-on-Windows-caused-by-checking-path.patch"
     rm -rf swift-format
     mv swift-format-${pkgver} swift-format
 }

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