Description
When two [[lsp_servers]] entries resolve to the same ServerId (e.g. both share language_id = "rust" and neither sets a distinguishing name), mcpls correctly hard-fails at startup per the #228 per-tool-routing design. However the error message names both conflicting entries only by their (identical) ServerId, which is unhelpful when that's exactly the thing they collided on.
Reproduction Steps
- Create a config with two
[[lsp_servers]] entries, both language_id = "rust", neither with a name:
[workspace]
roots = ["/path/to/rust/project"]
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
file_patterns = ["**/*.rs"]
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
args = ["--dummy-second-instance"]
file_patterns = ["**/*.rs"]
- Run
mcpls --config <that file>
- Observe the startup error.
Expected Behavior
Error message should let the user tell the two conflicting [[lsp_servers]] entries apart, e.g. by TOML array index, command, or args — something beyond the shared ServerId string that caused the conflict in the first place.
Actual Behavior
Error: server error
Caused by:
invalid configuration: duplicate server id 'rust' in this workspace (used by both the 'rust' and 'rust' language entries); add a unique `name` to each `[[lsp_servers]]` entry
Both halves of "used by both the 'rust' and 'rust' language entries" are identical, giving no way to identify which two of N configured entries are the actual conflict when a config has more than two [[lsp_servers]] entries for different languages.
Environment
Logs / Evidence
Reproduced live against a fresh build of the current main branch; see reproduction steps above for the exact config and resulting error text.
Description
When two
[[lsp_servers]]entries resolve to the sameServerId(e.g. both sharelanguage_id = "rust"and neither sets a distinguishingname), mcpls correctly hard-fails at startup per the #228 per-tool-routing design. However the error message names both conflicting entries only by their (identical)ServerId, which is unhelpful when that's exactly the thing they collided on.Reproduction Steps
[[lsp_servers]]entries, bothlanguage_id = "rust", neither with aname:mcpls --config <that file>Expected Behavior
Error message should let the user tell the two conflicting
[[lsp_servers]]entries apart, e.g. by TOML array index,command, orargs— something beyond the sharedServerIdstring that caused the conflict in the first place.Actual Behavior
Both halves of "used by both the 'rust' and 'rust' language entries" are identical, giving no way to identify which two of N configured entries are the actual conflict when a config has more than two
[[lsp_servers]]entries for different languages.Environment
language_id = "rust", nonamesetLogs / Evidence
Reproduced live against a fresh build of the current
mainbranch; see reproduction steps above for the exact config and resulting error text.