Skip to content

unsafeFlags introduced in Markdown 0.7.0 causes SwiftPM dependency resolution failures #239

@dlskawns96

Description

@dlskawns96

Hello,

Starting from version 0.7.0, the Markdown target includes the following in its swiftSettings:

swiftSettings: [
    .unsafeFlags(["-Xcc", "-DCMARK_GFM_STATIC_DEFINE"],
                 .when(platforms: [.windows])),
]

This introduces unsafeFlags into the package manifest. Unfortunately, SwiftPM disallows using packages that contain unsafe build flags as normal (tagged) dependencies in application targets. As a result, projects that depend on swift-markdown via SwiftPM are now unable to resolve the package, failing with the error:

the target 'Markdown' in product 'Markdown' contains unsafe build flags

This is particularly problematic for iOS/macOS projects and CI environments (e.g. Bitrise, Xcode Cloud), which previously built successfully with versions ≤ 0.6.x.

Could you please clarify whether this was intentional, and if there is a recommended workaround for SwiftPM clients?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions