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

Pass --zig-lib-dir config option to the build runner #2145

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

GalaxyShard
Copy link
Contributor

Without this patch, the build runner fails to run if build scripts depend on a modified zig library directory even if the config file specifies a different library directory, for example if the project depends on patches to the Zig build system.

I tested this change on a project of mine with a blank config file and with a config file that sets zig_lib_path; it seems to work correctly in both scenarios.

Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a check here:

zls/src/DocumentStore.zig

Lines 814 to 816 in 61c7147

if (self.config.zig_exe_path == null) return;
if (self.config.build_runner_path == null) return;
if (self.config.global_cache_path == null) return;

and an assertion here:

zls/src/DocumentStore.zig

Lines 1039 to 1041 in 61c7147

std.debug.assert(self.config.zig_exe_path != null);
std.debug.assert(self.config.build_runner_path != null);
std.debug.assert(self.config.global_cache_path != null);

Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Techatrix Techatrix merged commit f7888fc into zigtools:master Jan 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants