Skip to content

Environment variables

These variables change what nomi does. Go’s own module variables (GOPROXY, GONOPROXY, GOPRIVATE, GOSUMDB, GONOSUMDB, GOMODCACHE, GOFLAGS) work as Dependencies describes, and GOOS and GOARCH pick a build’s target as --target does.

VariableWhat it does
NOMI_ENVnomi test sets it to test unless it is set (The test environment). Programs read it from startup.env.
NOMI_COLORalways (or 1, true, yes, force) colours diagnostics and test reports even into a pipe; never (or 0, false, no) never colours them. Otherwise NO_COLOR or TERM=dumb turns colour off, CLICOLOR_FORCE turns it on, and colour goes only to a terminal.
NOMI_DIAGNOSTICSshort prints each diagnostic as one path:line:col: message line, for every command.
NOMI_DEBUG_LOWERINGFor work on the compiler. Any value but 0 adds the compiler’s own reason to each “not supported yet” error (When code cannot run yet).
NOMI_GOThe go command, or a Go root, that builds Go bindings, ahead of the go on PATH and the downloaded toolchain (The Go toolchain).
NOMI_GO_DOWNLOAD_URLWhere the managed Go toolchain is downloaded from, in place of https://go.dev/dl/.
NOMI_TOOLCHAIN_ROOTThe directory that holds downloaded Go toolchains, in place of <user cache>/nomi/go.
NOMI_COMPILER_SOURCEFor work on the compiler. A checkout of the compiler that the wrapper of a program with Go bindings builds against, in place of the compiler version nomi was built from.
NOMI_FFIRUN_CACHE_ROOTThe directory that holds Go-binding builds, in place of <user cache>/nomi/builds. The cache is safe to delete.
NOMI_FFIRUN_CACHE_MAX_ENTRIESHow many build directories that cache keeps before it removes the oldest (256 unless set); zero or less keeps every one.
NOMI_STD_CACHE_ROOTThe directory, in place of <user cache>/nomi, under which the language server writes the standard library’s source for go-to-definition into std.
NOMI_ARTIFACT_CACHEThe directory, in place of <user cache>/nomi/artifacts, where nomi keeps what it compiles once and reads back in later runs: each program nomi run, check, test and build compiled (The artifact cache), and for a nomi built from source the standard library’s interfaces and its lowering, which a release embeds instead. off keeps nothing. The cache is safe to delete.
NOMI_DEBUG_ARTIFACT_CACHE1 reports on stderr whether each command read a kept program, and why not, and whether it kept one.
NOMI_DEBUG_STD_BUNDLEFor work on the compiler. 1 reports on stderr why a cached standard library lowering or its cached interfaces were not used.
NOMI_STD_WHOLEFor work on the compiler. 1 builds every standard library module when a command starts, as the language server does, rather than only the modules the program imports.
NOMI_PROFILE1 profiles a run as nomi run --profile does and prints the table on standard error when it ends; a file name also writes the profile there in pprof’s format, as --profile=<file> does (--profile). It works for nomi run and for an executable nomi build wrote.
NOMI_CPUPROFILEFor work on the VM. A file that nomi run, and a nomi build executable, write a Go CPU profile of the run to, for go tool pprof <nomi or the executable> <file>. The frames are the VM’s Go functions, not the program’s Nomi functions.