Skip to content

chore: Remove unused vendored Force.Crc32 - #5854

Merged
jamescrosswell merged 1 commit into
mainfrom
chore/remove-unused-force-crc32
Nov 2, 2026
Merged

jamescrosswell merged 1 commit into
mainfrom
chore/remove-unused-force-crc32

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Removes src/Sentry/Force.Crc32/, the copy of force-net's Crc32.NET vendored into the core package (Sentry.Force.Crc32.Crc32Algorithm, Sentry.Force.Crc32.SafeProxy, plus its LICENSE and README; 304 lines). Nothing uses it.

When it was added: #3092 (feat: Metrics.Set now accepts string as value, merged 2024-01-30). MetricAggregator used Crc32Algorithm.Compute(Encoding.UTF8.GetBytes(value)) to hash string values for Metrics.Set.

When it became irrelevant, and why: #3718 (Removed Metrics (deprecated), merged 2024-10-30 into version-5.0.0, shipped in 5.0.0 on 2024-12-19) deleted src/Sentry/MetricAggregator.cs, which held the only call. The vendored files weren't part of that PR, so they stayed behind. The only commit to touch them since #3092 is the formatting pass in #3097.

Evidence it's unused:

  • Searching the repo outside modules/ for Crc32Algorithm, SafeProxy, Sentry.Force or Crc32.NET finds only the deleted files. The GzipCrc32 in the Android assembly reader's ELFSharp code is a separate implementation.
  • The current metrics code (MetricHelper etc.) doesn't hash with CRC32.

Why it's safe: every type is internal, so there's no public API change and the API approval snapshots don't change. Nothing constructed it, so runtime behavior doesn't change. No target framework or package dependency changes.

Checks:

  • dotnet build src/Sentry/Sentry.csproj -c Release passes for net8.0, net9.0, net10.0, netstandard2.0, netstandard2.1 and net462, with no warnings.
  • Sentry.Tests on net10.0: 2,697 passed, 0 failed, 5 skipped. No snapshot changes.
  • Not run locally: the Android, iOS and Mac Catalyst targets (no mobile workloads in the sandbox), and tests on net8.0, net9.0 and net462. The sandbox didn't have the pinned workload version, so I removed workloadVersion from global.json for the local build only. That change isn't committed.

#skip-changelog

via automation sched_2fb5d12bd3a78841d7d2559c56e8141d · Run ID sched_2fb5d12bd3a78841d7d2559c56e8141d:1793602800000.

--

View Session [Sentry]

Its only caller was MetricAggregator's string hashing for Metrics.Set, which was removed with the deprecated Metrics API in #3718.
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.70%. Comparing base (2e5b891) to head (f10e1cf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5854      +/-   ##
==========================================
+ Coverage   76.37%   76.70%   +0.33%     
==========================================
  Files         530      528       -2     
  Lines       19608    19527      -81     
  Branches     3854     3840      -14     
==========================================
+ Hits        14975    14978       +3     
+ Misses       3749     3665      -84     
  Partials      884      884              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell
jamescrosswell marked this pull request as ready for review November 2, 2026 08:09
@jamescrosswell jamescrosswell added the skip-changelog Suppress automatic changelog generation via Craft label Nov 2, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 2, 2026
@jamescrosswell
jamescrosswell merged commit 193656c into main Nov 2, 2026
85 of 86 checks passed
@jamescrosswell
jamescrosswell deleted the chore/remove-unused-force-crc32 branch November 2, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium skip-changelog Suppress automatic changelog generation via Craft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant