Make the `sentry` crate's `serde_json` feature a no-op

Đang mở
#1,385 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@sentry-junior đang làm issue này rồi.

Từ ngày 29/10/2026.

  • #1389 của @sentry-junior — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Start with sentry/Cargo.toml and inspect the [dependencies] and [features] entries for serde_json, while leaving the log feature unchanged. Remove the optional dependency and retain an empty, documented serde_json feature; done means existing users can still enable that feature and cargo machete no longer flags the dependency.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Rust

The sentry crate declares an optional dependency on serde_json, but nothing in sentry/src uses it (cargo machete flags it). Because it isn't referenced with dep: in [features], Cargo exposes it as an implicit serde_json feature, and that feature ships in the published 0.49.5 manifest. Deleting the dependency outright would therefore remove a public feature.

Scope:

  • Remove the unused optional serde_json dependency from sentry/Cargo.toml while keeping serde_json as an empty, soft-deprecated feature, so existing features = ["serde_json"] users keep compiling.
  • Unrelated to sentry's log feature, which enables the sentry-log integration and stays as is.
  • Cargo has no stable way to deprecate a feature in a way that warns downstream users. Build-script cargo::warning output and #[deprecated] lints are hidden for non-path dependencies, and the feature deprecation RFC is still open. So the deprecation can only be documented.

via @szokeasaurusrex.

--

View Junior Session [Sentry]

Ngôn ngữ chính
Rust
Star
755
Fork
192
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-rust

Tất cả issue của getsentry/sentry-rust

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.