Repository navigation
fix: drop chrono, and cover the lines rust 1.100 counts - #6
Merged
Merged
Conversation
Rust 1.100 counts two things as lines that older compilers did not: the implicit else of an if let, and the copy of a tracing event that goes to the log crate when no tracing subscriber is set. The coverage check went from 100% to 99.75% on main with no code change. The cookie header is now set through an extend instead of an if let, and a test in its own binary installs a log logger with no tracing subscriber, checking that the audit event and the missing index.html warning still reach a service that logs through the log crate. A second test checks that warning under a tracing subscriber.
llvm-cov's summary keeps, per function, the single copy (unit test build, integration build, generic instantiation) that covers the most lines, not their union. header_block and UiAssets::new were covered only across copies, which the summary counts as a missed line even though every line runs.
chrono is flagged unmaintained (RUSTSEC-2026-0543), which fails cargo deny. The one use, a file's modification time as RFC 3339, moves to jiff 0.2 (the line croner uses, so services carry a single jiff), keeping the exact string chrono gave: a +00:00 offset and the fraction in groups of three digits. Checked against chrono on 200,000 instants, before 1970 included.
Merged
fernandorocagonzalez
pushed a commit
that referenced
this pull request
Nov 17, 2026
🤖 I have created a release *beep* *boop* --- ## [0.3.1](v0.3.0...v0.3.1) (2026-11-17) ### Fixed * drop chrono, and cover the lines rust 1.100 counts ([#6](#6)) ([78984e2](78984e2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two things that have to land together, because each one is blocking the other's checks.
chrono is gone. Since today cargo deny fails on main with RUSTSEC-2026-0543 (chrono is unmaintained). The only use was formatting a file's modification time as RFC 3339 in the config listing. It now uses jiff 0.2, which is the line croner uses, so services end up with a single jiff. The string stays exactly as chrono gave it:
+00:00instead ofZ, and the fraction in groups of 3, 6 or 9 digits. I compared it against chrono on 200,000 instants, including some before 1970, with zero differences, and a unit test pins that shape.Coverage back to 100%. The test check also fails on main with no code change, because the runner moved to rust 1.100:
if letthat sets the session cookie now counts as a line. The header goes in throughextendand behaviour doesn't change.logcrate when there is no tracing subscriber now counts too. axum turns tracing's log feature on, so that path is real. tests/log_fallback_test.rs (its own binary, since the logger is global) checks that the audit event and the missing index.html warning reach aloglogger.Checked in a container with the same toolchain as CI (rust 1.100.0, cargo-llvm-cov 0.9.1): 100% lines, all tests green.