-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
The string ?(
bogs down REPL input to a crawl
#56272
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
Comments
This is very funny. I think we're compiling stuff related to running REPL help mode for tab completion eroniously or something weird like that. |
This doesn't happen with |
Profile from while it's doing it. Looks like completion is finding a massive list of
|
Probably julia/stdlib/REPL/src/REPLCompletions.jl Line 1231 in f976541
|
I'm not great at regexes, but chatgpt made this which works for these test cases julia> regex = r"^(?!\")(?:\w+\.|)\?\((.*)$"
r"^(?!\")(?:\w+\.|)\?\((.*)$"
julia> match(regex, "?(")
RegexMatch("?(", 1="")
julia> match(regex, "\"?(\"")
julia> match(regex, "\"\"\"?(\"\"\"") The current one matches all of them julia> regex = r"(\w+\.|)\?\((.*)$"
r"(\w+\.|)\?\((.*)$"
julia> match(regex, "?(")
RegexMatch("?(", 1="", 2="")
julia> match(regex, "\"?(\"")
RegexMatch("?(\"", 1="", 2="\"")
julia> match(regex, "\"\"\"?(\"\"\"")
RegexMatch("?(\"\"\"", 1="", 2="\"\"\"") |
What it's done here is explicitly exclude (through the negative lookahead |
This is a funny one. Having the character combination of
?(
anywhere in a REPL prompt — including in a string — makes input devastatingly slow. This is new in Julia v1.11. I'm on macOS 15.0.1 with an M1 processor and iTerm2:Screen.Recording.2024-10-21.at.10.49.03.AM.mov
The text was updated successfully, but these errors were encountered: