#'../' in @import?

1 messages · Page 1 of 1 (latest)

glad dagger
#

Hi :D

I'm confused:

~/source/zig/lib/std/zig 0 % zig test tokenizer.zig 
tokenizer.zig:1:21: error: unable to load '/std.zig': FileNotFound
const std = @import("../std.zig");
                    ^~~~~~~~~~~~
~/source/zig/lib/std/zig 1 % ll ../std.zig 
11Ki prokop ../std.zig
~/source/zig/lib/std/zig 0 % 

Is this a bug or am i doing something wrong?

#

i'm on 0.12.0-dev.252+5dc2db805 btw

hoary veldt
#

I think you want to use const std = @import("std");

glad dagger
#

well this is actually a file from the stdlib that has this include line in it

#

so I would assume that it is written correctly and I am just using it wrong

safe stream
#

one thing you might be able to do if the tests you want to run share a similar word. something like this:

~/source/zig/
$ zig build test-std -Dtest-filter="tokenizer" -Dskip-non-native -Dskip-release