pub struct Module {
pub diagnostics: Vec<Recorded>,
pub errors: usize,
pub warnings: usize,
pub lints: usize,
pub deps: Vec<String>,
pub requires: Vec<RequireJson>,
pub code: Option<String>,
pub check: Option<CheckInfoJson>,
}Expand description
What checking one module reported.
Fields§
§diagnostics: Vec<Recorded>Its diagnostics, its contract lints included, in the order they were printed.
errors: usizeHow many of diagnostics were errors, counted when the entry was written.
Stored rather than recounted on replay: the three are what a run adds up to decide its exit code, and a replay that recounted them would be deciding that from its own reading of the severity strings instead of from what the original run concluded.
warnings: usizeWarnings, as errors.
lints: usizeLints, as errors.
deps: Vec<String>What the checker resolved this module’s requires to. The next run keys on these, which is how a dependency’s edit invalidates its dependents.
requires: Vec<RequireJson>Every require in the source and where it went, which deps is the resolved,
deduplicated half of. Kept whole because the cycle lint reports a call site, and a
path cannot say which line asked for it.
code: Option<String>The Lua this module generates, for entries under gen_key. htl check never needs
it and stores None; htl test stores it so a replay can go straight to running.
Absent when checking produced errors, since there is nothing to run then.
check: Option<CheckInfoJson>What checking reported, in the form the test runner needs it back.
htl check replays diagnostics straight into the sink and never reconstructs a
CheckInfo; the test runner puts one into its report, so a replayed test file needs
the structured form rather than the printed one. Only gen_key entries carry it.
Implementations§
Source§impl Module
impl Module
Sourcepub fn requires_only(&self) -> CheckInfo
pub fn requires_only(&self) -> CheckInfo
A CheckInfo carrying only what the project-level lints read.
require_cycles runs over every file in the walk, replayed ones included — a cycle
that closes through a module nobody edited is still a cycle — so a replayed module
has to produce something that lint can read. Its diagnostics are already printed by
then, and nothing downstream looks at the other fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Module
impl<'de> Deserialize<'de> for Module
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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