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 Support #2280

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

SPM Support #2280

wants to merge 22 commits into from

Conversation

denrase
Copy link
Collaborator

@denrase denrase commented Sep 10, 2024

📜 Description

Migration: https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors#how-to-add-swift-package-manager-support-to-an-existing-flutter-plugin

Enable SPM: https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors#how-to-turn-on-swift-package-manager

  • Setup iOS project for SPM
  • Setup macOS project for SPM
  • Update plugin to import Hybrid SDK for Pods & SPM

💡 Motivation and Context

Closes #2250

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link
Contributor

github-actions bot commented Sep 10, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against cc12932

Copy link
Contributor

github-actions bot commented Sep 10, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 441.94 ms 500.86 ms 58.92 ms
Size 6.49 MiB 7.57 MiB 1.08 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
74e1fdd 398.61 ms 418.43 ms 19.82 ms
b49bf00 323.46 ms 375.35 ms 51.89 ms
d0312c9 354.78 ms 411.53 ms 56.75 ms
7f2b01d 304.94 ms 345.71 ms 40.78 ms
521cfbf 332.78 ms 376.04 ms 43.26 ms
039058a 448.52 ms 512.55 ms 64.03 ms
24b6e60 440.64 ms 557.96 ms 117.32 ms
33d0587 308.79 ms 370.86 ms 62.07 ms
2b9937e 439.68 ms 478.38 ms 38.70 ms
f056db1 426.04 ms 475.76 ms 49.72 ms

App size

Revision Plain With Sentry Diff
74e1fdd 6.33 MiB 7.27 MiB 954.12 KiB
b49bf00 6.06 MiB 7.10 MiB 1.04 MiB
d0312c9 6.33 MiB 7.26 MiB 949.76 KiB
7f2b01d 5.94 MiB 6.95 MiB 1.01 MiB
521cfbf 5.94 MiB 6.97 MiB 1.03 MiB
039058a 6.52 MiB 7.59 MiB 1.06 MiB
24b6e60 6.33 MiB 7.26 MiB 950.14 KiB
33d0587 6.16 MiB 7.14 MiB 1007.47 KiB
2b9937e 6.49 MiB 7.56 MiB 1.07 MiB
f056db1 6.52 MiB 7.61 MiB 1.09 MiB

Previous results on branch: feat/spm

Startup times

Revision Plain With Sentry Diff
a4e2e38 459.34 ms 506.62 ms 47.28 ms
160e5a5 460.87 ms 509.56 ms 48.69 ms
8adbf8e 481.79 ms 530.56 ms 48.77 ms
acc2ff0 470.52 ms 510.29 ms 39.77 ms

App size

Revision Plain With Sentry Diff
a4e2e38 6.49 MiB 7.57 MiB 1.08 MiB
160e5a5 6.49 MiB 7.57 MiB 1.08 MiB
8adbf8e 6.49 MiB 7.55 MiB 1.07 MiB
acc2ff0 6.49 MiB 7.57 MiB 1.08 MiB

Copy link
Contributor

github-actions bot commented Sep 10, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1234.78 ms 1256.79 ms 22.01 ms
Size 8.38 MiB 9.75 MiB 1.37 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d4d0807 1246.94 ms 1260.69 ms 13.75 ms
f9d18f3 1240.20 ms 1242.78 ms 2.57 ms
04bd9e6 1230.78 ms 1250.71 ms 19.94 ms
051e97a 1245.94 ms 1249.51 ms 3.57 ms
b8562d0 1249.92 ms 1267.56 ms 17.64 ms
affcf07 1240.61 ms 1266.49 ms 25.88 ms
2e8b1e1 1247.45 ms 1263.67 ms 16.22 ms
0f067d3 1245.71 ms 1269.59 ms 23.88 ms
f1314d5 1246.46 ms 1270.92 ms 24.46 ms
e239c83 1248.40 ms 1269.28 ms 20.89 ms

App size

Revision Plain With Sentry Diff
d4d0807 8.33 MiB 9.64 MiB 1.31 MiB
f9d18f3 8.29 MiB 9.36 MiB 1.07 MiB
04bd9e6 8.33 MiB 9.61 MiB 1.27 MiB
051e97a 8.28 MiB 9.34 MiB 1.06 MiB
b8562d0 8.33 MiB 9.54 MiB 1.22 MiB
affcf07 8.38 MiB 9.70 MiB 1.33 MiB
2e8b1e1 8.33 MiB 9.64 MiB 1.31 MiB
0f067d3 8.32 MiB 9.52 MiB 1.20 MiB
f1314d5 8.10 MiB 9.08 MiB 1004.30 KiB
e239c83 8.38 MiB 9.74 MiB 1.36 MiB

Previous results on branch: feat/spm

Startup times

Revision Plain With Sentry Diff
acc2ff0 1223.71 ms 1233.08 ms 9.37 ms
160e5a5 1250.08 ms 1277.88 ms 27.79 ms
8adbf8e 1258.88 ms 1281.85 ms 22.97 ms

App size

Revision Plain With Sentry Diff
acc2ff0 8.38 MiB 9.75 MiB 1.37 MiB
160e5a5 8.38 MiB 9.75 MiB 1.37 MiB
8adbf8e 8.38 MiB 9.73 MiB 1.36 MiB

# Conflicts:
#	flutter/.gitignore
#	flutter/ios/sentry_flutter.podspec
uses locally build Swift.framwork for sim only
Copy link
Contributor

github-actions bot commented Nov 5, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.52%. Comparing base (04211b9) to head (cc12932).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2280       +/-   ##
===========================================
+ Coverage   78.37%   91.52%   +13.15%     
===========================================
  Files          35       87       +52     
  Lines        1489     3045     +1556     
===========================================
+ Hits         1167     2787     +1620     
+ Misses        322      258       -64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

Copy link
Contributor

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

Copy link
Contributor

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

Copy link
Contributor

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

# Conflicts:
#	flutter/ios/sentry_flutter.podspec
Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/ios/Classes/SentryFlutterPluginApple.swift

# Conflicts:
#	flutter/ios/Classes/SentryFlutterPlugin.h
# Conflicts:
#	flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift
@denrase
Copy link
Collaborator Author

denrase commented Dec 9, 2024

@buenaflor Works with SPM, but we still need to wait until sentry-cocoa is out of beta.

Bildschirmfoto 2024-12-09 um 16 16 14

@@ -344,6 +344,8 @@
);
```

- SPM Support ([#2280](https://github.com/getsentry/sentry-dart/pull/2280))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 🚫 The changelog entry seems to be part of an already released section ## 8.12.0.
    Consider moving the entry to the ## Unreleased section, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swift Package Manger Support
2 participants