Xo is experimental. The source code is not public yet; until then, try Xo in your browser.
Menu · XO1501

Docs

XO1501: --stamp names no stampable constant

error · reported by the build

xo build --stamp NAME=VALUE (also xo run) replaces the value of the constant NAME of the main module for that build, so a program reports a version, commit, or build date set by the build script. The constant must exist in a module named on the command line and be declared const NAME: Str = "..." with a plain string literal (no interpolation, no expression): the literal is what the build replaces. Other constants may be built from it.

Example

// xo build --stamp VERSION=1.4.0
const VERSION = 14

Fix

// xo build --stamp VERSION=1.4.0
const VERSION: Str = "dev"

Run xo explain XO1501 for this text in a terminal, or see section 10.6 of the specification.