Skip to content

Commit 0bab8f0

Browse files
authored
Merge pull request #107 from RAprogramm/eye-of-ra/fix-docs.rs-build-failure-for-0.2.14
Fix docs.rs compatibility after doc_auto_cfg removal
2 parents a4611fa + 3a9672d commit 0bab8f0

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.2.15] - 2025-10-05
11+
### Fixed
12+
- Restored compatibility with the latest nightly toolchains by probing support
13+
for `doc_cfg` and `doc_auto_cfg`, ensuring docs.rs builds succeed after the
14+
upstream removal of `doc_auto_cfg`.
15+
16+
### Changed
17+
- Emitted explicit `cargo:rustc-check-cfg` declarations for both documentation
18+
capability flags so that future compilers surface helpful diagnostics when
19+
the build script conditions fall out of sync.
20+
1021
## [0.2.14] - 2025-10-03
1122
### Fixed
1223
- Guarded the nightly-only `doc_auto_cfg` attribute behind a compiler channel

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "telegram-webapp-sdk"
3-
version = "0.2.14"
3+
version = "0.2.15"
44
rust-version = "1.90"
55
edition = "2024"
66
description = "Telegram WebApp SDK for Rust"

build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
fn main() {
2+
println!("cargo:rustc-check-cfg=cfg(has_doc_cfg)");
23
println!("cargo:rustc-check-cfg=cfg(has_doc_auto_cfg)");
34

4-
if version_check::Channel::read().is_some_and(|channel| channel.supports_features()) {
5+
if version_check::supports_feature("doc_cfg").unwrap_or(false) {
6+
println!("cargo:rustc-cfg=has_doc_cfg");
7+
}
8+
9+
if version_check::supports_feature("doc_auto_cfg").unwrap_or(false) {
510
println!("cargo:rustc-cfg=has_doc_auto_cfg");
611
}
712
}

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![doc = include_str!("../README.md")]
2-
#![cfg_attr(all(docsrs, has_doc_auto_cfg), feature(doc_auto_cfg))]
2+
#![cfg_attr(all(docsrs, has_doc_cfg), feature(doc_cfg))]
3+
#![cfg_attr(all(docsrs, not(has_doc_cfg), has_doc_auto_cfg), feature(doc_auto_cfg))]
34

45
pub mod api;
56
pub mod core;

0 commit comments

Comments
 (0)