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

use case: fetch lazy dependency when running a step #19914

Open
EzequielRamis opened this issue May 9, 2024 · 0 comments
Open

use case: fetch lazy dependency when running a step #19914

EzequielRamis opened this issue May 9, 2024 · 0 comments

Comments

@EzequielRamis
Copy link

I came across this user's problem with a "hacky" solution now that lazyDependency exists, but it would be nice to have something more elegant.

const test_step = b.step("test", "Run all unit tests");

var lazy_dep: ?*std.Build.Dependency = null;
var args = try std.process.args();
while (args.next()) |a| {
    if (std.mem.eql(u8, a, "test")) lazy_dep = b.lazyDependency("foo", .{});
}
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

No branches or pull requests

1 participant