Package Details: scalafmt 2.4.1-1

Git Clone URL: https://aur.archlinux.org/scalafmt.git (read-only, click to copy)
Package Base: scalafmt
Description: code formatter for the Scala programming language
Upstream URL: https://scalameta.org/scalafmt/
Licenses: Apache
Submitter: wookietreiber
Maintainer: kendfinger
Last Packager: kendfinger
Votes: 8
Popularity: 0.46
First Submitted: 2016-10-20 07:59
Last Updated: 2020-02-17 11:55

Latest Comments

wookietreiber commented on 2020-01-14 09:10

@Musikolo I'm not using this package anymore. I just disowned, feel free to take over.

Musikolo commented on 2020-01-13 23:45

@wookietreiber, while building the package, I got the following error:

==> Retrieving sources...
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package()...
Exception in thread "main" java.lang.ExceptionInInitializerError
        at coursier.bootstrap.launcher.f.b(Unknown Source)
        at coursier.bootstrap.launcher.a.a(Unknown Source)
        at coursier.bootstrap.launcher.ResourcesLauncher.main(Unknown Source)
Caused by: java.lang.RuntimeException: Error creating cache directory
        at coursier.bootstrap.launcher.c.<clinit>(Unknown Source)
        ... 3 more
Caused by: java.nio.file.AccessDeniedException: /root/.cache/coursier
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:308)
        at java.nio.file.Files.createDirectories(Files.java:746)
        at coursier.bootstrap.launcher.m.a(Unknown Source)
        at coursier.bootstrap.launcher.j.a(Unknown Source)
        at coursier.bootstrap.launcher.i.a(Unknown Source)
        ... 4 more
==> ERROR: A failure occurred in package().
    Aborting...

The solution is I found is adding the following function in the PKGBUILD script right above the package() one:

prepare() {
    mkdir -p /tmp/.cache/coursier
    export COURSIER_CACHE=/tmp/.cache/coursier
}

I hope it helps!

wookietreiber commented on 2018-06-25 23:01

@marmistrz: Thanks for the pointer to the COURSIER_CACHE env variable. For my environment, setting it is not required, though. For all those (including me) who are using tmpfs on /tmp and having /tmp/makepkg as build dir, putting this to pwd means /tmp/makepkg/src/.coursier-cache. Thus the cache would be flushed on every boot. I would rather have users set their own COURSIER_CACHE than to do it in the build, if its not neccessary.

marmistrz commented on 2018-06-17 13:55

You need to first setup coursier cache, e.g.:

export COURSIER_CACHE="$(pwd)/.coursier-cache"

wookietreiber commented on 2018-05-06 08:52

Please add me as co-maintainer, I just finished a build based on coursier.