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

FunctionClauseError in Code.Fragment.container_cursor_to_quoted on 1.18 #14139

Open
lukaszsamson opened this issue Jan 2, 2025 · 0 comments
Open

Comments

@lukaszsamson
Copy link
Contributor

Elixir and Erlang/OTP versions

1.18.0 and 1.18.1

Operating system

any

Current behavior

I noticed a lot of reported crashes in ElixirLS on 1.18. All the calls to container_cursor_to_quoted on 1.18 are with trailing_fragment option. The error is not present on earlier elixir versions

    ** (FunctionClauseError) no function clause matching in :elixir_tokenizer.prune_tokens_3
        (elixir 1.18.1) <REDACTED: user-file-path>:1778: :elixir_tokenizer.prune_tokens([], [:"}"], [])
        (elixir 1.18.1) <REDACTED: user-file-path>:1765: :elixir_tokenizer.add_cursor_5
        (elixir 1.18.1) <REDACTED: user-file-path>:142: :elixir_tokenizer.tokenize_5
        (elixir 1.18.1) <REDACTED: user-file-path>:1172: Code.Fragment.container_cursor_to_quoted_2
    ** (FunctionClauseError) no function clause matching in :elixir_tokenizer.prune_tokens_3
        (elixir 1.18.1) <REDACTED: user-file-path>:1778: :elixir_tokenizer.prune_tokens([], [:")"], [{:"(", {401, 49, nil}, 12}])
        (elixir 1.18.1) <REDACTED: user-file-path>:1765: :elixir_tokenizer.add_cursor_5
        (elixir 1.18.1) <REDACTED: user-file-path>:142: :elixir_tokenizer.tokenize_5
        (elixir 1.18.1) <REDACTED: user-file-path>:1172: Code.Fragment.container_cursor_to_quoted_2
    ** (FunctionClauseError) no function clause matching in :elixir_tokenizer.prune_tokens_3
        (elixir 1.18.1) <REDACTED: user-file-path>:1778: :elixir_tokenizer.prune_tokens([], [:")"], [])
        (elixir 1.18.1) <REDACTED: user-file-path>:1765: :elixir_tokenizer.add_cursor_5
        (elixir 1.18.1) <REDACTED: user-file-path>:142: :elixir_tokenizer.tokenize_5
        (elixir 1.18.1) <REDACTED: user-file-path>:1172: Code.Fragment.container_cursor_to_quoted_2
    ** (FunctionClauseError) no function clause matching in :elixir_tokenizer.prune_tokens_3
        (elixir 1.18.1) <REDACTED: user-file-path>:1778: :elixir_tokenizer.prune_tokens([], [:")", :"}"], [])
        (elixir 1.18.1) <REDACTED: user-file-path>:1765: :elixir_tokenizer.add_cursor_5
        (elixir 1.18.1) <REDACTED: user-file-path>:142: :elixir_tokenizer.tokenize_5
        (elixir 1.18.1) <REDACTED: user-file-path>:1172: Code.Fragment.container_cursor_to_quoted_2

Expected behavior

No crash

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

No branches or pull requests

1 participant