V01
Warning
Vocabulary
V01 — A bare word that means nothing
A bare word in an argument that nothing in scope declares — a misspelled name, or a flag written without its dot.
What the compiler said
warning[V01]: nothing in scope declares `primary`, so it reads as nothing — a flag is written `.primary` --> src/App.wf:3:12 | 3 | Button(primary) | ^^^^^^^ = help: did you mean `.primary`? = docs: https://webfluent.monzeromer.dev/errors/V01
Your editor offers this fix: Write it as the flag .primary. wf fix --code V01 applies it to every place it fits.
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Save").h1
Button(primary)
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Save").h1
Button("Save").primary
}
Write the flag with its dot — Button("Save").primary — or declare the name. The word is also a name nothing declares, so the build stops on it as T13; the editor shows both.
A name a branch binds is declared through the whole of its block, however
deep the element that reads it: if let why = e.reason { Row { Pill(why) } },
and a case's payload, .failed(why) { … }, draw nothing.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints may lower it:
"lints": { "V01": "off" }
// wf-allow(V01)