Issue #1200: Build format specs in f-strings (NK1332) and env::current_exe()

Open and answer this issue on GitHub.

ready · opened 2026-11-03 · updated 2026-11-03 · 0 comments

Build the two std/language parts of #1174 specified in commit 1755150b:

Probe:

fn main() {
    let h: u64 = 255
    println(f"[{h:016x}] [{h:>6}] [{h:*^7}] [{h:b}]")   // accepted, as today
    let x = 3.14159
    println(f"[{x:.2}]")                               // accepted
    println(f"[{x:x}] [{h:.2}] [{h:?}]")               // NK1332 each, today passed to Rust
    println(f"{env::current_exe()}")                   // not in std yet
}

To build

  1. Checker: parse the part after the hole’s colon against the table; refuse with NK1332 what is outside it or does not fit the value’s type, naming the table.
  2. Replace the two uses of :? in our own code first, each by a form the spec has: crates/nikaia-std/src/tools/project_tests.nika:525 ({at:?}, a quoted path for TOML) and crates/nikaia-std/src/tools/comptime_tree.nika:470 ({f:?}, a float’s text with its point). Where no form exists, stop and report the gap.
  3. std::env::current_exe in std (written in Nikaia over the existing foreign surface; a step that needs new Rust stops and reports).
  4. Tests in tests/compiler/: each row of the table, each refusal, current_exe non-null on Linux.
  5. Use both in the move of dump_accepted / accepted_dump_dir (#125), with #1199 for the once value.

Generated by Claude Code

Back to Open Issues