serena
serena copied to clipboard
serena project index fails on Rust projects with TOML in project.yml
Description
Running serena project index on certain Rust projects fails with:
ValueError: 'toml' is not a valid Language
Root Cause
When a Rust project's .serena/project.yml contains languages: ["toml"] (either manually configured or from a previous session), Serena fails to load the project configuration because toml is not a valid value in the Language enum.
This can happen when:
- A user manually adds
tomlto their project languages - A project.yml was created/modified during a session where TOML support was being tested
- The project configuration references TOML files (like Cargo.toml) that should be indexed
Affected Projects
- Projects with
languages: ["toml"]orlanguages: ["rust", "toml"]in project.yml - The issue is inconsistent: some Rust projects work (no toml in config), others fail (toml in config)
Expected Behavior
TOML should be a valid Language that can be specified in project.yml, allowing Serena to index TOML configuration files (Cargo.toml, pyproject.toml, etc.)
Environment
- Serena version: main branch (pre-TOML support)
- Platform: Windows/Linux/macOS