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

spurious taplo/didChangeSchemaAssociation messages #692

Open
notpeter opened this issue Oct 31, 2024 · 0 comments
Open

spurious taplo/didChangeSchemaAssociation messages #692

notpeter opened this issue Oct 31, 2024 · 0 comments

Comments

@notpeter
Copy link

notpeter commented Oct 31, 2024

I used Taplo via the Zed TOML extension.

Recently I've noticed that when I have multiple open TOML files, opening a new file triggers taplo/didChangeSchemaAssociation events on all the existing files I have open. They look like this:

2024-10-31T08:41:20.755921-04:00 [INFO] Language server with id 8 sent unhandled notification taplo/didChangeSchemaAssociation:
{
  "documentUri": "file:///Users/peter/zcode/zed/docs/book.toml",
  "schemaUri": null,
  "meta": null
}
2024-10-31T08:41:20.756075-04:00 [INFO] Language server with id 8 sent unhandled notification taplo/didChangeSchemaAssociation:
{
  "documentUri": "file:///Users/peter/zcode/zed/crates/assistant/Cargo.toml",
  "schemaUri": "https://json.schemastore.org/cargo.json",
  "meta": {
    "name": "Cargo Manifest",
    "description": "Manifest for Cargo, the Rust package manager and build tool",
    "source": "catalog",
    "catalog_url": "https://www.schemastore.org/api/json/catalog.json"
  }
}

For example:

  1. Open a.toml
  2. Open b.toml (get taplo/didChangeSchemaAssociation for a.toml)
  3. Open c.toml (get taplo/didChangeSchemaAssociation for a.toml, b.toml)
  4. Open d.toml (get taplo/didChangeSchemaAssociation for a.toml, b.toml, c.toml)
    etc

It seems harmless, but the fact that it scales with the number of open TOML files is especially annoying.

Also, it's wrong? taplo "didn't" change the schema association.

Associated Zed issue:

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

No branches or pull requests

1 participant