Skip to content

Commit

Permalink
fix: Put buzz_path items first in search paths
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Jan 17, 2024
1 parent fd4b5eb commit 62d1b8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn get_buzz_prefix(b: *Build) []const u8 {
pub fn build(b: *Build) !void {
// Check minimum zig version
const current_zig = builtin.zig_version;
const min_zig = std.SemanticVersion.parse("0.12.0-dev.2208+4debd4338") catch return;
const min_zig = std.SemanticVersion.parse("0.12.0-dev.2250+7116b0221") catch return;
if (current_zig.order(min_zig).compare(.lt)) {
@panic(b.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig }));
}
Expand Down
12 changes: 6 additions & 6 deletions src/Parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ const ParseRule = struct {
};

const search_paths = [_][]const u8{
"$/?.!",
"$/?/main.!",
"$/?/src/?.!",
"$/?/src/main.!",
"./?.!",
"./?/main.!",
"./?/src/main.!",
Expand All @@ -217,21 +221,17 @@ const search_paths = [_][]const u8{
"/usr/local/share/buzz/?/main.!",
"/usr/local/share/buzz/?/src/main.!",
"/usr/local/share/buzz/?/src/?.!",
"$/?.!",
"$/?/main.!",
"$/?/src/?.!",
"$/?/src/main.!",
};

const lib_search_paths = [_][]const u8{
"$/lib?.!",
"$/?/src/lib?.!",
"./lib?.!",
"./?/src/lib?.!",
"/usr/share/buzz/lib?.!",
"/usr/share/buzz/?/src/lib?.!",
"/usr/share/local/buzz/lib?.!",
"/usr/share/local/buzz/?/src/lib?.!",
"$/lib?.!",
"$/?/src/lib?.!",
};

const zdef_search_paths = [_][]const u8{
Expand Down

0 comments on commit 62d1b8e

Please sign in to comment.