taplo icon indicating copy to clipboard operation
taplo copied to clipboard

spurious taplo/didChangeSchemaAssociation messages

Open notpeter opened this issue 1 year ago • 0 comments

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:

  • https://github.com/zed-industries/zed/issues/20025

notpeter avatar Oct 31 '24 12:10 notpeter