Skip to content

config: custom_modules entries for wasm/node/go/java/csharp parse but are silently ignored #183

Description

@tobocop2

Problem

CustomModulesConfig accepts per-language module lists for python, node, ruby, php, elixir, wasm, ffi, go, java, csharp, and r, but only six backends consume it (pyo3, ffi, php, magnus, rustler, extendr). Entries under wasm, node, go, java, or csharp parse cleanly and do nothing. The wasm config doc makes this worse: the custom_rust_modules doc comment in src/core/config/languages/wasm.rs describes itself as "Separate from [custom_modules].wasm which only adds TypeScript export * re-exports", but no code path reads custom_modules for wasm at all.

Concretely in kreuzberg: the contributor in xberg-io/xberg#1253 declared custom_modules = ["bridge", "engine"] under [crates.wasm] expecting their hand-written modules to survive regeneration, saw no effect, concluded alef had no preservation mechanism, and committed a post-regen patch script to re-insert the module declarations after every generate. The knob that actually works for wasm, custom_rust_modules, was only found by reading alef source, and the same confusion made it into review comments on that PR.

Solution

Two parts. Emit a warning during generate when custom_modules contains entries for a language whose backend does not consume them, naming the language and, for wasm, pointing at custom_rust_modules. And correct the custom_rust_modules doc comment so it stops describing [custom_modules].wasm behavior that does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions