serena icon indicating copy to clipboard operation
serena copied to clipboard

serena project index fails on Rust projects with TOML in project.yml

Open w0wl0lxd opened this issue 3 weeks ago • 0 comments

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:

  1. A user manually adds toml to their project languages
  2. A project.yml was created/modified during a session where TOML support was being tested
  3. The project configuration references TOML files (like Cargo.toml) that should be indexed

Affected Projects

  • Projects with languages: ["toml"] or languages: ["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

w0wl0lxd avatar Dec 01 '25 08:12 w0wl0lxd