fix: don't export on entry change and first filesystem sync (#1854)
Some checks are pending
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run

* fix: make real onSave export conditions

* fix: remove fix

* feat: pass export tests

* fix: revert bootstrap changes

* feat: reduce num of exports

* fix: diag tests
This commit is contained in:
Myriad-Dreamin 2025-06-29 21:54:05 +08:00 committed by GitHub
parent db7e031bbe
commit d0a478929e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 214 additions and 119 deletions

View file

@ -37,11 +37,11 @@ pub struct ExportTimings;
impl ExportTimings {
pub fn needs_run<F: CompilerFeat, D: typst::Document>(
snap: &CompileSnapshot<F>,
timing: Option<TaskWhen>,
timing: Option<&TaskWhen>,
docs: Option<&D>,
) -> Option<bool> {
snap.signal
.should_run_task(timing.unwrap_or_default(), docs)
.should_run_task(timing.unwrap_or(&TaskWhen::Never), docs)
}
}

View file

@ -85,9 +85,9 @@ pub enum ProjectTask {
impl ProjectTask {
/// Returns the timing of executing the task.
pub fn when(&self) -> Option<TaskWhen> {
pub fn when(&self) -> Option<&TaskWhen> {
Some(match self {
Self::Preview(task) => task.when,
Self::Preview(task) => &task.when,
Self::ExportPdf(..)
| Self::ExportPng(..)
| Self::ExportSvg(..)
@ -96,7 +96,7 @@ impl ProjectTask {
| Self::ExportMd(..)
| Self::ExportTeX(..)
| Self::ExportText(..)
| Self::Query(..) => self.as_export()?.when,
| Self::Query(..) => &self.as_export()?.when,
})
}

View file

@ -128,7 +128,7 @@ impl PathPattern {
#[comemo::memoize]
fn substitute_impl(&self, root: Option<ImmutPath>, main: Option<FileId>) -> Option<ImmutPath> {
log::info!("Check path {main:?} and root {root:?} with output directory {self:?}");
log::debug!("Check path {main:?} and root {root:?} with output directory {self:?}");
let (root, main) = root.zip(main)?;