Try daaa9c9 (no parking_lot)

This commit is contained in:
Laurenz 2025-07-24 14:56:08 +02:00
parent 7810e4ed0f
commit 46b781d8b8
5 changed files with 9 additions and 20 deletions

7
Cargo.lock generated
View File

@ -451,19 +451,16 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]] [[package]]
name = "comemo" name = "comemo"
version = "0.4.0" version = "0.4.0"
source = "git+https://github.com/typst/comemo?rev=a5028dd#a5028ddcebeab5d73c9e1688c9c913231172a9e9" source = "git+https://github.com/typst/comemo?rev=daaa9c9#daaa9c96c7ea59805a149dafd13da48c48d5d6e1"
dependencies = [ dependencies = [
"bumpalo",
"comemo-macros", "comemo-macros",
"once_cell",
"parking_lot",
"siphasher", "siphasher",
] ]
[[package]] [[package]]
name = "comemo-macros" name = "comemo-macros"
version = "0.4.0" version = "0.4.0"
source = "git+https://github.com/typst/comemo?rev=a5028dd#a5028ddcebeab5d73c9e1688c9c913231172a9e9" source = "git+https://github.com/typst/comemo?rev=daaa9c9#daaa9c96c7ea59805a149dafd13da48c48d5d6e1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View File

@ -165,4 +165,4 @@ uninlined_format_args = "warn"
wildcard_in_or_patterns = "allow" wildcard_in_or_patterns = "allow"
[patch.crates-io] [patch.crates-io]
comemo = { git = "https://github.com/typst/comemo", rev = "a5028dd" } comemo = { git = "https://github.com/typst/comemo", rev = "daaa9c9" }

View File

@ -219,7 +219,7 @@ pub struct Route<'a> {
// We need to override the constraint's lifetime here so that `Tracked` is // We need to override the constraint's lifetime here so that `Tracked` is
// covariant over the constraint. If it becomes invariant, we're in for a // covariant over the constraint. If it becomes invariant, we're in for a
// world of lifetime pain. // world of lifetime pain.
outer: Option<Tracked<'a, Self, <Route<'static> as Validate>::Call>>, outer: Option<Tracked<'a, Self, <Route<'static> as Validate>::Constraint>>,
/// This is set if this route segment was inserted through the start of a /// This is set if this route segment was inserted through the start of a
/// module evaluation. /// module evaluation.
id: Option<FileId>, id: Option<FileId>,

View File

@ -312,7 +312,7 @@ enum LinkKind<'a> {
/// We need to override the constraint's lifetime here so that `Tracked` is /// We need to override the constraint's lifetime here so that `Tracked` is
/// covariant over the constraint. If it becomes invariant, we're in for a /// covariant over the constraint. If it becomes invariant, we're in for a
/// world of lifetime pain. /// world of lifetime pain.
Outer(Tracked<'a, Locator<'a>, <Locator<'static> as Validate>::Call>), Outer(Tracked<'a, Locator<'a>, <Locator<'static> as Validate>::Constraint>),
/// A link which indicates that we are in measurement mode. /// A link which indicates that we are in measurement mode.
Measure(Location), Measure(Location),
} }

View File

@ -39,7 +39,7 @@ pub use typst_syntax as syntax;
pub use typst_utils as utils; pub use typst_utils as utils;
use std::collections::HashSet; use std::collections::HashSet;
use std::sync::{LazyLock, Mutex}; use std::sync::LazyLock;
use comemo::{Track, Tracked, Validate}; use comemo::{Track, Tracked, Validate};
use ecow::{EcoString, EcoVec, eco_format, eco_vec}; use ecow::{EcoString, EcoVec, eco_format, eco_vec};
@ -135,11 +135,10 @@ fn compile_impl<D: Document>(
subsink = Sink::new(); subsink = Sink::new();
let calls = Mutex::new(Vec::new()); let constraint = <Introspector as Validate>::Constraint::new();
let tracker = |call, hash| calls.lock().unwrap().push((call, hash));
let mut engine = Engine { let mut engine = Engine {
world, world,
introspector: introspector.track_with(&tracker), introspector: introspector.track_with(&constraint),
traced, traced,
sink: subsink.track_mut(), sink: subsink.track_mut(),
route: Route::default(), route: Route::default(),
@ -151,14 +150,7 @@ fn compile_impl<D: Document>(
introspector = document.introspector(); introspector = document.introspector();
iter += 1; iter += 1;
if timed!( if timed!("check stabilized", introspector.validate(&constraint)) {
"check stabilized",
calls
.into_inner()
.unwrap()
.into_iter()
.all(|(call, hash)| introspector.call(call) == hash)
) {
break; break;
} }