-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorzig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Milestone
Description
Here we collect zig lib dir from the user:
Lines 3769 to 3770 in 75d5a4b
| override_lib_dir = args[i]; | |
| try child_argv.appendSlice(&[_][]const u8{ arg, args[i] }); |
It is then used relative to the cwd in order to build the build runner. Next, it is passed to the build runner and then the build runner interprets the file path as being relative to build.zig.
It can't be both ways; it needs to be consistently one way.
This results in nonsense experiences such as this:
$ stage3/bin/zig build --zig-lib-dir ../lib
error: unable to open zig lib directory from 'zig-lib-dir' argument or env, '/home/andy/dev/lib': FileNotFound
$ stage3/bin/zig build --zig-lib-dir lib
error: unable to open zig lib directory from 'zig-lib-dir' argument: 'lib': FileNotFound
As a workaround until this issue is fixed an absolute path can be used:
$ stage3/bin/zig build --zig-lib-dir $(pwd)/../lib
(ok)
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorzig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management