feat: publish posthog with posthog-rs compatibility crate - #183
feat: publish posthog with posthog-rs compatibility crate#183dustinbyrne wants to merge 1 commit into
Conversation
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
scripts/publish-crate-mirror.sh:56
**Renamed Crate Breaks Packaged Targets**
Changing the default library name to `posthog` leaves the packaged examples, integration tests, and doctests importing `posthog_rs`. The publish dry run can build the library without compiling all of these targets, so the release can succeed even though consumers running the included examples or `cargo test --all-targets` receive unresolved-crate errors.
Reviews (1): Last reviewed commit: "feat: mirror releases to posthog crate" | Re-trigger Greptile |
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
Closes #178 |
20c4daf to
a147434
Compare
posthog-rs-v0 Compliance ReportDate: 2026-08-11 18:42:38 UTC ✅ All Tests Passed!46/46 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
posthog-rs-v1 Compliance ReportDate: 2026-08-11 18:43:23 UTC ✅ All Tests Passed!111/111 tests passed Capture_V1 Tests✅ 94/94 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
|
[arno's agent] The only approval predates the complete rework from the scripts/publish approach to the compatibility-crate design, so a fresh review of the current shape is needed before publishing. |
|
[arno's agent] A stale third-party posthog 0.1.0 placeholder is still resolvable on crates.io; worth confirming ownership transfer completed before the workflow attempts the first publish under that name. |
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
Reviews (2): Last reviewed commit: "feat: publish posthog with compatibility..." | Re-trigger Greptile |
779744d to
032b675
Compare
032b675 to
52801b6
Compare
💡 Motivation and Context
Publish the official Rust SDK under the canonical
posthogpackage and import name without shipping two independent copies of the implementation.The repository root is now the
posthogimplementation crate. A smallposthog-rsworkspace package preserves compatibility for existing users by depending onposthog, forwarding every feature, and re-exporting its public API. Applications using both names therefore share the same underlying SDK types and implementation. Runtime and wire telemetry identity intentionally remainsposthog-rs.Sampo keeps both package versions synchronized. Releases publish
posthogbefore the dependent compatibility crate, independently skip versions already present on crates.io, and can resume the exact release commit through Re-run failed jobs after a partial failure.Both crates need crates.io Trusted Publishing configured for this repository,
release.yml, and theReleaseenvironment before the first release.💚 How did you test it?
cargo fmt --all -- --checkcargo clippy -- -D warningsscripts/check-compatibility-crate.shcargo publish --workspace --dry-run --locked --package posthog --package posthog-rsposthog; the compatibility archive contains seven small facade filesEventtypes are identical with one implementation in the dependency graph📝 Checklist
If releasing new changes
sampo addto generate a changeset file