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

Structured Tracing Serialization/Deserialization #2113

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/check_msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,24 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: --all --exclude=tracing-appender
args: --all --exclude=tracing-appender --exclude=tracing-serde

# TODO: remove this once tracing's MSRV is bumped.
check-msrv-serde:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hawkw let me know if you want me to roll this into the next item to save CI time. Technically, it does build just fine on 1.51 tho, if you want to keep those separate (probably doesn't matter for v0.2 release)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Either way, I should fix the copy/paste error in the comment)

Copy link
Member

Choose a reason for hiding this comment

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

hmm, i would really prefer not to do a global MSRV bump, since tracing/tracing-core are dependencies of tokio, and i don't want to have to bump tokio's MSRV. having separate MSRVs for non-core crates is annoying, but it's probably preferable --- esp. since we would want to backport the tracing-serde changes to v0.1.x.

this is part of why i think it's probably a good idea to eventually move all of the non-core crates (such as tracing-serde) into their own repos...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, to pull in heapless, we need 1.51. I could write my own collection types on top of a fixed size array (or use an older version of heapless I guess?) but it'd have relatively low value. You know your MSRV guarantees better than me tho.

# Run `cargo check` on our minimum supported Rust version (1.53.0).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --lib=tracing-serde

# TODO: remove this once tracing's MSRV is bumped.
check-msrv-appender:
Expand All @@ -60,4 +77,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: --lib=tracing-appender
args: --lib=tracing-appender
5 changes: 3 additions & 2 deletions tracing-serde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ categories = [
"encoding",
]
keywords = ["logging", "tracing", "serialization"]
rust-version = "1.49.0"
rust-version = "1.51.0"

[features]
default = ["std"]
std = ["serde/std", "tracing-core/std"]

[dependencies]
serde = { version = "1", default-features = false, features = ["alloc"] }
serde = { version = "1", default-features = false, features = ["alloc", "derive"] }
tracing-core = { path = "../tracing-core", version = "0.2", default-features = false }
heapless = { version = "0.7.10", features = ["serde"] }

[dev-dependencies]
serde_json = "1"
Expand Down
55 changes: 0 additions & 55 deletions tracing-serde/src/fields.rs

This file was deleted.

Loading