Skip to content

Zig 0.16.0 compatibility - std.fs.cwd() and related APIs removed #14

@slavakurilyak

Description

@slavakurilyak

Gremlin fails to build with Zig 0.16.0-dev due to breaking changes in the standard library's filesystem APIs.

Affected APIs:

  • std.fs.cwd()std.Io.Dir.cwd() (requires Io instance)
  • std.fs.openFileAbsolute()std.Io.Dir.openFileAbsolute(io, ...)
  • std.fs.realpath()std.Io.Dir.realPath(io, ...)
  • std.fs.realpathAlloc()std.Io.Dir.realPathFileAlloc(dir, io, ...)

Affected Files:

  • src/parser/entries/buffer.zig
  • src/parser/parser.zig
  • src/parser/fs/paths.zig
  • step.zig

Migration Required:
All file operations now require an Io instance parameter. This requires threading an Io through function signatures or using b.graph.io in build contexts.

Zig Version:

  • Currently supports: 0.15.x
  • Fails on: 0.16.0-dev.2596+469bf6af0

See: https://ziglang.org/download/ (Zig 0.16.0 introduced event-driven I/O with std.Io)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions