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.
This commit is contained in:
ApsisRS contributors 2026-10-02 08:50:32 +08:00
parent d37ca8f919
commit 95cb3309f2
2 changed files with 15 additions and 4 deletions

View File

@ -56,6 +56,17 @@ jobs:
env: env:
RUSTDOCFLAGS: -D warnings RUSTDOCFLAGS: -D warnings
run: cargo doc --workspace --all-features --no-deps 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 - name: Check the layer rule
# README.md states that a crate may only depend on layers to its # README.md states that a crate may only depend on layers to its
# left. Nothing else in the build enforces that, so a reverse # left. Nothing else in the build enforces that, so a reverse

View File

@ -14,8 +14,8 @@
//! depend on it directly and enable the feature that matches the layers they //! 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 //! 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 //! features of the layers below it. For example, the `orbit` feature enables
//! `physics` and re-exports [`apsis_orbit`], [`apsis_tle`], [`apsis_sgp4`], //! `physics` and re-exports `apsis_orbit`, `apsis_tle`, `apsis_sgp4`,
//! [`apsis_kepler`], and [`apsis_ephemeris`]. //! `apsis_kepler`, and `apsis_ephemeris`.
//! //!
//! The `full` feature enables every layer, including `sim`. Because `sim` //! The `full` feature enables every layer, including `sim`. Because `sim`
//! aggregates all other layers and is only needed by simulation workloads, //! aggregates all other layers and is only needed by simulation workloads,
@ -35,8 +35,8 @@
//! //!
//! 本 crate 是名为 `apsis-rs` 的公共门面。下游项目直接依赖它,并启用与其 //! 本 crate 是名为 `apsis-rs` 的公共门面。下游项目直接依赖它,并启用与其
//! 所需层相匹配的特性。每个特性重导出某一层的各 crate,并引入其下方各层 //! 所需层相匹配的特性。每个特性重导出某一层的各 crate,并引入其下方各层
//! 的特性。例如,`orbit` 特性启用 `physics`,并重导出 [`apsis_orbit`]、 //! 的特性。例如,`orbit` 特性启用 `physics`,并重导出 `apsis_orbit`、
//! [`apsis_tle`]、[`apsis_sgp4`]、[`apsis_kepler`] 与 [`apsis_ephemeris`]。 //! `apsis_tle`、`apsis_sgp4`、`apsis_kepler` 与 `apsis_ephemeris`。
//! //!
//! `full` 特性启用每一层,包括 `sim`。因为 `sim` 聚合了其余所有层且只为 //! `full` 特性启用每一层,包括 `sim`。因为 `sim` 聚合了其余所有层且只为
//! 仿真工作负载所需,不运行仿真的项目可以改而启用 `ops`,它启用除 `sim` //! 仿真工作负载所需,不运行仿真的项目可以改而启用 `ops`,它启用除 `sim`