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

Helix always stucks for a specific operation of a specific file #11770

Closed
ndtoan96 opened this issue Sep 25, 2024 · 1 comment
Closed

Helix always stucks for a specific operation of a specific file #11770

ndtoan96 opened this issue Sep 25, 2024 · 1 comment
Labels
C-bug Category: This is a bug

Comments

@ndtoan96
Copy link

Summary

Helix always hangs when I add a new live above cargo build --release in this justfile.zip

Reproduction Steps

I tried this:

  1. hx justfile
  2. Place the cursor at the begining of line cargo build --release
  3. Press O

I expected this to happen: a newline is added above the current line

Instead, this happened: it hangs

Helix log

~/.cache/helix/helix.log
2024-09-25T07:44:30.240 globset [DEBUG] glob converted to regex: Glob { glob: "*/Dockerfile.*", re: "(?-u)^.*/Dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('D'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/dockerfile.*", re: "(?-u)^.*/dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('d'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/Containerfile.*", re: "(?-u)^.*/Containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('C'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/containerfile.*", re: "(?-u)^.*/containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/.*ignore", re: "(?-u)^.*/\\..*ignore$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), ZeroOrMore, Literal('i'), Literal('g'), Literal('n'), Literal('o'), Literal('r'), Literal('e')]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/BUILD.*", re: "(?-u)^.*/BUILD\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('B'), Literal('U'), Literal('I'), Literal('L'), Literal('D'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/.env.*", re: "(?-u)^.*/\\.env\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/.envrc.*", re: "(?-u)^.*/\\.envrc\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('r'), Literal('c'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/conf/*/*.{inc,conf}", re: "(?-u)^.*/conf/.*/.*\\.(?:conf|inc)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('f'), Literal('/'), ZeroOrMore, Literal('/'), ZeroOrMore, Literal('.'), Alternates([Tokens([Literal('c'), Literal('o'), Literal('n'), Literal('f')]), Tokens([Literal('i'), Literal('n'), Literal('c')])])]) }
2024-09-25T07:44:30.241 globset [DEBUG] glob converted to regex: Glob { glob: "*/Jenkinsfile.*", re: "(?-u)^.*/Jenkinsfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: false, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('J'), Literal('e'), Literal('n'), Literal('k'), Literal('i'), Literal('n'), Literal('s'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-09-25T07:44:30.241 globset [DEBUG] built glob set; 1 literals, 0 basenames, 0 extensions, 0 prefixes, 129 suffixes, 9 required extensions, 10 regexes
2024-09-25T07:44:30.290 helix_vcs [DEBUG] Error {
    context: "failed to open git repo",
    source: Discover(
        NoGitRepository {
            path: "C:\\Users\\ASUS\\Downloads",
        },
    ),
}
2024-09-25T07:44:30.290 helix_vcs [DEBUG] failed to open diff base for C:\Users\ASUS\Downloads\justfile
2024-09-25T07:44:30.290 helix_vcs [DEBUG] Error {
    context: "failed to open git repo",
    source: Discover(
        NoGitRepository {
            path: "C:\\Users\\ASUS\\Downloads",
        },
    ),
}
2024-09-25T07:44:30.290 helix_vcs [DEBUG] failed to obtain current head name for C:\Users\ASUS\Downloads\justfile
2024-09-25T07:44:30.290 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2024-09-25T07:44:30.292 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 100ns)
2024-09-25T07:44:30.294 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:30.297 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:30.504 helix_term::application [DEBUG] received editor event: IdleTimer
2024-09-25T07:44:30.802 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.063 helix_term::application [DEBUG] received editor event: IdleTimer
2024-09-25T07:44:31.317 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.350 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.381 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.415 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.449 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.484 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.516 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.548 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.582 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.614 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.646 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.679 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:31.883 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-09-25T07:44:32.138 helix_term::application [DEBUG] received editor event: IdleTimer

Platform

Windows

Terminal Emulator

Windows Terminal

Installation Method

Release page

Helix Version

helix 24.7 (079f544)

@ndtoan96 ndtoan96 added the C-bug Category: This is a bug label Sep 25, 2024
@the-mikedavis
Copy link
Member

the-mikedavis commented Sep 25, 2024

I can reproduce on 24.07 but not master. I believe this was fixed in #11306 where we switched to a new just tree-sitter grammar. The old scanner.cc was buggy and could lead to an infinite loop and hang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants