Fix build runner (#1029)
* Fix build runner * Add zls module, bump version * Fix path from root issue in modules (thanks daremakemyday from Twitch :)) * Libraryify * remove build_runner backward compatibility * Remove some `= undefined`s in Server.zig Makes library use less dangerous * Consistent mem model + custom build runner possible * Add build runner utils for third-party tooling * Make logs removable in libraries with zls_ prefix * Fix build runner CI * Expose references * Use new addModule
This commit is contained in:
@@ -7,7 +7,7 @@ const zls_version = std.builtin.Version{ .major = 0, .minor = 11, .patch = 0 };
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
comptime {
|
||||
const current_zig = builtin.zig_version;
|
||||
const min_zig = std.SemanticVersion.parse("0.11.0-dev.1817+f6c934677") catch return; // package manager hashes made consistent on windows
|
||||
const min_zig = std.SemanticVersion.parse("0.11.0-dev.1836+28364166e") catch return; // package manager stuff + --build-runner + zls as a library
|
||||
if (current_zig.order(min_zig) == .lt) {
|
||||
@compileError(std.fmt.comptimePrint("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig }));
|
||||
}
|
||||
@@ -160,7 +160,7 @@ pub fn build(b: *std.build.Builder) !void {
|
||||
|
||||
const build_options_module = exe_options.createModule();
|
||||
|
||||
const zls_module = b.createModule(.{
|
||||
const zls_module = b.addModule("zls", .{
|
||||
.source_file = .{ .path = "src/zls.zig" },
|
||||
.dependencies = &.{
|
||||
.{ .name = "known-folders", .module = known_folders_module },
|
||||
|
||||
Reference in New Issue
Block a user