Statac

Problems explained

Alias limit

error An error stops the build: nothing is published until it is fixed.

In YAML, &name marks a value and *name repeats it somewhere else. The aliases in one file have repeated more than Statac reads: more than 10,000 values, or more than 1 MB of text.

What you’ll see

error  Alias limit: by `*book`, aliases have repeated more than 10,000 values
  More: https://statac.dev/e/alias-limit/

In the terminal the message also names the file and line where there is one, and marks the exact text.

Why Statac stops

Aliases can repeat aliases, so a few lines can grow into an enormous document that takes all the memory a computer has. Statac stops at the alias that passes the limit instead.

How to fix it

Write the values out where you need them, or repeat fewer of them. A file that needs this many repeats is usually better split into data files.

Example

a: &a [one, one, one, one, one, one, one, one, one, one]
b: &b [*a, *a, *a, *a, *a, *a, *a, *a, *a, *a]
c: &c [*b, *b, *b, *b, *b, *b, *b, *b, *b, *b]
d: [*c, *c, *c, *c, *c, *c, *c, *c, *c, *c]

Each line repeats the one before ten times, so d alone holds more than 10,000 values.

Its name

Namealias-limit
In the terminalstatac explain alias-limit
To stop showing itIt stops the build, so it can't be quietened.

Something unclear or wrong? Open an issue on GitHub.