Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const zls_version = std.SemanticVersion.parse(@import("build.zig.zon").version)
const minimum_build_zig_version = @import("build.zig.zon").minimum_zig_version;

/// Specify the minimum Zig version that is usable with ZLS:
/// build runner: refactor step evaluation logic
/// std: migrate getcwd to Io
///
/// A breaking change to the Zig Build System should be handled by updating ZLS's build runner (see src\build_runner)
const minimum_runtime_zig_version = "0.16.0-dev.2128+aebd84b52";
const minimum_runtime_zig_version = "0.16.0-dev.2365+377bb8f23";

const release_targets = [_]std.Target.Query{
.{ .cpu_arch = .aarch64, .os_tag = .linux },
Expand Down
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// nix flake update --commit-lock-file
// ```
// If you do not use Nix, a ZLS maintainer can take care of this.
.minimum_zig_version = "0.16.0-dev.2255+d417441f4",
.minimum_zig_version = "0.16.0-dev.2368+380ea6fb5",
// If you do not use Nix, a ZLS maintainer can take care of this.
// Whenever the dependencies are updated, run the following command:
// ```bash
Expand Down
2 changes: 1 addition & 1 deletion src/build_runner/build_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn main(init: process.Init.Minimal) !void {
.io = io,
.gpa = gpa,
.manifest_dir = try local_cache_directory.handle.createDirPathOpen(io, "h", .{}),
.cwd = try process.getCwdAlloc(single_threaded_arena.allocator()),
.cwd = try process.currentPathAlloc(io, single_threaded_arena.allocator()),
},
.zig_exe = zig_exe,
.environ_map = try init.environ.createMap(arena),
Expand Down
2 changes: 1 addition & 1 deletion src/configuration.zig
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ pub const Manager = struct {
if (std.fs.path.isAbsolute(zig_lib_dir)) {
config.zig_lib_path = try arena.dupe(u8, zig_lib_dir);
} else {
const cwd = std.process.getCwdAlloc(manager.allocator) catch |err| switch (err) {
const cwd = std.process.currentPathAlloc(io, manager.allocator) catch |err| switch (err) {
error.OutOfMemory => return error.OutOfMemory,
else => |e| {
log.err("failed to resolve current working directory: {}", .{e});
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis_check.zig
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn main(init: std.process.Init) Error!void {
std.log.err("expected argument after '--zig-lib-path'.", .{});
std.process.exit(1);
};
const cwd = std.process.getCwdAlloc(arena) catch |err| {
const cwd = std.process.currentPathAlloc(io, arena) catch |err| {
std.log.err("failed to get current working directory: {}", .{err});
std.process.exit(1);
};
Expand Down
2 changes: 1 addition & 1 deletion tests/build_runner_check.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn main(init: std.process.Init) !u8 {

if (args.len != 7) @panic("invalid arguments");

const cwd = try std.process.getCwdAlloc(gpa);
const cwd = try std.process.currentPathAlloc(io, gpa);
defer gpa.free(cwd);

const expected = std.Io.Dir.cwd().readFileAlloc(io, args[1], gpa, .limited(16 * 1024 * 1024)) catch |err|
Expand Down
2 changes: 1 addition & 1 deletion tests/context.zig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub const Context = struct {
if (config.global_cache_path) |global_cache_path| allocator.free(global_cache_path);
};
if (builtin.target.os.tag != .wasi) {
const cwd = try std.process.getCwdAlloc(allocator);
const cwd = try std.process.currentPathAlloc(io, allocator);
defer allocator.free(cwd);
config.zig_exe_path = try std.fs.path.resolve(allocator, &.{ cwd, test_options.zig_exe_path });
config.zig_lib_path = try std.fs.path.resolve(allocator, &.{ cwd, test_options.zig_lib_path });
Expand Down
2 changes: 1 addition & 1 deletion tests/lifecycle.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test "LSP lifecycle" {
const arena = arena_allocator.allocator();

if (builtin.target.os.tag != .wasi) {
const cwd = try std.process.getCwdAlloc(allocator);
const cwd = try std.process.currentPathAlloc(io, allocator);
defer allocator.free(cwd);

try config_manager.setConfiguration(.frontend, &.{
Expand Down