Skip to content

Critical Flaw: Compiler Error Due to Name Ambiguity in KSCrash when compiling the SDK #297

Description

@br3akzero

Describe the bug
When compiling my framework with Rollbar-Apple, a compiler error occurs. The issue seems to be caused by KSCrash, exposing a class that has the same name as the module KSCrash. This name ambiguity leads to a compiler error, similar to the one listed in swiftlang/swift#64669.

To Reproduce
Steps to reproduce the behavior:

  1. Add the Rollbar-Apple dependency to a Swift framework project.
  2. Import Rollbar Notifier
  3. Try to archive the framework.
    The compiler error occurs.

Expected behavior
I expected the framework to compile successfully without errors, even when including Rollbar-Apple as a dependency.

Screenshots
Screenshot 2023-06-12 at 13 40 13

Rollbar-Apple SDK version: 3.0.0

Xcode Versions Used:

  • 14.2
  • 14.3
  • 14.3.1

Swift Version Used:

  • 5.7
  • 5.8

Additional Context
When trying to ignore this error with the -no-verify-emitted-module-interface compiler flag, the compiled .swiftinterface file ends up broken and unusable. This issue appears to be a limitation of the Swift compiler when a type has the same name as a module. I believe adjusting the naming in KSCrash to avoid this ambiguity could solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions