Skip to content
ZOLO / TE140 Type · error

Resource Graph recipe could not be sealed

Compiler diagnostic TE140: Resource Graph recipe could not be sealed.

Why this fires

TE140 means a build-time Resource Graph recipe could not be sealed into its immutable Resource Image. The program never falls back to the current working directory at runtime: a declared resource is either captured successfully by the build or the build fails.

Common causes are:

  • the path passed to Resource.dir(...) does not exist or is not a directory;
  • an explicit include(...) pattern matched no files;
  • a path escapes the resource root, contains .., or is otherwise invalid;
  • two inputs produce the same logical path;
  • a file could not be read while the snapshot was being sealed.
use std::resource::Resource

const public = comptime Resource.dir("./public")
    .include("**/*.html")
    .seal()
//  ^ error[TE140] when ./public is absent or the include matches nothing

Paths are resolved relative to the .zolo source file containing the recipe, not relative to the shell's current directory.

Fix it

  1. Check that the source directory exists next to the declaring source file.
  2. Check the include and exclude patterns. An explicit include is a build assertion, so matching zero files is intentionally an error.
  3. Keep every logical resource path inside the declared root and use / as the separator in patterns.
  4. If two trees need to contribute to one public filesystem, compose them with an explicit conflict policy before calling seal().

Why this is a build error

A sealed ResourceFs is part of the program's content identity. Allowing a missing directory or unmatched pattern to become an empty runtime filesystem would produce deployments that compile successfully and then return missing assets in production. TE140 keeps that failure deterministic and local to the recipe that caused it.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en