Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scm: Update build to compile with latest master #1892

Merged
merged 4 commits into from
May 15, 2024
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
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