Unverified Commit 14ddf68e authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

Remove redundant unsafe_ignore annotations (#98961)

## What?

Remove 54 redundant `#[turbo_tasks(unsafe_ignore)]` field annotations,
reducing the field-annotation total from 136 to 82 (39.7%). Fields that
no longer carry the exemption now participate in the generated
`NonLocalValue` or `OperationValue` assertions.

This is stacked on #98953, which renames the former tracing attribute to
`unsafe_ignore` and leaves it solely as a marker-trait assertion escape
hatch.

## Why?

Most annotations predated the removal of `TraceRawVcs` and were only
needed to exclude fields from recursive VC tracing. Keeping those
exemptions would unnecessarily bypass compile-time marker checks after
tracing is gone.

The remaining annotations fall into these categories:

- 47 foreign, standard-library, or runtime types that cannot receive
marker implementations because of Rust's orphan rules
- 29 workspace-local helper or state types that do not currently
implement the marker
- 4 unconstrained trait objects or opaque futures
- 1 local `OperationValue` contract gap
- 1 macro fixture that tests the exemption itself

The local helper/state group is the meaningful follow-up area; unlike
foreign types, those types could gain separately reviewed marker
implementations in their owning crates.

## How?

Every field exemption was evaluated against the existing generated
marker assertions. An annotation is removed only when the field already
satisfies the appropriate marker bound. `debug_ignore` remains intact
where it serves an independent purpose.

No new `unsafe impl`, wrapper type, macro opt-out, or weakened assertion
is introduced, so this change removes redundant unsafety rather than
relocating or widening it.

## Verification

- `cargo check --workspace --all-targets`
- `cargo fmt --all -- --check`
- `cargo test -p turbo-tasks-macros-tests`
- `cargo test --doc -p turbo-tasks`

<!-- NEXT_JS_LLM -->


<!-- fleet 6de62cf9-27cd-4f08-8fce-7d495c71e7e8 -->

---------
Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
parent 157be190
...@@ -54,7 +54,6 @@ impl ServerHmrChunkLists { ...@@ -54,7 +54,6 @@ impl ServerHmrChunkLists {
#[turbo_tasks::value(serialization = "skip", shared)] #[turbo_tasks::value(serialization = "skip", shared)]
#[derive(Debug)] #[derive(Debug)]
pub struct ServerHmrChunkListVersion { pub struct ServerHmrChunkListVersion {
#[turbo_tasks(unsafe_ignore)]
pub versions_by_chunk_list_path: FxIndexMap<RcStr, ReadRef<ChunkListVersion>>, pub versions_by_chunk_list_path: FxIndexMap<RcStr, ReadRef<ChunkListVersion>>,
} }
......
...@@ -31,9 +31,7 @@ const NEXT_TEMPLATE_PATH: &str = "dist/esm/build/templates"; ...@@ -31,9 +31,7 @@ const NEXT_TEMPLATE_PATH: &str = "dist/esm/build/templates";
/// should be replace with undefined. /// should be replace with undefined.
#[turbo_tasks::value(transparent)] #[turbo_tasks::value(transparent)]
pub struct OptionEnvMap( pub struct OptionEnvMap(
#[turbo_tasks(unsafe_ignore)] #[bincode(with = "turbo_bincode::indexmap")] FxIndexMap<RcStr, Option<RcStr>>,
#[bincode(with = "turbo_bincode::indexmap")]
FxIndexMap<RcStr, Option<RcStr>>,
); );
pub fn defines(define_env: &FxIndexMap<RcStr, Option<RcStr>>) -> CompileTimeDefines { pub fn defines(define_env: &FxIndexMap<RcStr, Option<RcStr>>) -> CompileTimeDefines {
......
...@@ -207,18 +207,10 @@ mod tests { ...@@ -207,18 +207,10 @@ mod tests {
struct PersistableNeverV(#[allow(dead_code)] u32); struct PersistableNeverV(#[allow(dead_code)] u32);
#[turbo_tasks::value(serialization = "skip")] #[turbo_tasks::value(serialization = "skip")]
struct SkipCheapV( struct SkipCheapV(#[allow(dead_code)] u32);
#[turbo_tasks(unsafe_ignore)]
#[allow(dead_code)]
u32,
);
#[turbo_tasks::value(serialization = "skip", evict = "last")] #[turbo_tasks::value(serialization = "skip", evict = "last")]
struct SkipExpensiveV( struct SkipExpensiveV(#[allow(dead_code)] u32);
#[turbo_tasks(unsafe_ignore)]
#[allow(dead_code)]
u32,
);
#[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")] #[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")]
struct SessionStatefulV; struct SessionStatefulV;
......
...@@ -2292,11 +2292,7 @@ mod cell_data_tracking_tests { ...@@ -2292,11 +2292,7 @@ mod cell_data_tracking_tests {
struct PersistableV(#[allow(dead_code)] u32); struct PersistableV(#[allow(dead_code)] u32);
#[turbo_tasks::value(serialization = "skip")] #[turbo_tasks::value(serialization = "skip")]
struct SkipCheapV( struct SkipCheapV(#[allow(dead_code)] u32);
#[turbo_tasks(unsafe_ignore)]
#[allow(dead_code)]
u32,
);
#[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")] #[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")]
struct SkipNeverV; struct SkipNeverV;
......
...@@ -1702,11 +1702,7 @@ mod tests { ...@@ -1702,11 +1702,7 @@ mod tests {
struct Keepable(#[allow(dead_code)] u32); struct Keepable(#[allow(dead_code)] u32);
#[turbo_tasks::value(serialization = "skip", evict = "last")] #[turbo_tasks::value(serialization = "skip", evict = "last")]
struct KeepMe( struct KeepMe(#[allow(dead_code)] u32);
#[turbo_tasks(unsafe_ignore)]
#[allow(dead_code)]
u32,
);
fn dummy_ref() -> SharedReference { fn dummy_ref() -> SharedReference {
SharedReference::new(triomphe::Arc::new(0u32)) SharedReference::new(triomphe::Arc::new(0u32))
......
...@@ -280,7 +280,7 @@ struct StructWithVec { ...@@ -280,7 +280,7 @@ struct StructWithVec {
struct StructWithIgnore { struct StructWithIgnore {
dont_ignore: u32, dont_ignore: u32,
// We're using a `Mutex` instead of a `T: Debug` type to ensure we support `T: !Debug`. // We're using a `Mutex` instead of a `T: Debug` type to ensure we support `T: !Debug`.
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
ignore: Mutex<()>, ignore: Mutex<()>,
} }
......
...@@ -27,14 +27,11 @@ use turbo_tasks_backend::{BackendOptions, TurboTasksBackend, noop_backing_storag ...@@ -27,14 +27,11 @@ use turbo_tasks_backend::{BackendOptions, TurboTasksBackend, noop_backing_storag
/// same path contend on the same per-key state entry. /// same path contend on the same per-key state entry.
#[derive(NonLocalValue)] #[derive(NonLocalValue)]
struct SharedState { struct SharedState {
#[turbo_tasks(unsafe_ignore)]
applies_by_key: Mutex<FxHashMap<RcStr, u64>>, applies_by_key: Mutex<FxHashMap<RcStr, u64>>,
#[turbo_tasks(unsafe_ignore)]
total_applies: AtomicU64, total_applies: AtomicU64,
/// Counts captures that materialized content (i.e. those where /// Counts captures that materialized content (i.e. those where
/// `EffectStateStorage::matches_applied` returned false). Lets tests /// `EffectStateStorage::matches_applied` returned false). Lets tests
/// assert that capture skipped content materialization on re-runs. /// assert that capture skipped content materialization on re-runs.
#[turbo_tasks(unsafe_ignore)]
captures_with_content: AtomicU64, captures_with_content: AtomicU64,
/// Shared `EffectStateStorage` used by both `matches_applied` (in `capture`) /// Shared `EffectStateStorage` used by both `matches_applied` (in `capture`)
/// and `run_apply` (in `apply`). /// and `run_apply` (in `apply`).
...@@ -71,7 +68,7 @@ impl SharedState { ...@@ -71,7 +68,7 @@ impl SharedState {
struct TestEffect { struct TestEffect {
key: RcStr, key: RcStr,
value_hash: u128, value_hash: u128,
#[turbo_tasks(unsafe_ignore, debug_ignore)] #[turbo_tasks(debug_ignore)]
shared: Arc<SharedState>, shared: Arc<SharedState>,
} }
...@@ -172,14 +169,14 @@ struct EmitSpec { ...@@ -172,14 +169,14 @@ struct EmitSpec {
#[turbo_tasks::value(eq = "manual", serialization = "skip")] #[turbo_tasks::value(eq = "manual", serialization = "skip")]
#[derive(Clone)] #[derive(Clone)]
struct TestInput { struct TestInput {
#[turbo_tasks(unsafe_ignore, debug_ignore)] #[turbo_tasks(debug_ignore)]
shared: Arc<SharedState>, shared: Arc<SharedState>,
#[turbo_tasks(unsafe_ignore, debug_ignore)] #[turbo_tasks(debug_ignore)]
spec: Arc<State<EmitSpec>>, spec: Arc<State<EmitSpec>>,
/// Side-channel `State` for invalidating the producer without changing /// Side-channel `State` for invalidating the producer without changing
/// `spec`. Lets tests simulate upstream input changes that don't affect /// `spec`. Lets tests simulate upstream input changes that don't affect
/// emitted hashes (e.g. a comment edit that recompiles to identical bytes). /// emitted hashes (e.g. a comment edit that recompiles to identical bytes).
#[turbo_tasks(unsafe_ignore, debug_ignore)] #[turbo_tasks(debug_ignore)]
tick: Arc<State<u64>>, tick: Arc<State<u64>>,
} }
......
...@@ -555,7 +555,7 @@ fn fresh_decoded_alive() -> Arc<AtomicBool> { ...@@ -555,7 +555,7 @@ fn fresh_decoded_alive() -> Arc<AtomicBool> {
#[turbo_tasks::value(evict = "never", eq = "manual")] #[turbo_tasks::value(evict = "never", eq = "manual")]
struct SessionAlive { struct SessionAlive {
count: u32, count: u32,
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
#[bincode(skip, default = "fresh_decoded_alive")] #[bincode(skip, default = "fresh_decoded_alive")]
alive: Arc<AtomicBool>, alive: Arc<AtomicBool>,
} }
......
...@@ -55,7 +55,7 @@ struct CounterValue(usize); ...@@ -55,7 +55,7 @@ struct CounterValue(usize);
#[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")] #[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")]
struct Counter { struct Counter {
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
value: Mutex<(usize, HashSet<Invalidator>)>, value: Mutex<(usize, HashSet<Invalidator>)>,
} }
......
...@@ -75,7 +75,7 @@ struct CounterValue(usize); ...@@ -75,7 +75,7 @@ struct CounterValue(usize);
#[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")] #[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")]
struct Counter { struct Counter {
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
value: Mutex<(usize, HashSet<Invalidator>)>, value: Mutex<(usize, HashSet<Invalidator>)>,
} }
......
...@@ -20,7 +20,7 @@ pub use self::{ ...@@ -20,7 +20,7 @@ pub use self::{
/// Like [`EnvMap`], but with `serialization = "skip"` to avoid storing /// Like [`EnvMap`], but with `serialization = "skip"` to avoid storing
/// environment variables (which may contain secrets) in the persistent cache. /// environment variables (which may contain secrets) in the persistent cache.
#[turbo_tasks::value(transparent, serialization = "skip")] #[turbo_tasks::value(transparent, serialization = "skip")]
pub struct TransientEnvMap(#[turbo_tasks(unsafe_ignore)] FxIndexMap<RcStr, RcStr>); pub struct TransientEnvMap(FxIndexMap<RcStr, RcStr>);
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl TransientEnvMap { impl TransientEnvMap {
...@@ -31,11 +31,7 @@ impl TransientEnvMap { ...@@ -31,11 +31,7 @@ impl TransientEnvMap {
} }
#[turbo_tasks::value(transparent)] #[turbo_tasks::value(transparent)]
pub struct EnvMap( pub struct EnvMap(#[bincode(with = "turbo_bincode::indexmap")] FxIndexMap<RcStr, RcStr>);
#[turbo_tasks(unsafe_ignore)]
#[bincode(with = "turbo_bincode::indexmap")]
FxIndexMap<RcStr, RcStr>,
);
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl EnvMap { impl EnvMap {
......
...@@ -429,8 +429,8 @@ pub struct FileMeta { ...@@ -429,8 +429,8 @@ pub struct FileMeta {
// Size of the file // Size of the file
// len: u64, // len: u64,
pub(crate) permissions: Permissions, pub(crate) permissions: Permissions,
#[bincode(with = "turbo_bincode::mime_option")]
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
#[bincode(with = "turbo_bincode::mime_option")]
content_type: Option<Mime>, content_type: Option<Mime>,
} }
......
...@@ -30,7 +30,6 @@ use crate::{FileSystemPath, globset::parse}; ...@@ -30,7 +30,6 @@ use crate::{FileSystemPath, globset::parse};
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Glob { pub struct Glob {
glob: RcStr, glob: RcStr,
#[turbo_tasks(unsafe_ignore)]
opts: GlobOptions, opts: GlobOptions,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
regex: Regex, regex: Regex,
......
...@@ -88,7 +88,7 @@ impl SymlinkMode { ...@@ -88,7 +88,7 @@ impl SymlinkMode {
} }
#[derive(Default, NonLocalValue)] #[derive(Default, NonLocalValue)]
struct PathInvalidations(#[turbo_tasks(unsafe_ignore)] Arc<Mutex<FxHashSet<RcStr>>>); struct PathInvalidations(Arc<Mutex<FxHashSet<RcStr>>>);
#[turbo_tasks::function(operation, root)] #[turbo_tasks::function(operation, root)]
async fn extract_effects_operation(op: OperationVc<()>) -> anyhow::Result<Vc<Effects>> { async fn extract_effects_operation(op: OperationVc<()>) -> anyhow::Result<Vc<Effects>> {
......
...@@ -383,16 +383,16 @@ pub struct Effects { ...@@ -383,16 +383,16 @@ pub struct Effects {
/// Pre-resolved effects awaiting application. Lives for the lifetime of the cell — released /// Pre-resolved effects awaiting application. Lives for the lifetime of the cell — released
/// when the producer reruns and `cell = "new"` overwrites the cell, which is when any /// when the producer reruns and `cell = "new"` overwrites the cell, which is when any
/// upstream `ReadRef` strong-count cascades are naturally released. /// upstream `ReadRef` strong-count cascades are naturally released.
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
captured: CapturedSlice, captured: CapturedSlice,
/// Captured at `take_effects` time. `None` for `Effects::empty()` (nothing to retry). /// Captured at `take_effects` time. `None` for `Effects::empty()` (nothing to retry).
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
invalidator: Option<Invalidator>, invalidator: Option<Invalidator>,
/// Unique key info computed eagerly in `take_effects`. Holds one index into `captured` per /// Unique key info computed eagerly in `take_effects`. Holds one index into `captured` per
/// unique key, or a `ConflictingEffectError` if two captured effects share a key with /// unique key, or a `ConflictingEffectError` if two captured effects share a key with
/// different hashes. No [`EffectStateStorage`] interaction here — that is deferred to /// different hashes. No [`EffectStateStorage`] interaction here — that is deferred to
/// `apply()`. /// `apply()`.
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
unique_keys: Arc<UniqueKeys>, unique_keys: Arc<UniqueKeys>,
} }
......
...@@ -467,13 +467,13 @@ mod tests { ...@@ -467,13 +467,13 @@ mod tests {
use crate::{self as turbo_tasks, VcValueType, registry}; use crate::{self as turbo_tasks, VcValueType, registry};
#[turbo_tasks::value(serialization = "skip")] #[turbo_tasks::value(serialization = "skip")]
struct SkipValue(#[turbo_tasks(unsafe_ignore)] u32); struct SkipValue(u32);
#[turbo_tasks::value(serialization = "hash")] #[turbo_tasks::value(serialization = "hash")]
struct HashValue(u32); struct HashValue(u32);
#[turbo_tasks::value(serialization = "skip", evict = "last")] #[turbo_tasks::value(serialization = "skip", evict = "last")]
struct SkipExpensiveValue(#[turbo_tasks(unsafe_ignore)] u32); struct SkipExpensiveValue(u32);
#[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")] #[turbo_tasks::value(serialization = "skip", evict = "never", cell = "new", eq = "manual")]
struct SessionStatefulValue; struct SessionStatefulValue;
......
...@@ -353,7 +353,6 @@ impl SeenIssues { ...@@ -353,7 +353,6 @@ impl SeenIssues {
#[derive(Clone)] #[derive(Clone)]
pub struct ConsoleUi { pub struct ConsoleUi {
options: LogOptions, options: LogOptions,
#[turbo_tasks(unsafe_ignore, debug_ignore)] #[turbo_tasks(unsafe_ignore, debug_ignore)]
seen: Arc<Mutex<SeenIssues>>, seen: Arc<Mutex<SeenIssues>>,
} }
......
...@@ -113,14 +113,14 @@ pub enum CompileTimeDefineValue { ...@@ -113,14 +113,14 @@ pub enum CompileTimeDefineValue {
Null, Null,
Bool(bool), Bool(bool),
Number( Number(
#[bincode(with = "turbo_bincode::serde_self_describing")]
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
#[bincode(with = "turbo_bincode::serde_self_describing")]
serde_json::Number, serde_json::Number,
), ),
String(RcStr), String(RcStr),
BigInt( BigInt(
#[bincode(with_serde)]
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
#[bincode(with_serde)]
Box<BigInt>, Box<BigInt>,
), ),
Array(Vec<CompileTimeDefineValue>), Array(Vec<CompileTimeDefineValue>),
......
...@@ -39,7 +39,6 @@ pub struct PartialNamespaceModules(FxHashSet<ResolvedVc<Box<dyn Module>>>); ...@@ -39,7 +39,6 @@ pub struct PartialNamespaceModules(FxHashSet<ResolvedVc<Box<dyn Module>>>);
#[derive(Clone, Default, Debug)] #[derive(Clone, Default, Debug)]
pub struct BindingUsageInfo { pub struct BindingUsageInfo {
unused_references: ResolvedVc<UnusedReferences>, unused_references: ResolvedVc<UnusedReferences>,
#[turbo_tasks(unsafe_ignore)]
unused_references_edges: FxHashSet<GraphEdgeIndex>, unused_references_edges: FxHashSet<GraphEdgeIndex>,
used_exports: ResolvedVc<UsedExportsMap>, used_exports: ResolvedVc<UsedExportsMap>,
......
...@@ -25,11 +25,7 @@ use crate::{ ...@@ -25,11 +25,7 @@ use crate::{
#[derive(Clone, Debug, Default, PartialEq, ValueDebugFormat, Encode, Decode)] #[derive(Clone, Debug, Default, PartialEq, ValueDebugFormat, Encode, Decode)]
#[repr(transparent)] #[repr(transparent)]
pub struct RoaringBitmapWrapper( pub struct RoaringBitmapWrapper(#[bincode(with_serde)] pub RoaringBitmap);
#[turbo_tasks(unsafe_ignore)]
#[bincode(with_serde)]
pub RoaringBitmap,
);
impl TaskInput for RoaringBitmapWrapper { impl TaskInput for RoaringBitmapWrapper {
fn is_transient(&self) -> bool { fn is_transient(&self) -> bool {
...@@ -89,7 +85,6 @@ pub struct ModuleToChunkGroups(FxHashMap<ResolvedVc<Box<dyn Module>>, RoaringBit ...@@ -89,7 +85,6 @@ pub struct ModuleToChunkGroups(FxHashMap<ResolvedVc<Box<dyn Module>>, RoaringBit
#[turbo_tasks::value] #[turbo_tasks::value]
pub struct ChunkGroupInfo { pub struct ChunkGroupInfo {
pub module_chunk_groups: ResolvedVc<ModuleToChunkGroups>, pub module_chunk_groups: ResolvedVc<ModuleToChunkGroups>,
#[turbo_tasks(unsafe_ignore)]
#[bincode(with = "turbo_bincode::indexset")] #[bincode(with = "turbo_bincode::indexset")]
pub chunk_groups: FxIndexSet<ChunkGroup>, pub chunk_groups: FxIndexSet<ChunkGroup>,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
...@@ -114,7 +109,6 @@ pub struct ChunkingHeuristicsInfo { ...@@ -114,7 +109,6 @@ pub struct ChunkingHeuristicsInfo {
/// ///
/// Example: `priority_routes = {3, 7}` — chunk groups 3 and 7 are served by a priority /// Example: `priority_routes = {3, 7}` — chunk groups 3 and 7 are served by a priority
/// route; any group not in the set (e.g. 4) is not. /// route; any group not in the set (e.g. 4) is not.
#[turbo_tasks(unsafe_ignore)]
pub priority_routes: RoaringBitmapWrapper, pub priority_routes: RoaringBitmapWrapper,
} }
......
...@@ -282,12 +282,11 @@ pub struct SingleModuleGraph { ...@@ -282,12 +282,11 @@ pub struct SingleModuleGraph {
// HashMaps have nondeterministic order, but this map is only used for lookups (in // HashMaps have nondeterministic order, but this map is only used for lookups (in
// `get_module`) and not iteration. // `get_module`) and not iteration.
// //
// This contains Vcs, but they are already contained in the graph, so no need to trace this. // This contains Vcs, but they are already contained in the graph.
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
#[bincode(with_serde)] #[bincode(with_serde)]
modules: FxHashMap<ResolvedVc<Box<dyn Module>>, NodeIndex>, modules: FxHashMap<ResolvedVc<Box<dyn Module>>, NodeIndex>,
#[turbo_tasks(unsafe_ignore)]
entries: GraphEntries, entries: GraphEntries,
/// Derived from `entries` and `modules`. Both are immutable after graph construction, and node /// Derived from `entries` and `modules`. Both are immutable after graph construction, and node
......
...@@ -66,7 +66,7 @@ pub struct ModuleBatchesGraph { ...@@ -66,7 +66,7 @@ pub struct ModuleBatchesGraph {
// HashMaps have nondeterministic order, but this map is only used for lookups and not // HashMaps have nondeterministic order, but this map is only used for lookups and not
// iteration. // iteration.
// //
// This contains Vcs, but they are already contained in the graph, so no need to trace this. // This contains Vcs, but they are already contained in the graph.
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
#[bincode(with_serde)] #[bincode(with_serde)]
entries: FxHashMap<ResolvedVc<Box<dyn Module>>, NodeIndex>, entries: FxHashMap<ResolvedVc<Box<dyn Module>>, NodeIndex>,
......
...@@ -197,7 +197,6 @@ pub struct TotalUpdate { ...@@ -197,7 +197,6 @@ pub struct TotalUpdate {
// //
// TODO: Remove this exemption after `Version` guarantees `NonLocalValue`. // TODO: Remove this exemption after `Version` guarantees `NonLocalValue`.
// `EcmascriptDevChunkListVersion` currently violates that assumption. // `EcmascriptDevChunkListVersion` currently violates that assumption.
#[turbo_tasks(unsafe_ignore)]
pub to: TraitRef<Box<dyn Version>>, pub to: TraitRef<Box<dyn Version>>,
} }
...@@ -206,7 +205,6 @@ pub struct TotalUpdate { ...@@ -206,7 +205,6 @@ pub struct TotalUpdate {
pub struct PartialUpdate { pub struct PartialUpdate {
/// The version this update will bring the object to. /// The version this update will bring the object to.
// TODO: Remove this exemption after `Version` guarantees `NonLocalValue`. // TODO: Remove this exemption after `Version` guarantees `NonLocalValue`.
#[turbo_tasks(unsafe_ignore)]
pub to: TraitRef<Box<dyn Version>>, pub to: TraitRef<Box<dyn Version>>,
/// The instructions to be passed to a remote system in order to update the /// The instructions to be passed to a remote system in order to update the
/// versioned object. /// versioned object.
......
...@@ -7,7 +7,7 @@ use crate::chunk::CssImport; ...@@ -7,7 +7,7 @@ use crate::chunk::CssImport;
/// This is rust only and can't be implemented by non-rust plugins. /// This is rust only and can't be implemented by non-rust plugins.
#[turbo_tasks::value(shared, serialization = "skip", eq = "manual", cell = "new")] #[turbo_tasks::value(shared, serialization = "skip", eq = "manual", cell = "new")]
pub struct CodeGeneration { pub struct CodeGeneration {
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
pub imports: Vec<CssImport>, pub imports: Vec<CssImport>,
} }
......
...@@ -159,14 +159,12 @@ pub struct UnresolvedUrlReferences(pub Vec<(String, ResolvedVc<UrlAssetReference ...@@ -159,14 +159,12 @@ pub struct UnresolvedUrlReferences(pub Vec<(String, ResolvedVc<UrlAssetReference
pub enum ParseCssResult { pub enum ParseCssResult {
Ok { Ok {
code: ResolvedVc<FileContent>, code: ResolvedVc<FileContent>,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
stylesheet: StyleSheet<'static>, stylesheet: StyleSheet<'static>,
references: ResolvedVc<ModuleReferences>, references: ResolvedVc<ModuleReferences>,
url_references: ResolvedVc<UnresolvedUrlReferences>, url_references: ResolvedVc<UnresolvedUrlReferences>,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
options: ParserOptions<'static>, options: ParserOptions<'static>,
}, },
...@@ -182,10 +180,8 @@ pub enum CssWithPlaceholderResult { ...@@ -182,10 +180,8 @@ pub enum CssWithPlaceholderResult {
references: ResolvedVc<ModuleReferences>, references: ResolvedVc<ModuleReferences>,
url_references: ResolvedVc<UnresolvedUrlReferences>, url_references: ResolvedVc<UnresolvedUrlReferences>,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
exports: Option<FxIndexMap<String, CssModuleExport>>, exports: Option<FxIndexMap<String, CssModuleExport>>,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
placeholders: FxHashMap<String, Url<'static>>, placeholders: FxHashMap<String, Url<'static>>,
}, },
...@@ -197,7 +193,6 @@ pub enum CssWithPlaceholderResult { ...@@ -197,7 +193,6 @@ pub enum CssWithPlaceholderResult {
#[allow(clippy::large_enum_variant)] // This is a turbo-tasks value #[allow(clippy::large_enum_variant)] // This is a turbo-tasks value
pub enum FinalCssResult { pub enum FinalCssResult {
Ok { Ok {
#[turbo_tasks(unsafe_ignore)]
output_code: String, output_code: String,
source_map: Option<StructuredSourceMap>, source_map: Option<StructuredSourceMap>,
......
...@@ -57,7 +57,6 @@ pub struct ImportAnnotations { ...@@ -57,7 +57,6 @@ pub struct ImportAnnotations {
/// Parsed turbopack loader configuration from import attributes. /// Parsed turbopack loader configuration from import attributes.
/// e.g. `import "file" with { turbopackLoader: "raw-loader" }` /// e.g. `import "file" with { turbopackLoader: "raw-loader" }`
#[turbo_tasks(unsafe_ignore)]
#[bincode(with_serde)] #[bincode(with_serde)]
turbopack_loader: Option<WebpackLoaderItem>, turbopack_loader: Option<WebpackLoaderItem>,
turbopack_rename_as: Option<RcStr>, turbopack_rename_as: Option<RcStr>,
......
...@@ -20,13 +20,11 @@ type VersionTraitRef = TraitRef<Box<dyn Version>>; ...@@ -20,13 +20,11 @@ type VersionTraitRef = TraitRef<Box<dyn Version>>;
pub struct ChunkListVersion { pub struct ChunkListVersion {
pub id: RcStr, pub id: RcStr,
/// A map from chunk path to its version. /// A map from chunk path to its version.
#[turbo_tasks(unsafe_ignore)]
pub by_path: FxIndexMap<String, VersionTraitRef>, pub by_path: FxIndexMap<String, VersionTraitRef>,
/// A map from chunk merger to the version of the merged contents of chunks. /// A map from chunk merger to the version of the merged contents of chunks.
// //
// TODO: Remove this exemption after `Version` guarantees `NonLocalValue`. // TODO: Remove this exemption after `Version` guarantees `NonLocalValue`.
// `turbopack_core::version::TotalUpdate` relies on that guarantee. // `turbopack_core::version::TotalUpdate` relies on that guarantee.
#[turbo_tasks(unsafe_ignore)]
pub by_merger: FxIndexMap<ResolvedVc<Box<dyn VersionedContentMerger>>, VersionTraitRef>, pub by_merger: FxIndexMap<ResolvedVc<Box<dyn VersionedContentMerger>>, VersionTraitRef>,
} }
......
...@@ -79,7 +79,6 @@ impl Version for EcmascriptChunkVersion { ...@@ -79,7 +79,6 @@ impl Version for EcmascriptChunkVersion {
/// essentially a composite [`EcmascriptChunkVersion`]. /// essentially a composite [`EcmascriptChunkVersion`].
#[turbo_tasks::value(serialization = "skip", shared)] #[turbo_tasks::value(serialization = "skip", shared)]
pub struct EcmascriptMergedChunkVersion { pub struct EcmascriptMergedChunkVersion {
#[turbo_tasks(unsafe_ignore)]
pub versions: Vec<ReadRef<EcmascriptChunkVersion>>, pub versions: Vec<ReadRef<EcmascriptChunkVersion>>,
} }
......
...@@ -359,7 +359,7 @@ impl EcmascriptModuleAssetBuilder { ...@@ -359,7 +359,7 @@ impl EcmascriptModuleAssetBuilder {
#[turbo_tasks::value(eq = "manual")] #[turbo_tasks::value(eq = "manual")]
struct LastSuccessfulSource { struct LastSuccessfulSource {
#[bincode(with = "parking_lot_mutex_bincode")] #[bincode(with = "parking_lot_mutex_bincode")]
#[turbo_tasks(unsafe_ignore, debug_ignore)] #[turbo_tasks(debug_ignore)]
source: parking_lot::Mutex<Option<Rope>>, source: parking_lot::Mutex<Option<Rope>>,
/// Notifies the backend when the in-memory `source` changes so that the /// Notifies the backend when the in-memory `source` changes so that the
/// serialized task state is written back to the persistence layer. /// serialized task state is written back to the persistence layer.
......
...@@ -446,12 +446,10 @@ pub(crate) enum SplitResult { ...@@ -446,12 +446,10 @@ pub(crate) enum SplitResult {
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
entrypoints: FxHashMap<Key, u32>, entrypoints: FxHashMap<Key, u32>,
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
modules: Vec<ResolvedVc<ParseResult>>, modules: Vec<ResolvedVc<ParseResult>>,
#[turbo_tasks(unsafe_ignore)] #[turbo_tasks(unsafe_ignore)]
deps: FxHashMap<u32, Vec<PartId>>, deps: FxHashMap<u32, Vec<PartId>>,
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore, unsafe_ignore)]
star_reexports: Vec<ExportAll>, star_reexports: Vec<ExportAll>,
}, },
......
...@@ -162,7 +162,7 @@ pub enum ParseResult { ...@@ -162,7 +162,7 @@ pub enum ParseResult {
/// Raw bytes of the source that produced this parse, captured atomically /// Raw bytes of the source that produced this parse, captured atomically
/// with the AST. `failsafe_parse` uses this to recover good parses in development on /// with the AST. `failsafe_parse` uses this to recover good parses in development on
/// error. /// error.
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore)]
program_source: Rope, program_source: Rope,
}, },
Unparsable { Unparsable {
......
...@@ -87,7 +87,6 @@ struct WebpackLoadersProcessingResult { ...@@ -87,7 +87,6 @@ struct WebpackLoadersProcessingResult {
#[turbo_tasks(debug_ignore, unsafe_ignore)] #[turbo_tasks(debug_ignore, unsafe_ignore)]
source: Either<RcStr, BytesBase64>, source: Either<RcStr, BytesBase64>,
map: Option<RcStr>, map: Option<RcStr>,
#[turbo_tasks(unsafe_ignore)]
assets: Option<Vec<EmittedAsset>>, assets: Option<Vec<EmittedAsset>>,
} }
......
...@@ -99,7 +99,6 @@ pub enum ModuleType { ...@@ -99,7 +99,6 @@ pub enum ModuleType {
main: ResolvedVc<EcmascriptInputTransforms>, main: ResolvedVc<EcmascriptInputTransforms>,
/// Transforms to run last: JSX, preset-env, scan for imports, ... /// Transforms to run last: JSX, preset-env, scan for imports, ...
postprocess: ResolvedVc<EcmascriptInputTransforms>, postprocess: ResolvedVc<EcmascriptInputTransforms>,
#[turbo_tasks(unsafe_ignore)]
options: ResolvedVc<EcmascriptOptions>, options: ResolvedVc<EcmascriptOptions>,
}, },
Typescript { Typescript {
...@@ -113,7 +112,6 @@ pub enum ModuleType { ...@@ -113,7 +112,6 @@ pub enum ModuleType {
tsx: bool, tsx: bool,
// follow references to imported types. // follow references to imported types.
analyze_types: bool, analyze_types: bool,
#[turbo_tasks(unsafe_ignore)]
options: ResolvedVc<EcmascriptOptions>, options: ResolvedVc<EcmascriptOptions>,
}, },
TypescriptDeclaration { TypescriptDeclaration {
...@@ -123,7 +121,6 @@ pub enum ModuleType { ...@@ -123,7 +121,6 @@ pub enum ModuleType {
main: ResolvedVc<EcmascriptInputTransforms>, main: ResolvedVc<EcmascriptInputTransforms>,
/// Transforms to run last: JSX, preset-env, scan for imports, ... /// Transforms to run last: JSX, preset-env, scan for imports, ...
postprocess: ResolvedVc<EcmascriptInputTransforms>, postprocess: ResolvedVc<EcmascriptInputTransforms>,
#[turbo_tasks(unsafe_ignore)]
options: ResolvedVc<EcmascriptOptions>, options: ResolvedVc<EcmascriptOptions>,
}, },
EcmascriptExtensionless { EcmascriptExtensionless {
...@@ -133,7 +130,6 @@ pub enum ModuleType { ...@@ -133,7 +130,6 @@ pub enum ModuleType {
main: ResolvedVc<EcmascriptInputTransforms>, main: ResolvedVc<EcmascriptInputTransforms>,
/// Transforms to run last: JSX, preset-env, scan for imports, ... /// Transforms to run last: JSX, preset-env, scan for imports, ...
postprocess: ResolvedVc<EcmascriptInputTransforms>, postprocess: ResolvedVc<EcmascriptInputTransforms>,
#[turbo_tasks(unsafe_ignore)]
options: ResolvedVc<EcmascriptOptions>, options: ResolvedVc<EcmascriptOptions>,
}, },
Raw, Raw,
......
...@@ -33,8 +33,8 @@ pub enum RuleCondition { ...@@ -33,8 +33,8 @@ pub enum RuleCondition {
ResourcePathInExactDirectory(FileSystemPath), ResourcePathInExactDirectory(FileSystemPath),
ContentTypeStartsWith(String), ContentTypeStartsWith(String),
ContentTypeEmpty, ContentTypeEmpty,
ResourcePathEsRegex(#[turbo_tasks(unsafe_ignore)] ReadRef<EsRegex>), ResourcePathEsRegex(ReadRef<EsRegex>),
ResourceContentEsRegex(#[turbo_tasks(unsafe_ignore)] ReadRef<EsRegex>), ResourceContentEsRegex(ReadRef<EsRegex>),
/// For paths that are within the same filesystem as the `base`, it need to /// For paths that are within the same filesystem as the `base`, it need to
/// match the relative path from base to resource. This includes `./` or /// match the relative path from base to resource. This includes `./` or
/// `../` prefix. For paths in a different filesystem, it need to match /// `../` prefix. For paths in a different filesystem, it need to match
...@@ -43,15 +43,14 @@ pub enum RuleCondition { ...@@ -43,15 +43,14 @@ pub enum RuleCondition {
/// project. Globs starting with `**` can match any path. /// project. Globs starting with `**` can match any path.
ResourcePathGlob { ResourcePathGlob {
base: FileSystemPath, base: FileSystemPath,
#[turbo_tasks(unsafe_ignore)]
glob: ReadRef<Glob>, glob: ReadRef<Glob>,
}, },
ResourceBasePathGlob(#[turbo_tasks(unsafe_ignore)] ReadRef<Glob>), ResourceBasePathGlob(ReadRef<Glob>),
ResourceQueryContains(String), ResourceQueryContains(String),
ResourceQueryEquals(String), ResourceQueryEquals(String),
ResourceQueryEsRegex(#[turbo_tasks(unsafe_ignore)] ReadRef<EsRegex>), ResourceQueryEsRegex(ReadRef<EsRegex>),
ContentTypeGlob(#[turbo_tasks(unsafe_ignore)] ReadRef<Glob>), ContentTypeGlob(ReadRef<Glob>),
ContentTypeEsRegex(#[turbo_tasks(unsafe_ignore)] ReadRef<EsRegex>), ContentTypeEsRegex(ReadRef<EsRegex>),
} }
impl RuleCondition { impl RuleCondition {
......
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