Generate-documentation failing for swift 6 pre-release

Even with a simple new project created with
swiftpm init --name app --type executable
and adding
dependencies: [
.package(url: "GitHub - swiftlang/swift-docc-plugin: Swift Package Manager command plugin for Swift-DocC", from: "1.0.0"),
],
to Package swift, I get the following error when running
swift package plugin generate-documentation
...
Building documentation for 'app'...
Error: Error Domain=NSCocoaErrorDomain Code=513 "You don't have permission."
error: 'docc convert' invocation failed with a nonzero exit code: '1'
error: Error Domain=NSCocoaErrorDomain Code=4 "The file doesn't exist."

The error does not occur using swift 5.10.1.

But using
swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a-ubi9 on AlmaLinux 9
swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-19-a-centos7.tar.gz on Almalinux 8
swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a-ubuntu20.04 on Ubuntu 20.04 (tried 2 different installations)
I get this error.

Would be grateful if anyone could offer a workaround. Unfortunately the error message does not say which permission or which file is missing.

1 Like