Zig 0.15.2 Released

Fixed issues:

26 Likes

Was the release taken down?

I ask because, earlier this morning, I installed 0.15.2 using ZVM, but now I don’t see a section on your first link.

1 Like

No, it seems that the download index was replaced by the new master.
As a workaround for the missing links, use the 0.15.1 download links and change 0.15.1 to 0.15.2 in the links.

Gahh sorry. The release process is in the uncanny valley between fully automated and manually driven. I’ve been dragging my feet to finish automating it because it’s always tempting to work on actual zig rather than meta stuff. I’m so close to opening the std.Io PR.

Anyway fixed now.

28 Likes

Unless 0.15.2 was taken down deliberately, this got unfixed as 0.15.2 is no longer on the website.

It’s waiting on a successful tarball CI run, should be fixed by tomorrow.

8 Likes

I had claude generate release notes from the “git diff” between both versions: https://claude.ai/share/ec1ccc61-1882-408f-a163-3b407e62ce09

Zig 0.15.2 Release Notes

Bug Fixes

Compiler

  • InternPool: Fixed string storage architecture to properly separate string offsets from string bytes, resolving memory corruption issues
  • Type System:
    • Fixed union layout calculation for fields without runtime bits
    • Fixed @fieldParentPtr to work correctly with union fields
    • Corrected C type alignment and preferred alignment for m68k architecture
  • Sema:
    • Fixed reference tracking for coerced function bodies
    • Improved panic function reference handling
    • Fixed comptime @enumFromInt with signed arithmetic
  • Error Handling: Fixed resolving inferred error sets to prevent analysis cycles

Standard Library

  • I/O System:
    • Major fixes to Reader implementation:
      • Fixed takeDelimiter to correctly handle delimiters and end-of-stream
      • Fixed peekDelimiterInclusive and peekDelimiterExclusive with proper boundary handling
      • Corrected readVec position tracking
    • Fixed Limited reader to properly signal end-of-stream when hitting limit
    • Fixed Writer.sendFileReading to handle short reads correctly
    • Fixed Allocating writer’s sendFile implementation
  • Networking: Fixed DNS hosts file parsing to handle end-of-stream correctly
  • Process:
    • Fixed totalSystemMemory() overflow on 32-bit systems
    • Added support for macOS/Darwin family platforms
    • Made env_map parameter required where environment access is unavailable
  • Memory: Updated Allocator documentation for better clarity on allocation strategies

Code Generation

  • x86_64:
    • Fixed numerous SIMD instruction code generation issues
    • Corrected packed integer operations (saturating add/subtract)
    • Fixed vector element access and type conversions
    • Improved inline assembly constraint handling
    • Fixed register allocation and clobbering in complex operations
  • AArch64:
    • Fixed element pointer calculations with different operations
    • Corrected struct parameter handling through memory
    • Improved value loading and register allocation
  • PowerPC/PowerPC64:
    • Fixed syscall implementations to properly handle register clobbers
    • Corrected restore_rt implementation

Linker

  • ELF:
    • Fixed linksection support to properly handle custom sections
    • Improved section symbol creation and flags
    • Added support for special sections (.init_array, .fini_array, etc.)
  • COFF: Fixed import library path resolution for emit_implib
  • General: Improved LazyPath.dupe to correctly duplicate dependency paths

Build System

  • Compilation:
    • Fixed args file handling to prevent race conditions in concurrent builds
    • Improved code model flag handling in compilation
    • Deduplicated rpath entries
  • translate-c: Fixed handling of atomic operations on FreeBSD ARM targets
  • Dependencies: Fixed lazy dependency promotion to eager when explicitly requested

Libraries

  • libc++: Updated configuration for libc++ 20 compatibility, including proper macro definitions
  • musl: Added LoongArch64 soft-float support

Testing & Tooling

  • RISC-V: Removed CI support (hardware availability issues)
  • Stack Traces: Various fixes for BSD platforms
  • Documentation:
    • Improved language reference formatting
    • Fixed example code issues
    • Corrected error messages

Platform Support

  • Added DragonFly BSD detection in bootstrap
  • Improved FreeBSD compatibility across various subsystems
  • Enhanced macOS/Darwin family support
  • Fixed various BSD-specific issues in self-hosted backend

Documentation

  • Updated @fieldParentPtr documentation to clarify union support
  • Improved allocator selection guide
  • Fixed various typos and formatting issues
  • Corrected inline assembly examples

Other Changes

  • Improved debug output formatting
  • Enhanced PIE (Position Independent Executable) support
  • Better error messages for missing dependencies
  • Various performance optimizations in the compiler

Note: This release focuses primarily on bug fixes and stability improvements. Users are encouraged to upgrade from 0.15.1 to benefit from these fixes, particularly the critical InternPool and I/O system corrections.

13 Likes

Uh, that’s really not something that ought to be automated. A point release should be overseen by humans. I would be more comfortable with a process where there’re one or two release candidates prior the actual release.

1 Like

Surely you can automate it to the point that a person(s) can review it and press a button to deploy.

2 Likes

This fix accidentally introduced a breaking change.

@mlugg said:

the function called takeDelimiter did not exist in 0.15.1; that behavior was in takeDelimiterExclusive, and iirc that was intentional at the time. i recall you discussing changes around these functions’ API contracts a few times at the start of this release cycle

@andrewrk said:

I agree it was a mistake, because I intended to only merge pure bug fixes with no behavior changes like this

Replace takeDelimiterExclusive() with takeDelimiter() when you upgrade to 0.15.2

7 Likes

How much can one person do? If all he does is review the CI log before giving the go ahead, then the release wouldn’t be any better tested than master. If a release candidate is pushed out prior to the actual release, maintainers of libraries and modules could use that window of time to bring their code up to date. These developers would run their own test cases, which might uncover issues missed by CI.