Enum Task
pub(crate) enum Task {
GenerateAll {
mode: Mode,
},
CheckParity {
rust_golden: bool,
},
RunExamples,
CheckApiLinks {
doc_dir: Option<PathBuf>,
site_dir: Option<PathBuf>,
},
CheckGuideLinks,
CheckLints,
}Expand description
The tasks.
Variants§
GenerateAll
Write, check or print every generated documentation page.
CheckParity
Assert that paired examples agree bit-for-bit across the binding.
Without a flag, both arms of every examples/parity.toml pair run and
their atune-parity/1 blocks are compared — which needs the Python wheel
installed. With --rust-golden, only the Rust arms run and each is
compared to its committed golden, which needs nothing but the workspace and
therefore belongs in the fast per-push gate (§11).
§If it dies before printing anything
error while loading shared libraries: libpython3.NN.so.1.0 is the
loader, not this command. atune_dev links atune_python, which embeds
a real interpreter, so the binary needs libpython at load time —
before main runs, which is why the message names neither a crate nor a
task. A system interpreter usually leaves it somewhere the loader
already looks; a uv- or pyenv-managed one does not. Fix by pointing
the loader at that interpreter’s own library directory:
LD_LIBRARY_PATH=$(python3 -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))') \
cargo dev check-parityWritten down here because the failure is met while running this, and a bare loader error is exactly the kind of message somebody spends an hour on twice.
RunExamples
Run every example under examples/rust/.
Every one, not only the paired ones: running only the pairs would leave the unpaired examples compiled but never executed (G3).
CheckApiLinks
Assert that every link in the API map resolves to a page that exists.
generate-all --mode check proves the map matches the code. This proves
the map matches the published output: every rust: path is a file in the
rustdoc tree, every page in the facade’s subtree of that tree is claimed by
some key, and every python:/cli: anchor is an id on the page it
names. It therefore needs both build artefacts, and belongs in docs.yml
rather than the fast per-push gate (§11).
Fields
CheckGuideLinks
Assert that every citation of the guide names a page that exists.
G15, and the other half of check-api-links: that command resolves the
links a page makes through docs/api_links.yml, this one resolves the
links prose makes to the guide itself — a doc comment, a README, a
runtime message. Three checks: no blob/main repository link survives
outside docs/design/, every site-absolute citation names a real
docs/**.md, and no generated page republishes a site-absolute URL where
a page-relative one is verifiable. Needs no build artefact, so it belongs
in the fast per-push gate (§11).
CheckLints
Assert that atune_py’s hand-copied lint table still mirrors the
workspace’s, and that its unsafe is still only the recorded operations.
atune_py is the one crate that cannot write [lints] workspace = true
— inheriting would re-impose unsafe_code = "forbid", which its PyO3
bridge cannot build under — so it copies the whole table with that single
value relaxed to deny. Nothing else notices when the two drift, and the
crate that would silently stop enforcing a lint is the only one in the
workspace that writes unsafe.
The second half bounds what the relaxation bought. deny is overridable
from inside the crate by an #[allow(unsafe_code)] on any item, so the
manifest permits unsafe without saying how much; the command parses the
crate’s sources and holds every hand-written unsafe to a written-down
inventory. Reads two manifests and one small source tree, so it belongs
in the fast per-push gate.
Trait Implementations§
§impl FromArgMatches for Task
impl FromArgMatches for Task
§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.§impl Subcommand for Task
impl Subcommand for Task
§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read more§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more