Skip to content

Commit e889872

Browse files
committed
v2: fix vh in non-prod cleanc
1 parent 272bf4a commit e889872

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

vlib/v2/builder/parse.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ fn (mut b Builder) parse_files(files []string) []ast.File {
1313
skip_builtin := b.pref.skip_builtin
1414
mut use_core_headers := false
1515
if !skip_builtin {
16-
// -prod builds with a valid header cache can use lightweight .vh
17-
// summaries instead of fully parsing every core module source file.
18-
use_core_headers = b.pref.is_prod && b.can_use_cached_core_headers_for_parse()
16+
// When a valid header cache exists, use lightweight .vh summaries
17+
// instead of fully parsing every core module source file.
18+
use_core_headers = b.can_use_cached_core_headers_for_parse()
1919
b.used_vh_for_parse = use_core_headers
2020
if use_core_headers {
2121
core_files := b.core_cached_parse_paths()

vlib/v2/builder/parse_d_parallel.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ fn (mut b Builder) parse_files_parallel(files []string) []ast.File {
6565
}
6666
skip_builtin := b.pref.skip_builtin
6767
if !skip_builtin {
68-
// -prod builds with a valid header cache can use lightweight .vh
69-
// summaries instead of fully parsing every core module source file.
70-
use_core_headers2 := b.pref.is_prod && b.can_use_cached_core_headers_for_parse()
68+
// When a valid header cache exists, use lightweight .vh summaries
69+
// instead of fully parsing every core module source file.
70+
use_core_headers2 := b.can_use_cached_core_headers_for_parse()
7171
// Parse builtin and its dependencies
7272
// Mark them as parsed first to prevent re-parsing via imports
7373
for module_path in core_cached_module_paths {

0 commit comments

Comments
 (0)