Skip to content

Nocter v0.29.0

Latest

Choose a tag to compare

@rvo-jp rvo-jp released this 02 Sep 19:27
· 1 commit to main since this release

Nocter v0.29.0 Release Notes

Nocter v0.29.0 completes the standard-input and direct-run invocation boundary needed by ordinary
command-line applications. It adds exact child-argument forwarding to nocter run, a borrowed
standard-input stream, explicit buffered line reading, and one public example that exercises the
complete process contract. The only implemented host and native target remains arm64-darwin.

Exact Run Arguments

nocter run now uses its first standalone -- to separate compiler input from child-process
arguments:

nocter run app.nct -- first "two words" --flag

Every value after the separator is forwarded unchanged as a native operating-system argument and
becomes visible from std/process.arg(1). The launcher continues to supply argument zero. Empty,
option-like, repeated-separator, and non-Unicode arguments are not decoded or reinterpreted by the
compiler.

Compiler source selection must finish before --. A source spelling that begins with - therefore
uses an explicit file option, such as:

nocter run --file ./--script.nct -- value

Other commands retain their existing end-of-options behavior and do not acquire a child-argument
channel. Package and single-file working directories, inherited streams, launch failures, child
status, and temporary-executable cleanup remain unchanged.

Borrowed Standard Input

std/io now exposes the process input through the existing File and Reader contracts:

pub noalloc func stdin(): File

io.stdin() returns a non-owning wrapper around the inherited standard-input descriptor. Closing
or dropping the wrapper makes only that value terminal; it never closes the process-global
descriptor or invalidates another wrapper. Construction does not allocate, read, wait, buffer, or
validate UTF-8. Reads retain the same interruption, initialized-byte, and stable-error policy as an
opened file.

Explicit Buffered Lines

Line-oriented input remains explicit state owned by BufReader:

use std/io
use std/io/buffer.BufReader

var input = BufReader.new(io.stdin())
let line = input.read_line()?

No stateless io.read_line or hidden process-global buffer was added. Each reader owns its unread
bytes and line assembly. read_line and read_line_into preserve the existing EOF, LF and CRLF
removal, UTF-8 validation, allocation-failure, reusable-destination, and terminal-state contracts.

Practical Integration

The new stdin-prefix package example prefixes every logical input line with one exact command-line
argument. It combines std/process, io.stdin, BufReader, reusable String storage, and ordinary
Writer output. Its repository-owned process scenarios cover empty lines, LF and CRLF, a retained
lone carriage return, a multi-byte scalar crossing small read buffers, an unterminated final line,
clean EOF, usage failure, and invalid UTF-8.

Formatter and semantic editor tests consume the authored package source. Native and command tests
execute the same process contracts, and installed-home qualification pipes the shared input through
the extracted compiler's nocter run path with an exact forwarded prefix.

Compatibility and Non-goals

The first standalone -- after nocter run now always begins child arguments; it can no longer
select a positional source for that command. This is an intentional grammar clarification, not a
compatibility alias. Existing invocations without child arguments continue to behave identically.

This release does not add a subprocess builder, environment or child-working-directory overrides,
pipes as a standard-library object, terminal modes, asynchronous or nonblocking I/O, a hidden line
reader, another native target, or persistent compiler caches.

Candidate Qualification

Release-content commit 724bf0bb6edcb9c7c8a45d2e8aa0645f6ae78544 passed two independent
locked workspace runs with 1,532 tests passed, zero failed, and one ignored in each run. The
ignored public-HTTPS acquisition test passed separately. Warnings-denied all-target Clippy,
no-default-features checking, deterministic documentation, formatter checks, and repository
validation also passed.

Two independent optimized builds produced the same archive and installed home. The retained local
archive is 8,271,538 bytes and has SHA-256
3f3fabf70062fc33707206739966b5f4c5234d44f93ed2add428e15cfb3bdb1d. Its isolated installed home
passed version and integrity checks, every public example, package run/build/test/graph operations,
the exact text-banner and stdin-prefix process contracts, framed LSP requests, immutability
checking, and compiler and standard-library tamper rejection. Publication reuses that retained
candidate without rebuilding it.