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

Maybe infinite loop when compiling a stupid program #23574

Closed
lpintes opened this issue Jan 25, 2025 · 7 comments
Closed

Maybe infinite loop when compiling a stupid program #23574

lpintes opened this issue Jan 25, 2025 · 7 comments

Comments

@lpintes
Copy link

lpintes commented Jan 25, 2025

I wanted to know which encoding is acceptable for source code files. So I wrote this stupid program, encoded as windows-1250.
Then I ran "v run ." and the compilation probably never finishes.

fn main() {
        println('�����')
}

fn f(i int) !int {
        if i < 3 {
                return i
        }
        return error('bad number')
}

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Copy link

Connected to Huly®: V_0.6-22000

@lyqio
Copy link

lyqio commented Jan 25, 2025

wait longer

@spytheman
Copy link
Member

I can not reproduce it:

Image

Please use v bug file.v to provide a more complete description, including the exact source that causes the problem for you.

@spytheman
Copy link
Member

V's sources are required to be encoded using UTF8 btw.

@lpintes
Copy link
Author

lpintes commented Jan 25, 2025

Hmm interesting. Instead of 'Hello world', I tried to print 'áéíóú'.
When I encode the file in UTF-8, everything is ok. It compiles very fast. But when the file is encoded in windows-1250, the compilation never finishes on my system.

@spytheman
Copy link
Member

Use v bug file.v please.

@lpintes
Copy link
Author

lpintes commented Jan 27, 2025

I don't know what exactly happened in my case.
I am updating the code regularly and it works now, sorry.

@lpintes lpintes closed this as completed Jan 27, 2025
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