Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The console cannot display eprintln() content, but the terminal can display it normally #8

Open
tzSharing opened this issue Jul 29, 2024 · 2 comments

Comments

@tzSharing
Copy link

tzSharing commented Jul 29, 2024

Describe the bug

fn main(){
	println('111')
	eprintln('222')
	println('333')
}

Expected Behavior

Normal display

Current Behavior

run console:

run console

cmd terminal:

cmd console

Environment details (v doctor output)

V full version: V 0.4.7 fd7986c.8af19ec
OS: windows, Microsoft Windows 10 רҵ v19045 64 λ
Processor: 4 cpus, 64bit, little endian,

getwd: C:\Users\TZ
vexe: D:\v\v.exe
vexe mtime: 2024-07-27 17:14:26

vroot: OK, value: D:\v
VMODULES: OK, value: C:\Users\TZ\.vmodules
VTMP: OK, value: C:\Users\TZ\AppData\Local\Temp\v_0

Git version: git version 2.45.1.windows.1
Git vroot status: 0.4.7-5-g8af19ece (13 commit(s) behind V master)
.git/config present: true

CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.

thirdparty/tcc status: thirdparty-windows-amd64 b425ac82

IDE Type (IDEA Community/Ultimate, GoLand, CLion, etc.)

IntelliJ IDEA 2024.1.4 (Community Edition)
Build #IC-241.18034.62, built on June 21, 2024
Runtime version: 17.0.11+1-b1207.24 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
Kotlin 插件: K2 Kotlin 模式(Alpha)
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.intellij.zh (241.271)
  io.vlang (0.0.1-beta.5)
Kotlin: 241.18034.62-IJ

Plugin Version

0.0.1-beta.5

@Krotki
Copy link
Contributor

Krotki commented Aug 27, 2024

I noticed few different behaviours regarding terminal. Sometimes error is not printed at all, sometimes error is printed before anything else and sometimes (very rarely) printed as it should.

I think it is related to asynchronous behavior of command line handler in vlang, but I do not have a clue yet how to fix it.

@crackedmind
Copy link
Member

crackedmind commented Sep 8, 2024

simple C.fprintf(C.stderr, c'test') didn't work also

but, after disabling "emulate terminal" option in run configuration, output is expected
but eprintln/panic in err handler still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants