Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions vlib/v/util/module.v
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@ pub fn qualify_module(pref_ &pref.Preferences, mod string, file_path string) str
return mod
}
clean_file_path := file_path.all_before_last(os.path_separator)
// relative module (relative to working directory)
// TODO: find most stable solution & test with -usecache
//
// TODO: 2022-01-30: Using os.getwd() here does not seem right *at all* imho.
// TODO: 2022-01-30: That makes lookup dependent on fragile environment factors.
// TODO: 2022-01-30: The lookup should be relative to the folder, in which the current file is,
// TODO: 2022-01-30: *NOT* to the working folder of the compiler, which can change easily.
if clean_file_path.replace(os.getwd() + os.path_separator, '') == mod {
trace_qualify(@FN, mod, file_path, 'module_res 2', mod, 'clean_file_path - getwd == mod, clean_file_path: ${clean_file_path}')
return mod
}
if m1 := mod_path_to_full_name(pref_, mod, clean_file_path) {
trace_qualify(@FN, mod, file_path, 'module_res 3', m1, 'm1 == f(${clean_file_path})')
// > qualify_module: net | file_path: /v/cleanv/vlib/net/util.v | => module_res 3: net ; m1 == f(/v/cleanv/vlib/net)
Expand Down
Loading