Skip to content

Docc convert fails in docker image with swift 6 #1217

Open
@tverboon

Description

@tverboon

Description

I am working on a Swift docc project that consists of only manually created markdown files (--template articleOnly). No symbols or something else.

We want to convert the docc with a GitHub action for static hosting. When using the Swift 6.1 or 6.0 docker base image, this operation fails.

Using Swift 5.9 as base image, convert succeeds. Very nice! 👍

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

Expected Behavior

The docc convert operation succeeds, like it did with Docker image swift:5.9

Actual behavior

The docc convert operation failes with the following error:

Error: Error Domain=NSCocoaErrorDomain Code=512 "(null)"UserInfo={NSSourceFilePathErrorKey=/github/workspace/src/Midmid.Platform.Api.Docs/docs.docc/Resources/optional.svg, NSUserStringVariant=["Copy"], NSDestinationFilePath=/tmp/C445329D-DFCE-4573-B177-6AE338E38B10-7-00001ED6DC3F9EB7/images/docs/optional.svg, NSFilePath=/github/workspace/src/Midmid.Platform.Api.Docs/docs.docc/Resources/optional.svg, NSURL=file:///github/workspace/src/Midmid.Platform.Api.Docs/docs.docc/Resources/optional.svg, NSUnderlyingError=Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument"}

Steps To Reproduce

I will provide my scripts and docker file:

Dockerfile

FROM swift:6.1

COPY run.sh /run.sh

ENTRYPOINT ["/run.sh"]
#!/usr/bin/env bash

echo "Building documents in: $1"

docc convert /github/workspace/$1 --transform-for-static-hosting --output-dir /github/workspace/$2

echo "Build result in: $2"

Swift-DocC Version Information

6.1

Swift Compiler Version Information

Swift version 6.1 (swift-6.1-RELEASE)
Target: aarch64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions