newrelic / newrelic-ios-agent-spm

This repository hosts the Swift Package Manager deployment of the iOS agent
Apache License 2.0
15 stars 9 forks source link

Precompiled binary 7.4.5 don't work properly in Xcode 14.x #37

Open dropski opened 1 year ago

dropski commented 1 year ago

There is a problem with debugging application using version 7.4.5 with Xcode 14.x

Description

If you are trying to hold your app on breakpoint and print out data to console, you'll get the warning:

warning: Swift error in scratch context: error: compiled module was created by a different version of the compiler; rebuild 'NewRelic' and try again: NewRelic

Steps to Reproduce

Add a breakpoint somewhere in your code using Xcode 14.x and try to run command po <object> in console

Expected Behavior

Properly printed data

Relevant Logs / Console output

warning: Swift error in scratch context: error: compiled module was created by a different version of the compiler; rebuild 'NewRelic' and try again: NewRelic

Your Environment

Xcode 14.3.1

Additional context

I guess the problem exists because it's precompiled binary and it's compiled with Xcode 15. One of the possible solution is create package wit source code, so then it will compile using proper version of the compiler. Or at least you should add an information to README.md which version of library should be used on which version of Xcode.

cdillard-NewRelic commented 1 year ago

The New Relic xcframwork has not been compiled with Xcode 15. There appears to be a a bug in Xcode that is not related to New Relic. take New Relic out of the project and you'll see the lldb error remains. We will investigate this Xcode bug for our next release.

cdillard-NewRelic commented 1 year ago

Futhermore, you'll see the issue reported is only a warning with NewRelic, NewRelic is not preventing LLDB from working, that is the Xcode bug.

dropski commented 1 year ago

Yes it's a warning but it preventing to print out anything to console.