tools: support module no_main based examples in v should-compile-all

This commit is contained in:
Delyan Angelov 2025-02-22 14:22:22 +02:00
parent 7d60ce0061
commit 9062d76bb4
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED

View file

@ -65,7 +65,7 @@ fn main() {
backend_options = '-b js'
}
lines := os.read_lines(example)!#[..50].filter(it.starts_with('module'))
if lines.len > 0 && lines[0] != 'module main' {
if lines.len > 0 && lines[0] !in ['module main', 'module no_main'] {
log.info('>>> skipping non main module file: ${example}')
skipped_files << example
continue