Skip to main content

Module read_trace

Module read_trace 

Source
Expand description

Trace of the paths that import resolution reads.

The persisted graph cache stores import resolutions. A warm run can only reuse them when the cache key covers each path that the resolution read. With the read-trace feature, the file system calls of oxc_resolver and the direct path checks of the resolution fallbacks report their paths here, and ReadRecorder collects the paths below a scope directory. Tests use the recorded read set to check that the cache key covers each path.

The trace does not see the manifest loads in fallow_config (the package.json and Deno configs of the project and workspace roots, and the tsconfig.json chains), or the read of .pnp.cjs in the pnp crate. The resolver input hash reads each of these files by name.

Without the feature, the trace records nothing, so a release build pays no cost for it. The helpers report missed paths and read package manifests to crate::missed_probes in every build.

Enumsยง

ReadKind
What a resolution step learned from a path.