Skip to content

Conversation

@griffio
Copy link
Contributor

@griffio griffio commented Dec 17, 2025

Fixes sqldelight/sqldelight#6064

➿ Prevent infinite loop when tokenType is null

ModuleParserUtil.custom_module_argument is a special hand written parser rule that creates a single token from multiple arguments and takes tokens until the next COMMA tokenType is reached.

This causes the Idea plugin to hang Ide process if tokenType is null.

jstack was used to identify 🌶️ hot thread in ModuleParserUtil while loop

Tested with local plugin build as hang only occurs with live IDE usage.
e.g

CREATE VIRTUAL TABLE dictionary_fts USING fts5(
    text,
        <--- type anything here and the IDE hangs
    content='',
    tokenize="unicode61 remove_diacritics 2"
);

  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

Prevent infinite loop when tokenType is null

This causes the Idea plugin to hang Ide process
@griffio griffio force-pushed the fix-virtual-table-module-parser branch from 84f44af to 00f5cae Compare December 17, 2025 10:56
@JakeWharton JakeWharton merged commit ceee8f2 into sqldelight:master Dec 17, 2025
1 check passed
@griffio griffio deleted the fix-virtual-table-module-parser branch December 17, 2025 13:53
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

Successfully merging this pull request may close these issues.

When I try to edit an FTS5 virtual table, IntelliJ crashes

2 participants