cc(): print compilation error correctly
parent
fe2d2bd2a3
commit
8e1c31e860
|
@ -890,12 +890,13 @@ mut args := ''
|
||||||
println(cmd)
|
println(cmd)
|
||||||
}
|
}
|
||||||
ticks := time.ticks()
|
ticks := time.ticks()
|
||||||
_ := os.exec(cmd) or {
|
res := os.exec(cmd) or { panic(err) }
|
||||||
|
if res.exit_code != 0 {
|
||||||
if v.pref.is_debug {
|
if v.pref.is_debug {
|
||||||
println(err)
|
println(res.output)
|
||||||
} else {
|
} else {
|
||||||
print(err.limit(200))
|
print(res.output.limit(200))
|
||||||
if err.len > 200 {
|
if res.output.len > 200 {
|
||||||
println('...\n(Use `v -debug` to print the entire error message)\n')
|
println('...\n(Use `v -debug` to print the entire error message)\n')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,7 +176,7 @@ fn (p mut Parser) parse() {
|
||||||
}
|
}
|
||||||
p.fgenln('\n')
|
p.fgenln('\n')
|
||||||
p.builtin_mod = p.mod == 'builtin'
|
p.builtin_mod = p.mod == 'builtin'
|
||||||
p.can_chash = p.mod == 'freetype' || p.mod=='ui' // TODO tmp remove
|
p.can_chash = p.mod == 'freetype' || p.mod=='ui' || p.file_path.contains('/focus.v') // TODO tmp remove
|
||||||
// Import pass - the first and the smallest pass that only analyzes imports
|
// Import pass - the first and the smallest pass that only analyzes imports
|
||||||
// fully qualify the module name, eg base64 to encoding.base64
|
// fully qualify the module name, eg base64 to encoding.base64
|
||||||
fq_mod := p.table.qualify_module(p.mod, p.file_path)
|
fq_mod := p.table.qualify_module(p.mod, p.file_path)
|
||||||
|
|
Loading…
Reference in New Issue