Fix all deprecation warnings & restructure targets making TelemetryDeck main one #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #176.
Previously, when I added the new
TelemetryDeck
target to the package, I conservatively kept all the main code inside the oldTelemetryClient
target and importedTelemetryClient
intoTelemetryDeck
. I was also hesitant to rename the package at the top level fromTelemetryClient
toTelemetryDeck
, just to be sure not too many changes happen at once leading to too much frustration.The outcome was that we were still using the old methods and calling them from the old ones, leading to deprecation warnings inside the package itself. In this PR, I went the next steps and moved the main logic into the new methods, so that the old methods are now calling into the new ones, making away with all the deprecation warnings. I also moved all the files from the
TelemetryClient
target into theTelemetryDeck
target and reversed which target was importing which.Additionally, I also renamed the package from
TelemetryClient
toTelemetryDeck
. This should not have any consequences for Xcode users as Xcode should automatically pick up any package name changes. I've tested this in thefeature/fix-warnings
branch in the PirateMetrics repo. It should also not affect any Swift packages that depend on our SDK, such as server apps, because they specify the repo nameSwiftSDK
which hasn't changed, like so:So I believe that everything should continue to work and the hiccups for users should be minimal. But it's still worth asking for user feedback when this change is released in a future version, maybe even before on the
main
branch.