diff --git a/src/accumulator.rs b/src/accumulator.rs index e45ea6e2..ac50e6c7 100644 --- a/src/accumulator.rs +++ b/src/accumulator.rs @@ -10,7 +10,7 @@ use crate::{ hash::FxDashMap, ingredient::{fmt_index, Ingredient, Jar}, key::DependencyIndex, - local_state::{QueryOrigin, ZalsaLocal}, + zalsa_local::{QueryOrigin, ZalsaLocal}, zalsa::IngredientIndex, Database, DatabaseKeyIndex, Event, EventKind, Id, Revision, }; diff --git a/src/active_query.rs b/src/active_query.rs index 8f575b75..18cea6fc 100644 --- a/src/active_query.rs +++ b/src/active_query.rs @@ -2,12 +2,12 @@ use crate::{ durability::Durability, hash::{FxIndexMap, FxIndexSet}, key::{DatabaseKeyIndex, DependencyIndex}, - local_state::EMPTY_DEPENDENCIES, + zalsa_local::EMPTY_DEPENDENCIES, tracked_struct::Disambiguator, Cycle, Revision, }; -use super::local_state::{EdgeKind, QueryEdges, QueryOrigin, QueryRevisions}; +use super::zalsa_local::{EdgeKind, QueryEdges, QueryOrigin, QueryRevisions}; #[derive(Debug)] pub(crate) struct ActiveQuery { diff --git a/src/database.rs b/src/database.rs index 5ddfd2f9..b541c843 100644 --- a/src/database.rs +++ b/src/database.rs @@ -4,7 +4,7 @@ use parking_lot::{Condvar, Mutex}; use crate::{ self as salsa, - local_state::{self, ZalsaLocal}, + zalsa_local::{self, ZalsaLocal}, zalsa::Zalsa, Durability, Event, EventKind, Revision, }; @@ -120,7 +120,7 @@ pub struct DatabaseImpl { coordinate: Arc, /// Per-thread state - zalsa_local: local_state::ZalsaLocal, + zalsa_local: zalsa_local::ZalsaLocal, /// The `U` is stored as a `dyn Any` in `zalsa_impl` phantom: PhantomData, diff --git a/src/function.rs b/src/function.rs index 176d43e9..0f90aa6f 100644 --- a/src/function.rs +++ b/src/function.rs @@ -4,7 +4,7 @@ use crossbeam::atomic::AtomicCell; use crate::{ cycle::CycleRecoveryStrategy, ingredient::fmt_index, key::DatabaseKeyIndex, - local_state::QueryOrigin, salsa_struct::SalsaStructInDb, zalsa::IngredientIndex, + zalsa_local::QueryOrigin, salsa_struct::SalsaStructInDb, zalsa::IngredientIndex, AsDynDatabase as _, Cycle, Database, Event, EventKind, Id, Revision, }; diff --git a/src/function/backdate.rs b/src/function/backdate.rs index 64fa0caf..bfca6f05 100644 --- a/src/function/backdate.rs +++ b/src/function/backdate.rs @@ -1,4 +1,4 @@ -use crate::local_state::QueryRevisions; +use crate::zalsa_local::QueryRevisions; use super::{memo::Memo, Configuration, IngredientImpl}; diff --git a/src/function/delete.rs b/src/function/delete.rs index 8c1dc6f2..131c82cf 100644 --- a/src/function/delete.rs +++ b/src/function/delete.rs @@ -1,7 +1,7 @@ use arc_swap::ArcSwap; use crossbeam::queue::SegQueue; -use crate::{local_state::QueryOrigin, Id}; +use crate::{zalsa_local::QueryOrigin, Id}; use super::{memo, Configuration, IngredientImpl}; diff --git a/src/function/diff_outputs.rs b/src/function/diff_outputs.rs index 96df56f7..f365abce 100644 --- a/src/function/diff_outputs.rs +++ b/src/function/diff_outputs.rs @@ -1,5 +1,5 @@ use crate::{ - hash::FxHashSet, key::DependencyIndex, local_state::QueryRevisions, AsDynDatabase as _, + hash::FxHashSet, key::DependencyIndex, zalsa_local::QueryRevisions, AsDynDatabase as _, DatabaseKeyIndex, Event, EventKind, }; diff --git a/src/function/execute.rs b/src/function/execute.rs index cba601d0..0bc2ace6 100644 --- a/src/function/execute.rs +++ b/src/function/execute.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use crate::{ - local_state::ActiveQueryGuard, runtime::StampedValue, Cycle, Database, Event, EventKind, + zalsa_local::ActiveQueryGuard, runtime::StampedValue, Cycle, Database, Event, EventKind, }; use super::{memo::Memo, Configuration, IngredientImpl}; diff --git a/src/function/fetch.rs b/src/function/fetch.rs index f1ca94f5..a30fe12a 100644 --- a/src/function/fetch.rs +++ b/src/function/fetch.rs @@ -1,7 +1,7 @@ use arc_swap::Guard; use crate::{ - local_state::ZalsaLocal, runtime::StampedValue, AsDynDatabase as _, Database as _, Id, + zalsa_local::ZalsaLocal, runtime::StampedValue, AsDynDatabase as _, Database as _, Id, }; use super::{Configuration, IngredientImpl}; diff --git a/src/function/inputs.rs b/src/function/inputs.rs index ae54ca7e..ff5abc58 100644 --- a/src/function/inputs.rs +++ b/src/function/inputs.rs @@ -1,4 +1,4 @@ -use crate::{local_state::QueryOrigin, Id}; +use crate::{zalsa_local::QueryOrigin, Id}; use super::{Configuration, IngredientImpl}; diff --git a/src/function/maybe_changed_after.rs b/src/function/maybe_changed_after.rs index 596a1ca9..a994f577 100644 --- a/src/function/maybe_changed_after.rs +++ b/src/function/maybe_changed_after.rs @@ -2,7 +2,7 @@ use arc_swap::Guard; use crate::{ key::DatabaseKeyIndex, - local_state::{ActiveQueryGuard, EdgeKind, QueryOrigin, ZalsaLocal}, + zalsa_local::{ActiveQueryGuard, EdgeKind, QueryOrigin, ZalsaLocal}, runtime::StampedValue, zalsa::Zalsa, AsDynDatabase as _, Database, Id, Revision, diff --git a/src/function/memo.rs b/src/function/memo.rs index e84782ca..ac371fe4 100644 --- a/src/function/memo.rs +++ b/src/function/memo.rs @@ -4,7 +4,7 @@ use arc_swap::{ArcSwap, Guard}; use crossbeam::atomic::AtomicCell; use crate::{ - hash::FxDashMap, key::DatabaseKeyIndex, local_state::QueryRevisions, zalsa::Zalsa, Event, + hash::FxDashMap, key::DatabaseKeyIndex, zalsa_local::QueryRevisions, zalsa::Zalsa, Event, EventKind, Id, Revision, }; @@ -78,7 +78,7 @@ impl MemoMap { /// with an equivalent memo that has no value. If the memo is untracked, BaseInput, /// or has values assigned as output of another query, this has no effect. pub(super) fn evict(&self, key: Id) { - use crate::local_state::QueryOrigin; + use crate::zalsa_local::QueryOrigin; use dashmap::mapref::entry::Entry::*; if let Occupied(entry) = self.map.entry(key) { diff --git a/src/function/specify.rs b/src/function/specify.rs index 98945dc5..bc598386 100644 --- a/src/function/specify.rs +++ b/src/function/specify.rs @@ -1,7 +1,7 @@ use crossbeam::atomic::AtomicCell; use crate::{ - local_state::{QueryOrigin, QueryRevisions}, + zalsa_local::{QueryOrigin, QueryRevisions}, tracked_struct::TrackedStructInDb, AsDynDatabase as _, Database, DatabaseKeyIndex, Id, }; diff --git a/src/function/store.rs b/src/function/store.rs index aefe1c48..79757106 100644 --- a/src/function/store.rs +++ b/src/function/store.rs @@ -4,7 +4,7 @@ use crossbeam::atomic::AtomicCell; use crate::{ durability::Durability, - local_state::{QueryOrigin, QueryRevisions}, + zalsa_local::{QueryOrigin, QueryRevisions}, Id, Runtime, }; diff --git a/src/function/sync.rs b/src/function/sync.rs index c7973db4..23f6cf9c 100644 --- a/src/function/sync.rs +++ b/src/function/sync.rs @@ -4,8 +4,8 @@ use std::{ }; use crate::{ - hash::FxDashMap, key::DatabaseKeyIndex, local_state::ZalsaLocal, runtime::WaitResult, - zalsa::Zalsa, Database, Id, + hash::FxDashMap, key::DatabaseKeyIndex, runtime::WaitResult, zalsa::Zalsa, + zalsa_local::ZalsaLocal, Database, Id, }; #[derive(Default)] diff --git a/src/ingredient.rs b/src/ingredient.rs index 3f053604..c8b26cfa 100644 --- a/src/ingredient.rs +++ b/src/ingredient.rs @@ -4,7 +4,7 @@ use std::{ }; use crate::{ - cycle::CycleRecoveryStrategy, local_state::QueryOrigin, zalsa::IngredientIndex, Database, + cycle::CycleRecoveryStrategy, zalsa_local::QueryOrigin, zalsa::IngredientIndex, Database, DatabaseKeyIndex, Id, }; diff --git a/src/input.rs b/src/input.rs index 10c08c62..c884fa8f 100644 --- a/src/input.rs +++ b/src/input.rs @@ -17,7 +17,7 @@ use crate::{ id::{AsId, FromId}, ingredient::{fmt_index, Ingredient}, key::{DatabaseKeyIndex, DependencyIndex}, - local_state::QueryOrigin, + zalsa_local::QueryOrigin, plumbing::{Jar, Stamp}, zalsa::IngredientIndex, Database, Durability, Id, Revision, diff --git a/src/input/input_field.rs b/src/input/input_field.rs index 99f6f65a..0eb9baca 100644 --- a/src/input/input_field.rs +++ b/src/input/input_field.rs @@ -1,7 +1,7 @@ use crate::cycle::CycleRecoveryStrategy; use crate::ingredient::{fmt_index, Ingredient}; use crate::input::Configuration; -use crate::local_state::QueryOrigin; +use crate::zalsa_local::QueryOrigin; use crate::zalsa::IngredientIndex; use crate::{Database, DatabaseKeyIndex, Id, Revision}; use std::fmt; diff --git a/src/interned.rs b/src/interned.rs index e6e76d88..1395696e 100644 --- a/src/interned.rs +++ b/src/interned.rs @@ -9,7 +9,7 @@ use crate::durability::Durability; use crate::id::AsId; use crate::ingredient::fmt_index; use crate::key::DependencyIndex; -use crate::local_state::QueryOrigin; +use crate::zalsa_local::QueryOrigin; use crate::plumbing::Jar; use crate::zalsa::IngredientIndex; use crate::{Database, DatabaseKeyIndex, Id}; diff --git a/src/lib.rs b/src/lib.rs index aa018b45..b3eb0a6b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ mod ingredient_list; mod input; mod interned; mod key; -mod local_state; +mod zalsa_local; mod nonce; mod revision; mod runtime; diff --git a/src/runtime.rs b/src/runtime.rs index bd10291e..5330f7bf 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -9,7 +9,7 @@ use parking_lot::Mutex; use crate::{ active_query::ActiveQuery, cycle::CycleRecoveryStrategy, durability::Durability, - key::DatabaseKeyIndex, local_state::ZalsaLocal, revision::AtomicRevision, Cancelled, Cycle, + key::DatabaseKeyIndex, zalsa_local::ZalsaLocal, revision::AtomicRevision, Cancelled, Cycle, Database, Event, EventKind, Revision, }; diff --git a/src/tracked_struct.rs b/src/tracked_struct.rs index 1d59ba2b..8fbb0aec 100644 --- a/src/tracked_struct.rs +++ b/src/tracked_struct.rs @@ -11,7 +11,7 @@ use crate::{ ingredient::{fmt_index, Ingredient, Jar}, ingredient_list::IngredientList, key::{DatabaseKeyIndex, DependencyIndex}, - local_state::QueryOrigin, + zalsa_local::QueryOrigin, salsa_struct::SalsaStructInDb, zalsa::IngredientIndex, Database, Durability, Event, Id, Revision, diff --git a/src/tracked_struct/tracked_field.rs b/src/tracked_struct/tracked_field.rs index 6121d833..07a93c19 100644 --- a/src/tracked_struct/tracked_field.rs +++ b/src/tracked_struct/tracked_field.rs @@ -91,7 +91,7 @@ where field_changed_at > revision } - fn origin(&self, _key_index: crate::Id) -> Option { + fn origin(&self, _key_index: crate::Id) -> Option { None } diff --git a/src/zalsa.rs b/src/zalsa.rs index a71f68d3..ea4ae585 100644 --- a/src/zalsa.rs +++ b/src/zalsa.rs @@ -8,10 +8,10 @@ use rustc_hash::FxHashMap; use crate::cycle::CycleRecoveryStrategy; use crate::database::UserData; use crate::ingredient::{Ingredient, Jar}; -use crate::local_state::ZalsaLocal; use crate::nonce::{Nonce, NonceGenerator}; use crate::runtime::{Runtime, WaitResult}; use crate::views::Views; +use crate::zalsa_local::ZalsaLocal; use crate::{Database, DatabaseImpl, DatabaseKeyIndex, Durability, Revision}; pub fn views(db: &Db) -> &Views { diff --git a/src/local_state.rs b/src/zalsa_local.rs similarity index 100% rename from src/local_state.rs rename to src/zalsa_local.rs