From 95cb3309f22beb0de401a0800453a54d307a6424 Mon Sep 17 00:00:00 2001 From: ApsisRS contributors Date: Fri, 2 Oct 2026 08:50:32 +0800 Subject: [PATCH] docs: resolve the facade re-export links and check the default-feature docs The facade module doc linked the re-exported crates with intra-doc links, which only resolve when the matching feature is on. With the default feature set, cargo doc reported ten unresolved links. The names are now plain code spans, so both builds are clean, and CI checks the default feature set as well. --- .github/workflows/ci.yml | 11 +++++++++++ crates/apsis-rs/src/lib.rs | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0651bf3..24413ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,17 @@ jobs: env: RUSTDOCFLAGS: -D warnings run: cargo doc --workspace --all-features --no-deps + - name: Documentation with default features + # A downstream reader runs `cargo doc` on the default feature set, + # where the facade re-exports nothing, so a link to a re-exported + # crate does not resolve. The all-features build above would not + # catch that, so it is checked here. + # 下游读者会在默认特性集上运行 `cargo doc`,那里门面不重导出任何 + # 东西,故指向被重导出 crate 的链接无法解析。上面的全特性构建捕获 + # 不到这一点,故在此检查。 + env: + RUSTDOCFLAGS: -D warnings + run: cargo doc --workspace --no-deps - name: Check the layer rule # README.md states that a crate may only depend on layers to its # left. Nothing else in the build enforces that, so a reverse diff --git a/crates/apsis-rs/src/lib.rs b/crates/apsis-rs/src/lib.rs index 8de7fc2..d9197f6 100644 --- a/crates/apsis-rs/src/lib.rs +++ b/crates/apsis-rs/src/lib.rs @@ -14,8 +14,8 @@ //! depend on it directly and enable the feature that matches the layers they //! need. Each feature re-exports the crates of one layer and pulls in the //! features of the layers below it. For example, the `orbit` feature enables -//! `physics` and re-exports [`apsis_orbit`], [`apsis_tle`], [`apsis_sgp4`], -//! [`apsis_kepler`], and [`apsis_ephemeris`]. +//! `physics` and re-exports `apsis_orbit`, `apsis_tle`, `apsis_sgp4`, +//! `apsis_kepler`, and `apsis_ephemeris`. //! //! The `full` feature enables every layer, including `sim`. Because `sim` //! aggregates all other layers and is only needed by simulation workloads, @@ -35,8 +35,8 @@ //! //! 本 crate 是名为 `apsis-rs` 的公共门面。下游项目直接依赖它,并启用与其 //! 所需层相匹配的特性。每个特性重导出某一层的各 crate,并引入其下方各层 -//! 的特性。例如,`orbit` 特性启用 `physics`,并重导出 [`apsis_orbit`]、 -//! [`apsis_tle`]、[`apsis_sgp4`]、[`apsis_kepler`] 与 [`apsis_ephemeris`]。 +//! 的特性。例如,`orbit` 特性启用 `physics`,并重导出 `apsis_orbit`、 +//! `apsis_tle`、`apsis_sgp4`、`apsis_kepler` 与 `apsis_ephemeris`。 //! //! `full` 特性启用每一层,包括 `sim`。因为 `sim` 聚合了其余所有层且只为 //! 仿真工作负载所需,不运行仿真的项目可以改而启用 `ops`,它启用除 `sim`