about things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add 0.16 migration discoveries from typeahead ingester port

readLinkAbsolute returns usize, makePath → createDirPath,
ArrayList .{} → .empty, Server.deinit, Stream.Reader.interface,
File.readStreaming scatter/gather API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+67
+67
languages/ziglang/0.16/migration.md
··· 346 346 347 347 use `random()` for non-security purposes (shuffling, jitter). use `randomSecure()` for cryptographic keys, nonces, tokens. 348 348 349 + ### std.fs.readLinkAbsolute 350 + 351 + returns `usize` (length) instead of `[]const u8`: 352 + 353 + ```zig 354 + // 0.15 355 + if (std.fs.readLinkAbsolute("/proc/self/exe", &buf)) |path| { ... } 356 + 357 + // 0.16 358 + if (std.Io.Dir.readLinkAbsolute(io, "/proc/self/exe", &buf)) |len| { 359 + const path = buf[0..len]; 360 + ... 361 + } 362 + ``` 363 + 364 + ### std.fs.cwd().makePath() 365 + 366 + ```zig 367 + // 0.15 368 + try std.fs.cwd().makePath(dir); 369 + 370 + // 0.16 371 + try std.Io.Dir.createDirPath(.cwd(), io, dir); 372 + ``` 373 + 374 + ### ArrayListUnmanaged init 375 + 376 + ```zig 377 + // 0.15 378 + var list: std.ArrayList(T) = .{}; 379 + 380 + // 0.16 381 + var list: std.ArrayList(T) = .empty; 382 + ``` 383 + 384 + ### Server.close → Server.deinit 385 + 386 + ```zig 387 + // 0.15 388 + server.close(); 389 + 390 + // 0.16 391 + server.deinit(io); 392 + ``` 393 + 394 + ### Stream.Reader → Io.Reader for http.Server 395 + 396 + `stream.reader()` returns `Stream.Reader`, but `http.Server.init` wants `*Io.Reader`. access the `.interface` field: 397 + 398 + ```zig 399 + var reader = stream.reader(io, &read_buf); 400 + var writer = stream.writer(io, &write_buf); 401 + var srv = std.http.Server.init(&reader.interface, &writer.interface); 402 + ``` 403 + 404 + ### File.read → File.readStreaming 405 + 406 + `File.read()` removed. `readStreaming` takes `[]const []u8` (scatter/gather): 407 + 408 + ```zig 409 + // 0.15 410 + const n = f.read(&buf); 411 + 412 + // 0.16 413 + const n = f.readStreaming(io, &.{&buf}); 414 + ``` 415 + 349 416 ## file I/O 350 417 351 418 file ops now take `io: Io` parameter. get default io from `std.Options.debug_io`: