Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPM Tuist PLCrashReporterError #1082

Closed
Sakhanko-Pavel opened this issue Dec 9, 2022 · 5 comments
Closed

SPM Tuist PLCrashReporterError #1082

Sakhanko-Pavel opened this issue Dec 9, 2022 · 5 comments
Labels
compilation issue SDK doesn't compile or gives warnings.

Comments

@Sakhanko-Pavel
Copy link

Sakhanko-Pavel commented Dec 9, 2022

The issue

issue: PLCrashReporterNSError.h:39:59 Unknown type name 'PLCrashReporterError'

📝 Give us the error message you receive, describe the problem, and answer the questions.

Hi!
I'm trying to add DatadogCrashReporting via Tuis and SPM to the Xcode project.
Datadog only worked as expected.

Project setup:

import DatadogCrashReporting

.enableCrashReporting(using: DDCrashReportingPlugin())

Tuist & SPM setup:

public static var datadog: TargetDependencies {
    [ .external(name: "DatadogCrashReporting") ]
}

and

public static let datadog = package(
    url: "https://github.com/DataDog/dd-sdk-ios.git",
    .upToNextMajor(from: "1.13.0")
)

Error:

Unknown type name 'PLCrashReporterError'
Use of undeclared identifier 'PLCrashReporterErrorOperatingSystem'

If I'm using this config:

Tuist & SPM setup:

public static var datadog: TargetDependencies {
    [
     .external(name: "Datadog"),
     .external(name: "DatadogCrashReporting")
    ]
}

Error:

Typedef redefinition with different types ('enum PLCrashReportTextFormat' vs 'enum PLCrashReportTextFormat')

described here tuist/tuist#4901

Datadog SDK version:

1.13.0

Dependency Manager:

Tuist + SPM

Xcode version:

14.1

Swift version:

5.7

macOS version:

Ventura 13.0.1

Could you please help?

Thanks in advance!

@Sakhanko-Pavel Sakhanko-Pavel added the compilation issue SDK doesn't compile or gives warnings. label Dec 9, 2022
@maxep
Copy link
Member

maxep commented Dec 9, 2022

Hello @Sakhanko-Pavel 👋

Can you try to link only DatadogCrashReporting, something like this in your Tuist configuration:

public static var datadog: TargetDependencies {
  [
    .external(name: "DatadogCrashReporting")
  ]
}

The reason is that DatadogCrashReporting already contain Datadog, that's why you get duplicated symbols.

@Sakhanko-Pavel
Copy link
Author

Hello @Sakhanko-Pavel 👋

Can you try to link only DatadogCrashReporting, something like this in your Tuist configuration:

public static var datadog: TargetDependencies {
  [
    .external(name: "DatadogCrashReporting")
  ]
}

The reason is that DatadogCrashReporting already contain Datadog, that's why you get duplicated symbols.

yes, the first case described this approach
Error:

Unknown type name 'PLCrashReporterError'
Use of undeclared identifier 'PLCrashReporterErrorOperatingSystem'

@maxep
Copy link
Member

maxep commented Dec 9, 2022

Ah sorry!
I've updated the description so the snippets are a bit more readable 👍

I see from tuist/tuist#4901 that you have working native project without Tuist, so I believe the issue is from the Tuist configuration, and not the Datadog SDK itself, is it?

@Sakhanko-Pavel
Copy link
Author

Ah sorry! I've updated the description so the snippets are a bit more readable 👍

I see from tuist/tuist#4901 that you have working native project without Tuist, so I believe the issue is from the Tuist configuration, and not the Datadog SDK itself, is it?

Yes, looks like the issue is on their side.
I'm just trying to resolve and understand the reason for this behavior.
Thank you, @maxep !

@maxep
Copy link
Member

maxep commented Dec 13, 2022

Thanks, @Sakhanko-Pavel !
In this case, I will close this issue as we use these tickets to track down issue from the SDK itself. Feel free to add any comment if you happen to resolve on the Tuist side, it might help others.

@maxep maxep closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilation issue SDK doesn't compile or gives warnings.
Projects
None yet
Development

No branches or pull requests

2 participants