Skip to content

oxlint/js/lsp: rebuilding linter panics on register_plugin offset #18802

@Sysix

Description

@Sysix

When oxlint --lsp itself restarts the internal linter because of a configuration change, the server will panic.
Entry point:

builder.shutdown(root_uri);
let new_linter = builder.build_boxed(root_uri, new_options_json.clone());

This behavior was found when changing oxc.configPath in the oxc project.

The destroying and recreating of the plugin store is the problem.

2026-02-01 16:19:02.534 [info] 
thread 'tokio-runtime-worker' (119109) panicked at crates/oxc_linter/src/external_plugin_store.rs:107:9:
register_plugin: received offset 1, but rule table is currently 0 long
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

2026-02-01 16:19:02.543 [info] node:internal/modules/run_main:107
    triggerUncaughtException(
    ^

[Error: Panic in async function] { code: 'GenericFailure' }

Node.js v24.12.0

Expected

The Plugin store on the JS Side will be cleared too when destroying a workspace.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-editorArea - Editor and Language ServerA-linter-pluginsArea - Linter JS plugins

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions