Skip to content

penny-bot package failure in swift-source-compat-suite #7521

Open
@MaxDesiatov

Description

@MaxDesiatov

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI.

Description

After separating build artifacts for host and target triples in #7118, it's no longer possible to import macro modules into modules built for the target triple. This is the desired behavior, otherwise macros would have to be built twice: once for the host triple and once for the target triple.

Unfortunately, we see that https://github.com/DiscordBM/DiscordBM library relied on that old undefined behavior, and that package is a dependency of penny-bot in swift-source-compat-suite. This issue tracks the ongoing work to resolve that failure and to clarify the current behavior in our documentation. Most likely DiscordBM dependency would have to be updated to resolve the issue.

Expected behavior

swift-source-compat-suite passes.

Actual behavior

swift-source-compat-suite fails with this error:

penny-bot/.build/checkouts/DiscordBM/Sources/DiscordModels/UnstableEnumMacro.swift:1:8: error: no such module 'UnstableEnumMacro'
 1 | import UnstableEnumMacro
   |        `- error: no such module 'UnstableEnumMacro'

Steps to reproduce

Run swift-source-compat-suite with the latest development snapshot of the Swift toolchain.

Swift Package Manager version/commit hash

8db2401

Swift & OS version (output of swift --version ; uname -a)

Apple Swift version 6.0-dev (LLVM 85bfcc565707685, Swift 250758335c888cc)
Target: arm64-apple-macosx14.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions