Skip to content

Commit

Permalink
version and update is not serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Sep 26, 2024
1 parent ea78577 commit 7a68261
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type VersionTraitRef = TraitRef<Box<dyn Version>>;
/// The version of a [`EcmascriptDevChunkListContent`].
///
/// [`EcmascriptDevChunkListContent`]: super::content::EcmascriptDevChunkListContent
#[turbo_tasks::value(shared)]
#[turbo_tasks::value(serialization = "none", shared)]
pub(super) struct EcmascriptDevChunkListVersion {
/// A map from chunk path to its version.
#[turbo_tasks(trace_ignore)]
Expand Down
9 changes: 4 additions & 5 deletions turbopack/crates/turbopack-core/src/version.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::Arc;

use anyhow::{anyhow, Result};
use serde::{Deserialize, Serialize};
use turbo_tasks::{
debug::ValueDebugFormat, trace::TraceRawVcs, IntoTraitRef, RcStr, ReadRef, State, TraitRef, Vc,
};
Expand Down Expand Up @@ -168,7 +167,7 @@ impl Version for NotFoundVersion {
}

/// Describes an update to a versioned object.
#[turbo_tasks::value(shared)]
#[turbo_tasks::value(serialization = "none", shared)]
#[derive(Debug)]
pub enum Update {
/// The asset can't be meaningfully updated while the app is running, so the
Expand All @@ -187,15 +186,15 @@ pub enum Update {
}

/// A total update to a versioned object.
#[derive(PartialEq, Eq, Debug, Clone, TraceRawVcs, ValueDebugFormat, Serialize, Deserialize)]
#[derive(PartialEq, Eq, Debug, Clone, TraceRawVcs, ValueDebugFormat)]
pub struct TotalUpdate {
/// The version this update will bring the object to.
#[turbo_tasks(trace_ignore)]
pub to: TraitRef<Box<dyn Version>>,
}

/// A partial update to a versioned object.
#[derive(PartialEq, Eq, Debug, Clone, TraceRawVcs, ValueDebugFormat, Serialize, Deserialize)]
#[derive(PartialEq, Eq, Debug, Clone, TraceRawVcs, ValueDebugFormat)]
pub struct PartialUpdate {
/// The version this update will bring the object to.
#[turbo_tasks(trace_ignore)]
Expand Down Expand Up @@ -241,7 +240,7 @@ impl Version for FileHashVersion {
}
}

#[turbo_tasks::value]
#[turbo_tasks::value(serialization = "none")]
pub struct VersionState {
#[turbo_tasks(trace_ignore)]
version: State<TraitRef<Box<dyn Version>>>,
Expand Down

0 comments on commit 7a68261

Please sign in to comment.