Skip to content

Commit

Permalink
scm: Update build to compile with latest master (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
mochalins authored May 15, 2024
1 parent bb19bee commit ab928b5
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const zls_version = std.SemanticVersion{ .major = 0, .minor = 13, .patch = 0 };
const zls_version_is_tagged: bool = false;

/// Specify the minimum Zig version that is required to compile and test ZLS:
/// Rename Dir.writeFile2 -> Dir.writeFile and update all callsites
/// Run: add output directory arguments
///
/// Must match the `minimum_zig_version` in `build.zig.zon`.
const minimum_zig_version = "0.13.0-dev.68+b86c4bde6";
const minimum_zig_version = "0.13.0-dev.79+6bc0cef60";

/// Specify the minimum Zig version that is required to run ZLS:
/// Release 0.12.0
Expand Down Expand Up @@ -290,8 +290,8 @@ pub fn build(b: *Build) !void {
tests_run.has_side_effects = true;
src_tests_run.has_side_effects = true;

tests_run.argv.insertSlice(0, args) catch @panic("OOM");
src_tests_run.argv.insertSlice(0, args) catch @panic("OOM");
tests_run.argv.insertSlice(b.allocator, 0, args) catch @panic("OOM");
src_tests_run.argv.insertSlice(b.allocator, 0, args) catch @panic("OOM");

const merge_step = std.Build.Step.Run.create(b, "merge kcov");
merge_step.has_side_effects = true;
Expand Down
12 changes: 6 additions & 6 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// Must match the `zls_version` in `build.zig`
.version = "0.13.0-dev",
// Must match the `minimum_zig_version` in `build.zig`
.minimum_zig_version = "0.13.0-dev.68+b86c4bde6",
// whenever the dependencies are updated, run `zon2nix > deps.nix`
.minimum_zig_version = "0.13.0-dev.79+6bc0cef60",
// whenever the dependencies are updated, run `nix run github:acristoffers/zon2nix > deps.nix`
.dependencies = .{
.known_folders = .{
.url = "https://github.com/ziglibs/known-folders/archive/bf79988adcfce166f848e4b11e718c1966365329.tar.gz",
.hash = "12201314cffeb40c5e4e3da166217d2c74628c74486414aaf97422bcd2279915b9fd",
.url = "https://github.com/ziglibs/known-folders/archive/0ad514dcfb7525e32ae349b9acc0a53976f3a9fa.tar.gz",
.hash = "12209cde192558f8b3dc098ac2330fc2a14fdd211c5433afd33085af75caa9183147",
},
.diffz = .{
.url = "https://github.com/ziglibs/diffz/archive/e10bf15962e45affb3fcd7d9a950977a69c901b3.tar.gz",
.hash = "12200d71e4b7029ea56a429e24260c6c0e85a3069b0d4ba85eace21a0fd75910aa64",
.url = "https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz",
.hash = "1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d",
},
},
.paths = .{""},
Expand Down
12 changes: 6 additions & 6 deletions deps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

linkFarm "zig-packages" [
{
name = "12200d71e4b7029ea56a429e24260c6c0e85a3069b0d4ba85eace21a0fd75910aa64";
name = "1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d";
path = fetchzip {
url = "https://github.com/ziglibs/diffz/archive/e10bf15962e45affb3fcd7d9a950977a69c901b3.tar.gz";
hash = "sha256-yVFPVn4jGfcoE2V4xdTqdThYPutshL6U4feDzetWgFw=";
url = "https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz";
hash = "sha256-5/3W0Xt9RjsvCb8Q4cdaM8dkJP7CdFro14JJLCuqASo=";
};
}
{
name = "12201314cffeb40c5e4e3da166217d2c74628c74486414aaf97422bcd2279915b9fd";
name = "12209cde192558f8b3dc098ac2330fc2a14fdd211c5433afd33085af75caa9183147";
path = fetchzip {
url = "https://github.com/ziglibs/known-folders/archive/bf79988adcfce166f848e4b11e718c1966365329.tar.gz";
hash = "sha256-Q7eMdyScqj8qEiAHg1BnGRTsWSQOKWWTc6hUYHNlgGg=";
url = "https://github.com/ziglibs/known-folders/archive/0ad514dcfb7525e32ae349b9acc0a53976f3a9fa.tar.gz";
hash = "sha256-X+XkFj56MkYxxN9LUisjnkfCxUfnbkzBWHy9pwg5M+g=";
};
}
]
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions src/build_runner/0.12.0.zig
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,18 @@ fn extractBuildInformation(

const helper = struct {
fn addStepDependencies(set: *std.AutoArrayHashMap(*Step, void), lazy_path: std.Build.LazyPath) !void {
switch (lazy_path) {
.src_path, .path, .cwd_relative, .dependency => {},
.generated => |gen| try set.put(gen.step, {}),
.generated_dirname => |gen| try set.put(gen.generated.step, {}),
const lazy_path_updated_version = comptime std.SemanticVersion.parse("0.13.0-dev.79+6bc0cef60") catch unreachable;
if (comptime builtin.zig_version.order(lazy_path_updated_version) == .lt) {
switch (lazy_path) {
.src_path, .path, .cwd_relative, .dependency => {},
.generated => |gen| try set.put(gen.step, {}),
.generated_dirname => |gen| try set.put(gen.generated.step, {}),
}
} else {
switch (lazy_path) {
.src_path, .cwd_relative, .dependency => {},
.generated => |gen| try set.put(gen.file.step, {}),
}
}
}
};
Expand Down

0 comments on commit ab928b5

Please sign in to comment.