Skip to content

0.16#66

Merged
rockorager merged 14 commits into
mainfrom
0.16
Apr 16, 2026
Merged

0.16#66
rockorager merged 14 commits into
mainfrom
0.16

Conversation

@rockorager

Copy link
Copy Markdown
Owner

No description provided.

rockorager and others added 14 commits April 16, 2026 04:54
Add new EnvConfig struct to replace ?*const std.process.EnvMap parameter.
This struct has two optional fields: tz and tzdir, which are the only
env vars used in the codebase (TZ and TZDIR).

Amp-Thread-ID: https://ampcode.com/threads/T-019c1943-dfe8-738f-bb29-33f5535caba6
Co-authored-by: Amp <amp@ampcode.com>
Change local(alloc, maybe_env) to local(alloc, io, env) to use the new
EnvConfig struct and Zig 0.16's io parameter for file readers.

- Replace ?*const std.process.EnvMap with EnvConfig parameter
- Use env.tz instead of env.get("TZ")
- Pass io to f.reader() as required by Zig 0.16
- Update localFromEnv call to pass io parameter

Amp-Thread-ID: https://ampcode.com/threads/T-019c1944-707c-729d-bd53-54f720ca9a4b
Co-authored-by: Amp <amp@ampcode.com>
Update localFromEnv() to accept std.Io and EnvConfig parameters.
Update loadTimeZone() to accept std.Io and EnvConfig, replacing the
optional EnvMap parameter. Change env.get("TZDIR") to env.tzdir.
Fix f.reader() calls to use the new two-argument API.

Amp-Thread-ID: https://ampcode.com/threads/T-019c1944-ff40-7226-a919-97166bf2902d
Co-authored-by: Amp <amp@ampcode.com>
Add io parameter to instant() function signature and replace the
removed std.time.nanoTimestamp() with std.Io.Clock.now(.real, io).
Update all callers in tests to pass std.testing.io.

Amp-Thread-ID: https://ampcode.com/threads/T-019c1945-d480-712c-b7cf-944f207f6048
Co-authored-by: Amp <amp@ampcode.com>
Update test code to use Zig 0.16's new Writer API:
- Replace std.io.fixedBufferStream(&buf) with std.Io.Writer.fixed(&buf)
- Replace fbs.writer() calls with direct &writer references
- Replace fbs.reset() with writer.end = 0
- Replace fbs.getWritten() with writer.buffered()

Affects fmtStrftime and gofmt tests.

Amp-Thread-ID: https://ampcode.com/threads/T-019c1948-1e3c-71c0-acbc-362fd1c33a22
Co-authored-by: Amp <amp@ampcode.com>
- Replace std.io.Reader with std.Io.Reader in TZInfo.parse
- Replace writeByteNTimes with splatByteAll
- Update local() call in Instant test to use new 3-arg signature
- Replace std.io.null_writer with std.Io.Writer.Discarding
- Replace ArrayList.writer() with std.Io.Writer.Allocating in tests
- Update loadTimeZone calls to pass std.testing.io and EnvConfig

Amp-Thread-ID: https://ampcode.com/threads/T-019c194a-2af5-75d1-8b83-8635b95d7d7e
Co-authored-by: Amp <amp@ampcode.com>
Replace deprecated std.fs file and directory operations with their
std.Io equivalents for Zig 0.16 compatibility:

- std.fs.cwd().openFile -> std.Io.Dir.cwd().openFile(io, ...)
- std.fs.openDirAbsolute -> std.Io.Dir.cwd().openDir(io, ...)
- std.fs.Dir -> std.Io.Dir
- f.close() -> f.close(io)
- dir.close() -> dir.close(io)
- dir.openFile(...) -> dir.openFile(io, ...)

Amp-Thread-ID: https://ampcode.com/threads/T-019c194f-494e-7058-9236-403b366f06ad
Co-authored-by: Amp <amp@ampcode.com>
…formatting

`timeFmt` supports both `gofmt` and `strftime`
@rockorager rockorager merged commit 2a79678 into main Apr 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants