fix: Use doc_cfg instead of doc_auto_cfg#34
Merged
Conversation
doc_auto_cfg was removed in rust 1.92.0, and is currently stopping from docs.rs from building (https://docs.rs/crate/rust-telemetry/1.3.0). Using doc_cfg we get the same feature as doc_auto_cfg used to give us. Also, hide this behind the `docsrs` configuration option, to stop absolutely depending on nightly features when building docs. This commit will not cause docsrs to build rust-telemetry successfully. For this to work, we must update our dependencies (mostly transitive dependencies of OTEL, see #26) to newer versions that do not use `doc_auto_cfg` either.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
=======================================
Coverage 74.18% 74.18%
=======================================
Files 5 5
Lines 275 275
=======================================
Hits 204 204
Misses 71 71
Continue to review full report in Codecov by Harness.
|
emgrav
approved these changes
Jun 25, 2026
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.
doc_auto_cfgwas removed in rust 1.92.0, and is currently stopping from docs.rs from building (https://docs.rs/crate/rust-telemetry/1.3.0).Using
doc_cfgwe get the same feature asdoc_auto_cfgused to give us.Also, hide this behind the
docsrsconfiguration option, to stop absolutely depending on nightly features when building docs.This commit will not cause docsrs to build rust-telemetry successfully. For this to work, we must update our dependencies (mostly transitive dependencies of OTEL, see #26) to newer versions that do not use
doc_auto_cfgeither.But at least, if you depend on rust-telemetry you can now build
cargo docwithout it crashing.Testing
I built this on a nightly toolchain with
--all-features, and removed the docsrs requirement to get the following:If I build rust-telemetry with the docsrs configuration option, it will fail because our dependencies still use
doc_auto_cfg.