Unverified Commit 468a40fa authored by Benjamin Woodruff's avatar Benjamin Woodruff Committed by GitHub

Turbopack: Define `Effect` as a trait instead of a closure (#89080)

This switches effects (special `Collectible`s used to defer file writes) from using a closure representation to using a trait representation.

This makes constructing effects a little more annoying, but it ensures that we'll be able to correctly implement `TraceRawVcs` on these in a subsequent PR.

Changes to `turbo-tasks/src/effect.rs` were done by hand, an LLM was used for updating the two callsites.
parent 43f90177
...@@ -36,6 +36,7 @@ use std::{ ...@@ -36,6 +36,7 @@ use std::{
borrow::Cow, borrow::Cow,
cmp::{Ordering, min}, cmp::{Ordering, min},
env, env,
error::Error as StdError,
fmt::{self, Debug, Formatter}, fmt::{self, Debug, Formatter},
fs::FileType, fs::FileType,
future::Future, future::Future,
...@@ -63,9 +64,9 @@ use tokio::{ ...@@ -63,9 +64,9 @@ use tokio::{
use tracing::Instrument; use tracing::Instrument;
use turbo_rcstr::{RcStr, rcstr}; use turbo_rcstr::{RcStr, rcstr};
use turbo_tasks::{ use turbo_tasks::{
ApplyEffectsContext, Completion, InvalidationReason, Invalidator, NonLocalValue, ReadRef, ApplyEffectsContext, Completion, Effect, InvalidationReason, Invalidator, NonLocalValue,
ResolvedVc, TaskInput, TurboTasksApi, ValueToString, ValueToStringRef, Vc, ReadRef, ResolvedVc, TaskInput, TurboTasksApi, ValueToString, ValueToStringRef, Vc,
debug::ValueDebugFormat, effect, mark_session_dependent, parallel, trace::TraceRawVcs, debug::ValueDebugFormat, emit_effect, mark_session_dependent, parallel, trace::TraceRawVcs,
turbo_tasks_weak, turbobail, turbofmt, turbo_tasks_weak, turbobail, turbofmt,
}; };
use turbo_tasks_hash::{ use turbo_tasks_hash::{
...@@ -975,18 +976,29 @@ impl FileSystem for DiskFileSystem { ...@@ -975,18 +976,29 @@ impl FileSystem for DiskFileSystem {
let inner = self.inner.clone(); let inner = self.inner.clone();
let invalidator = turbo_tasks::get_invalidator(); let invalidator = turbo_tasks::get_invalidator();
effect(async move { struct WriteEffect {
let full_path = validate_path_length(&full_path)?; full_path: PathBuf,
inner: Arc<DiskFileSystemInner>,
invalidator: Option<Invalidator>,
content: ReadRef<FileContent>,
}
impl Effect for WriteEffect {
type Error = AnyhowWrapper;
let _lock = inner.lock_path(&full_path).await; async fn apply(self) -> Result<(), Self::Error> {
let full_path = validate_path_length(&self.full_path)?;
let _lock = self.inner.lock_path(&full_path).await;
// Track the file, so that we will rewrite it if it ever changes. // Track the file, so that we will rewrite it if it ever changes.
let old_invalidators = invalidator let old_invalidators = self
.invalidator
.map(|invalidator| { .map(|invalidator| {
inner.register_write_invalidator( self.inner.register_write_invalidator(
&full_path, &full_path,
invalidator, invalidator,
WriteContent::File(content.clone()), WriteContent::File(self.content.clone()),
) )
}) })
.transpose()? .transpose()?
...@@ -997,15 +1009,16 @@ impl FileSystem for DiskFileSystem { ...@@ -997,15 +1009,16 @@ impl FileSystem for DiskFileSystem {
// be freed immediately. Given this is an output file, it's unlikely any Turbo // be freed immediately. Given this is an output file, it's unlikely any Turbo
// code will need to read the file from disk into a Vc<FileContent>, so we're // code will need to read the file from disk into a Vc<FileContent>, so we're
// not wasting cycles. // not wasting cycles.
let compare = content let compare = self
.content
.streaming_compare(&full_path) .streaming_compare(&full_path)
.instrument(tracing::info_span!("read file before write", name = ?full_path)) .instrument(tracing::info_span!("read file before write", name = ?full_path))
.concurrency_limited(&inner.read_semaphore) .concurrency_limited(&self.inner.read_semaphore)
.await?; .await?;
if compare == FileComparison::Equal { if compare == FileComparison::Equal {
if !old_invalidators.is_empty() { if !old_invalidators.is_empty() {
for (invalidator, write_content) in old_invalidators { for (invalidator, write_content) in old_invalidators {
inner.invalidator_map.insert( self.inner.invalidator_map.insert(
full_path.clone().into_owned(), full_path.clone().into_owned(),
invalidator, invalidator,
write_content, write_content,
...@@ -1015,18 +1028,19 @@ impl FileSystem for DiskFileSystem { ...@@ -1015,18 +1028,19 @@ impl FileSystem for DiskFileSystem {
return Ok(()); return Ok(());
} }
match &*content { match &*self.content {
FileContent::Content(..) => { FileContent::Content(..) => {
let create_directory = compare == FileComparison::Create; let create_directory = compare == FileComparison::Create;
if create_directory && let Some(parent) = full_path.parent() { if create_directory && let Some(parent) = full_path.parent() {
inner.create_directory(parent).await.with_context(|| { self.inner.create_directory(parent).await.with_context(|| {
format!( format!(
"failed to create directory {parent:?} for write to {full_path:?}", "failed to create directory {parent:?} for write to \
{full_path:?}",
) )
})?; })?;
} }
let content = content.clone(); let content = self.content.clone();
retry_blocking(|| { retry_blocking(|| {
let mut f = std::fs::File::create(&full_path)?; let mut f = std::fs::File::create(&full_path)?;
let FileContent::Content(file) = &*content else { let FileContent::Content(file) = &*content else {
...@@ -1060,14 +1074,14 @@ impl FileSystem for DiskFileSystem { ...@@ -1060,14 +1074,14 @@ impl FileSystem for DiskFileSystem {
Ok::<(), io::Error>(()) Ok::<(), io::Error>(())
}) })
.instrument(tracing::info_span!("write file", name = ?full_path)) .instrument(tracing::info_span!("write file", name = ?full_path))
.concurrency_limited(&inner.write_semaphore) .concurrency_limited(&self.inner.write_semaphore)
.await .await
.with_context(|| format!("failed to write to {full_path:?}"))?; .with_context(|| format!("failed to write to {full_path:?}"))?;
} }
FileContent::NotFound => { FileContent::NotFound => {
retry_blocking(|| std::fs::remove_file(&full_path)) retry_blocking(|| std::fs::remove_file(&full_path))
.instrument(tracing::info_span!("remove file", name = ?full_path)) .instrument(tracing::info_span!("remove file", name = ?full_path))
.concurrency_limited(&inner.write_semaphore) .concurrency_limited(&self.inner.write_semaphore)
.await .await
.or_else(|err| { .or_else(|err| {
if err.kind() == ErrorKind::NotFound { if err.kind() == ErrorKind::NotFound {
...@@ -1080,9 +1094,18 @@ impl FileSystem for DiskFileSystem { ...@@ -1080,9 +1094,18 @@ impl FileSystem for DiskFileSystem {
} }
} }
inner.invalidate_from_write(&full_path, old_invalidators); self.inner
.invalidate_from_write(&full_path, old_invalidators);
Ok(()) Ok(())
}
}
emit_effect(WriteEffect {
full_path,
inner,
invalidator,
content,
}); });
Ok(()) Ok(())
...@@ -1105,17 +1128,28 @@ impl FileSystem for DiskFileSystem { ...@@ -1105,17 +1128,28 @@ impl FileSystem for DiskFileSystem {
let inner = self.inner.clone(); let inner = self.inner.clone();
let invalidator = turbo_tasks::get_invalidator(); let invalidator = turbo_tasks::get_invalidator();
effect(async move { struct WriteLinkEffect {
let full_path = validate_path_length(&full_path)?; full_path: PathBuf,
inner: Arc<DiskFileSystemInner>,
invalidator: Option<Invalidator>,
content: ReadRef<LinkContent>,
}
impl Effect for WriteLinkEffect {
type Error = AnyhowWrapper;
async fn apply(self) -> Result<(), Self::Error> {
let full_path = validate_path_length(&self.full_path)?;
let _lock = inner.lock_path(&full_path).await; let _lock = self.inner.lock_path(&full_path).await;
let old_invalidators = invalidator let old_invalidators = self
.invalidator
.map(|invalidator| { .map(|invalidator| {
inner.register_write_invalidator( self.inner.register_write_invalidator(
&full_path, &full_path,
invalidator, invalidator,
WriteContent::Link(content.clone()), WriteContent::Link(self.content.clone()),
) )
}) })
.transpose()? .transpose()?
...@@ -1131,11 +1165,11 @@ impl FileSystem for DiskFileSystem { ...@@ -1131,11 +1165,11 @@ impl FileSystem for DiskFileSystem {
Invalid, Invalid,
} }
let os_specific_link_content = match &*content { let os_specific_link_content = match &*self.content {
LinkContent::Link { target, link_type } => { LinkContent::Link { target, link_type } => {
let is_directory = link_type.contains(LinkType::DIRECTORY); let is_directory = link_type.contains(LinkType::DIRECTORY);
let target_path = if link_type.contains(LinkType::ABSOLUTE) { let target_path = if link_type.contains(LinkType::ABSOLUTE) {
Path::new(&inner.root).join(unix_to_sys(target).as_ref()) Path::new(&self.inner.root).join(unix_to_sys(target).as_ref())
} else { } else {
let relative_target = PathBuf::from(unix_to_sys(target).as_ref()); let relative_target = PathBuf::from(unix_to_sys(target).as_ref());
if cfg!(windows) && is_directory { if cfg!(windows) && is_directory {
...@@ -1160,7 +1194,7 @@ impl FileSystem for DiskFileSystem { ...@@ -1160,7 +1194,7 @@ impl FileSystem for DiskFileSystem {
let old_content = match retry_blocking(|| std::fs::read_link(&full_path)) let old_content = match retry_blocking(|| std::fs::read_link(&full_path))
.instrument(tracing::info_span!("read symlink before write", name = ?full_path)) .instrument(tracing::info_span!("read symlink before write", name = ?full_path))
.concurrency_limited(&inner.read_semaphore) .concurrency_limited(&self.inner.read_semaphore)
.await .await
{ {
Ok(res) => Some((res.is_absolute(), res)), Ok(res) => Some((res.is_absolute(), res)),
...@@ -1177,7 +1211,7 @@ impl FileSystem for DiskFileSystem { ...@@ -1177,7 +1211,7 @@ impl FileSystem for DiskFileSystem {
if is_equal { if is_equal {
if !old_invalidators.is_empty() { if !old_invalidators.is_empty() {
for (invalidator, write_content) in old_invalidators { for (invalidator, write_content) in old_invalidators {
inner.invalidator_map.insert( self.inner.invalidator_map.insert(
full_path.clone().into_owned(), full_path.clone().into_owned(),
invalidator, invalidator,
write_content, write_content,
...@@ -1198,7 +1232,7 @@ impl FileSystem for DiskFileSystem { ...@@ -1198,7 +1232,7 @@ impl FileSystem for DiskFileSystem {
let create_directory = old_content.is_none(); let create_directory = old_content.is_none();
if create_directory && let Some(parent) = full_path.parent() { if create_directory && let Some(parent) = full_path.parent() {
inner.create_directory(parent).await.with_context(|| { self.inner.create_directory(parent).await.with_context(|| {
format!( format!(
"failed to create directory {parent:?} for write link to \ "failed to create directory {parent:?} for write link to \
{full_path:?}", {full_path:?}",
...@@ -1218,8 +1252,9 @@ impl FileSystem for DiskFileSystem { ...@@ -1218,8 +1252,9 @@ impl FileSystem for DiskFileSystem {
let try_create_link = || { let try_create_link = || {
if has_old_content { if has_old_content {
// Remove existing symlink before creating a new one. On Unix, // Remove existing symlink before creating a new one. On Unix,
// symlink(2) fails with EEXIST if the link already exists instead of // symlink(2) fails with EEXIST if the link already exists instead
// overwriting it. Windows has similar behavior with junction points. // of overwriting it. Windows has similar behavior with junction
// points.
remove_symbolic_link_dir_helper(&full_path).map_err(|err| { remove_symbolic_link_dir_helper(&full_path).map_err(|err| {
SymlinkCreationError { SymlinkCreationError {
msg: "removal of existing symbolic link or junction point \ msg: "removal of existing symbolic link or junction point \
...@@ -1264,9 +1299,10 @@ impl FileSystem for DiskFileSystem { ...@@ -1264,9 +1299,10 @@ impl FileSystem for DiskFileSystem {
) )
} else { } else {
format!( format!(
"failed to create symlink at {full_path:?} pointing to {target:?}\n\ "failed to create symlink at {full_path:?} pointing to \
(Note: creating file symlinks on Windows require developer mode or \ {target:?}\n\
admin permissions: \ (Note: creating file symlinks on Windows require developer \
mode or admin permissions: \
https://learn.microsoft.com/en-us/windows/advanced-settings/developer-mode)", https://learn.microsoft.com/en-us/windows/advanced-settings/developer-mode)",
) )
}; };
...@@ -1278,23 +1314,33 @@ impl FileSystem for DiskFileSystem { ...@@ -1278,23 +1314,33 @@ impl FileSystem for DiskFileSystem {
name = ?full_path, name = ?full_path,
target = ?target, target = ?target,
)) ))
.concurrency_limited(&inner.write_semaphore) .concurrency_limited(&self.inner.write_semaphore)
.await .await
.with_context(err_context)?; .with_context(err_context)?;
} }
OsSpecificLinkContent::Invalid => { OsSpecificLinkContent::Invalid => {
bail!("invalid symlink target: {full_path:?}") return Err(AnyhowWrapper(anyhow!(
"invalid symlink target: {full_path:?}"
)));
} }
OsSpecificLinkContent::NotFound => { OsSpecificLinkContent::NotFound => {
retry_blocking(|| remove_symbolic_link_dir_helper(&full_path)) retry_blocking(|| remove_symbolic_link_dir_helper(&full_path))
.instrument(tracing::info_span!("remove symlink", name = ?full_path)) .instrument(tracing::info_span!("remove symlink", name = ?full_path))
.concurrency_limited(&inner.write_semaphore) .concurrency_limited(&self.inner.write_semaphore)
.await .await
.with_context(|| format!("removing {full_path:?} failed"))?; .with_context(|| format!("removing {full_path:?} failed"))?;
} }
} }
Ok(()) Ok(())
}
}
emit_effect(WriteLinkEffect {
full_path,
inner,
invalidator,
content,
}); });
Ok(()) Ok(())
} }
...@@ -2815,6 +2861,34 @@ async fn realpath_with_links(path: FileSystemPath) -> Result<Vc<RealPathResult>> ...@@ -2815,6 +2861,34 @@ async fn realpath_with_links(path: FileSystemPath) -> Result<Vc<RealPathResult>>
.cell()) .cell())
} }
/// Wrapper to convert `anyhow::Error` to `impl std::error::Error` for use in `Effect::apply`.
// TODO(bgw): use a structured error type instead of anyhow for write/write_link
struct AnyhowWrapper(anyhow::Error);
impl std::fmt::Display for AnyhowWrapper {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(&self.0, f)
}
}
impl std::fmt::Debug for AnyhowWrapper {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Debug::fmt(&self.0, f)
}
}
impl StdError for AnyhowWrapper {
fn source(&self) -> Option<&(dyn StdError + 'static)> {
self.0.source()
}
}
impl From<anyhow::Error> for AnyhowWrapper {
fn from(err: anyhow::Error) -> Self {
AnyhowWrapper(err)
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use turbo_rcstr::rcstr; use turbo_rcstr::rcstr;
......
use std::{ use std::{
any::{Any, TypeId}, any::{Any, TypeId},
error::Error as StdError,
future::Future, future::Future,
mem::replace, mem::replace,
panic, panic,
...@@ -19,31 +20,66 @@ use crate::{ ...@@ -19,31 +20,66 @@ use crate::{
self as turbo_tasks, CollectiblesSource, ReadRef, ResolvedVc, TryJoinIterExt, emit, self as turbo_tasks, CollectiblesSource, ReadRef, ResolvedVc, TryJoinIterExt, emit,
event::{Event, EventListener}, event::{Event, EventListener},
spawn, spawn,
util::SharedError,
}; };
const APPLY_EFFECTS_CONCURRENCY_LIMIT: usize = 1024; const APPLY_EFFECTS_CONCURRENCY_LIMIT: usize = 1024;
/// A trait to emit a task effect as collectible. This trait only has one pub trait Effect: Send + Sync + 'static {
/// implementation, `EffectInstance` and no other implementation is allowed. type Error: StdError + Send + Sync + 'static;
/// The trait is private to this module so that no other implementation can be
/// added.
#[turbo_tasks::value_trait]
trait Effect {}
/// A future that represents the effect of a task. The future is executed when /// A function that is called once at the top level of the program's execution after everything
/// the effect is applied. /// has "settled".
type EffectFuture = Pin<Box<dyn Future<Output = Result<()>> + Send + Sync + 'static>>; ///
/// This function is executed outside of the turbo-tasks context, and therefore cannot read any
/// `Vc`s or call any turbo-task functions. The effect can store [`ResolvedVc`]s (or any other
/// `Vc` type), but should not read or resolve their contents.
fn apply(self) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
/// The inner state of an effect instance if it has not been applied yet. /// The error type that an effect can return. We use `dyn std::error::Error` (instead of
struct EffectInner { /// [`anyhow::Error`] or [`SharedError`]) to encourage use of structured error types that can
future: EffectFuture, /// potentially be transformed into `Issue`s.
///
/// We can't require that the returned error implements `Issue`:
/// - `Issue` uses `FileSystemPath`
/// - `turbo-tasks-fs` returns effect errors that should be transformed into `Issue`s.
/// - It logically doesn't make sense to define `Issue` in `turbo-tasks-fs`, `Issue` can't be
/// defined in a base crate either because it would form a circular crate dependency.
///
/// So instead, we leave it up to the caller to figure out how to downcast these errors themselves.
///
/// [`SharedError`]: crate::util::SharedError
type EffectError = Arc<dyn StdError + Send + Sync + 'static>;
// Private wrapper trait to allow dynamic dispatch of an `Effect`. This is similar to the pattern
// that the dynosaur crate uses: https://github.com/spastorino/dynosaur
trait DynEffect: Send + Sync + 'static {
fn dyn_apply(self: Box<Self>) -> Pin<Box<dyn Future<Output = Result<(), EffectError>> + Send>>;
} }
impl<T> DynEffect for T
where
T: Effect,
{
fn dyn_apply(self: Box<Self>) -> Pin<Box<dyn Future<Output = Result<(), EffectError>> + Send>> {
Box::pin(async move {
self.apply()
.await
.map_err(|err| Arc::new(err) as EffectError)
})
}
}
/// A trait to emit a task effect as collectible. This trait only has one implementation,
/// `EffectInstance` and no other implementation is allowed. The trait is private to this module so
/// that no other implementation can be added.
#[turbo_tasks::value_trait]
trait EffectCollectible {}
enum EffectState { enum EffectState {
NotStarted(EffectInner), NotStarted(Box<dyn DynEffect>),
Started(Event), Started(Event),
Finished(Result<(), SharedError>), Finished(Result<(), EffectError>),
} }
/// The Effect instance collectible that is emitted for effects. /// The Effect instance collectible that is emitted for effects.
...@@ -54,11 +90,11 @@ struct EffectInstance { ...@@ -54,11 +90,11 @@ struct EffectInstance {
} }
impl EffectInstance { impl EffectInstance {
fn new(future: impl Future<Output = Result<()>> + Send + Sync + 'static) -> Self { fn new(effect: impl Effect) -> Self {
Self { Self {
inner: Mutex::new(EffectState::NotStarted(EffectInner { inner: Mutex::new(EffectState::NotStarted(
future: Box::pin(future), Box::new(effect) as Box<dyn DynEffect>
})), )),
} }
} }
...@@ -66,7 +102,7 @@ impl EffectInstance { ...@@ -66,7 +102,7 @@ impl EffectInstance {
loop { loop {
enum State { enum State {
Started(EventListener), Started(EventListener),
NotStarted(EffectInner), NotStarted(Box<dyn DynEffect>),
} }
let state = { let state = {
let mut guard = self.inner.lock(); let mut guard = self.inner.lock();
...@@ -93,10 +129,11 @@ impl EffectInstance { ...@@ -93,10 +129,11 @@ impl EffectInstance {
State::Started(listener) => { State::Started(listener) => {
listener.await; listener.await;
} }
State::NotStarted(EffectInner { future }) => { State::NotStarted(effect) => {
let join_handle = spawn(ApplyEffectsContext::in_current_scope(future)); let join_handle =
spawn(ApplyEffectsContext::in_current_scope(effect.dyn_apply()));
let result = match join_handle.await { let result = match join_handle.await {
Err(err) => Err(SharedError::new(err)), Err(err) => Err(err),
Ok(()) => Ok(()), Ok(()) => Ok(()),
}; };
let event = { let event = {
...@@ -117,19 +154,19 @@ impl EffectInstance { ...@@ -117,19 +154,19 @@ impl EffectInstance {
} }
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl Effect for EffectInstance {} impl EffectCollectible for EffectInstance {}
/// Schedules an effect to be applied. The passed future is executed once `apply_effects` is called. /// Emits an effect to be applied. The effect is executed once `apply_effects` is called.
/// ///
/// The effect will only executed once. The passed future is executed outside of the current task /// The effect will only executed once. The effect is executed outside of the current task
/// and can't read any Vcs. These need to be read before. ReadRefs can be passed into the future. /// and can't read any Vcs. These need to be read before. ReadRefs can be passed into the effect.
/// ///
/// Effects are executed in parallel, so they might need to use async locking to avoid problems. /// Effects are executed in parallel, so they might need to use async locking to avoid problems.
/// Order of execution of multiple effects is not defined. You must not use multiple conflicting /// Order of execution of multiple effects is not defined. You must not use multiple conflicting
/// effects to avoid non-deterministic behavior. /// effects to avoid non-deterministic behavior.
pub fn effect(future: impl Future<Output = Result<()>> + Send + Sync + 'static) { pub fn emit_effect(effect: impl Effect) {
emit::<Box<dyn Effect>>(ResolvedVc::upcast( emit::<Box<dyn EffectCollectible>>(ResolvedVc::upcast(
EffectInstance::new(future).resolved_cell(), EffectInstance::new(effect).resolved_cell(),
)); ));
} }
...@@ -151,7 +188,7 @@ pub fn effect(future: impl Future<Output = Result<()>> + Send + Sync + 'static) ...@@ -151,7 +188,7 @@ pub fn effect(future: impl Future<Output = Result<()>> + Send + Sync + 'static)
/// apply_effects(operation).await?; /// apply_effects(operation).await?;
/// ``` /// ```
pub async fn apply_effects(source: impl CollectiblesSource) -> Result<()> { pub async fn apply_effects(source: impl CollectiblesSource) -> Result<()> {
let effects: AutoSet<ResolvedVc<Box<dyn Effect>>> = source.take_collectibles(); let effects: AutoSet<ResolvedVc<Box<dyn EffectCollectible>>> = source.take_collectibles();
if effects.is_empty() { if effects.is_empty() {
return Ok(()); return Ok(());
} }
...@@ -194,7 +231,7 @@ pub async fn apply_effects(source: impl CollectiblesSource) -> Result<()> { ...@@ -194,7 +231,7 @@ pub async fn apply_effects(source: impl CollectiblesSource) -> Result<()> {
/// result_with_effects.effects.apply().await?; /// result_with_effects.effects.apply().await?;
/// ``` /// ```
pub async fn get_effects(source: impl CollectiblesSource) -> Result<Effects> { pub async fn get_effects(source: impl CollectiblesSource) -> Result<Effects> {
let effects: AutoSet<ResolvedVc<Box<dyn Effect>>> = source.take_collectibles(); let effects: AutoSet<ResolvedVc<Box<dyn EffectCollectible>>> = source.take_collectibles();
let effects = effects let effects = effects
.into_iter() .into_iter()
.map(|effect| async move { .map(|effect| async move {
......
...@@ -78,7 +78,7 @@ pub use crate::{ ...@@ -78,7 +78,7 @@ pub use crate::{
collectibles::CollectiblesSource, collectibles::CollectiblesSource,
completion::{Completion, Completions}, completion::{Completion, Completions},
display::{ValueToString, ValueToStringRef}, display::{ValueToString, ValueToStringRef},
effect::{ApplyEffectsContext, Effects, apply_effects, effect, get_effects}, effect::{ApplyEffectsContext, Effect, Effects, apply_effects, emit_effect, get_effects},
error::PrettyPrintError, error::PrettyPrintError,
id::{ExecutionId, LocalTaskId, TRANSIENT_TASK_BIT, TaskId, TraitTypeId, ValueTypeId}, id::{ExecutionId, LocalTaskId, TRANSIENT_TASK_BIT, TaskId, TraitTypeId, ValueTypeId},
invalidation::{ invalidation::{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment