-
-
Notifications
You must be signed in to change notification settings - Fork 372
docs: Add integrations documentation to developer-docs section #6902
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ffbbab7
chore: Add integrations documentation to developer-docs section
itaybre edc318c
Move other options to Decisions.md
itaybre 16dbf4b
Add more details regarding folder structure
itaybre 1b87987
remove pros and cons section, add tests directory to folder structure
itaybre b4695cb
Update integration documentation to clarify folder naming conventions…
itaybre 976d250
Merge branch 'main' of github.com:getsentry/sentry-cocoa into itay/in…
itaybre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # 3rd Party Library Integrations in Other Repositories | ||
|
|
||
| This document outlines our approach to managing integrations with **3rd party libraries** (such as CocoaLumberjack, SwiftLog, etc.). | ||
|
|
||
| We have identified that **SPM** downloads _all_ declared dependencies in a package, even if none the added actually added modules use them. | ||
|
|
||
| This means that if `sentry-cocoa` declares dependencies like **CocoaLumberjack** or **SwiftLog**, _all_ downstream consumers download these libraries, even if they don't use the corresponding integrations. | ||
|
|
||
| To avoid forcing unnecessary 3rd party dependencies on users, we already agreed to **remove the integrations from the main Package.swift on on this repository**. | ||
|
|
||
| However, maintaining multiple repositories introduces overhead for the team. | ||
|
|
||
| ### Goals | ||
|
|
||
| - Avoid forcing users to download unused third-party dependencies. | ||
| - Keep integration code discoverable, maintainable, and testable. | ||
| - Minimize additional team workload. | ||
|
|
||
| **Extras:** | ||
|
|
||
| - Maintain flexibility in release schedules. | ||
|
|
||
| ### Agreed solution | ||
|
|
||
| - **3: Keep all code in `sentry-cocoa`, but mirror releases into individual repositories** | ||
|
|
||
| SPM users import the integration repos, but implementation lives in `sentry-cocoa`. | ||
|
|
||
| Automated workflows push integration-specific code into dedicated repos during release. | ||
itaybre marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The idea comes from this repo: | ||
|
|
||
| https://github.com/marvinpinto/action-automatic-releases | ||
|
|
||
| Pros: | ||
|
|
||
| - Source of truth stays in **one repository**. | ||
| - Development flow simpler (single CI, single contribution workflow). | ||
| - Users still get the benefit of **modular SPM dependencies**, without downloading everything. | ||
| - Mirrors how some SDKs manage platform-specific or optional components | ||
|
|
||
| Cons: | ||
|
|
||
| - Requires building a **custom mirroring release workflow**. | ||
| - Potential risk of divergence if mirror fails or is misconfigured. | ||
| - Release cadence may still be tied to `sentry-cocoa` unless new workflows are built. | ||
| - Requires tooling to ensure code in the main repo remains cleanly partitioned. | ||
|
|
||
| > [!NOTE] | ||
itaybre marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| > For other options that were considered, see the [3rd Party Library Integrations decision in DECISIONS.md](DECISIONS.md#3rd-party-library-integrations). | ||
| ### Contributing moving forward | ||
|
|
||
| All integration development will continue in the main `sentry-cocoa` repository, organized in dedicated subdirectories for clean CI isolation. | ||
|
|
||
| #### Directory Structure | ||
|
|
||
| Each integration will be self-contained in `3rd-party-integration/INTEGRATION-NAME/` with: | ||
|
|
||
| - `Sources/` - Integration source code | ||
itaybre marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `README.md` - Integration-specific documentation | ||
| - `Package.swift` - SPM package definition | ||
| - `*.podspec` - CocoaPods specification | ||
|
|
||
| **Example:** | ||
|
|
||
| ``` | ||
| 3rd-party-integration/ | ||
| ├── CocoaLumberjack/ | ||
itaybre marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| │ ├── Sources/ | ||
| │ ├── README.md | ||
| │ ├── Package.swift | ||
| │ └── SentryCocoaLumberjack.podspec | ||
| └── SwiftLog/ | ||
| ├── Sources/ | ||
| ├── README.md | ||
| ├── Package.swift | ||
| └── SentrySwiftLog.podspec | ||
| ``` | ||
|
|
||
| #### Release Process | ||
|
|
||
| During each release, automated workflows will: | ||
|
|
||
| 1. Extract the integration directory contents | ||
| 2. Push to the dedicated integration repository (e.g., `sentry-cocoa-swift-log`) | ||
| 3. Create a tagged release matching the main SDK version | ||
|
|
||
| > [!NOTE] | ||
| > This process will be automated via GitHub Actions. Initial releases may be handled manually while tooling is being developed. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.