Skip to content

Commit 1963632

Browse files
authored
v.builder: fix .vsh mode doing an implicit import os, now only for .vsh file itself (fix issue spotted in #25736) (#25745)
1 parent 48376e4 commit 1963632

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

vlib/v/builder/builder.v

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,7 @@ pub fn (b &Builder) import_graph() &depgraph.DepGraph {
334334
if b.pref.backend == .c {
335335
// TODO: JavaScript backend doesn't handle os for now
336336
// os import libraries so we exclude anything which could cause a loop
337-
// git grep import vlib/os | cut -f2 -d: | cut -f2 -d" " | sort -u
338-
// dl, os, os.cmdline, os.filelock, os.notify, strings, strings.textscanner, term.termios, time
339-
if b.pref.is_vsh
340-
&& p.mod.name !in ['os', 'dl', 'strings.textscanner', 'term.termios'] {
337+
if p.path.ends_with('.vsh') {
341338
deps << 'os'
342339
}
343340
}

0 commit comments

Comments
 (0)