-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Labels
cocoindex-coreCocoIndex Core EngineCocoIndex Core Enginehelp wantedExtra attention is neededExtra attention is needed
Description
Currently, for sources / functions implemented in Rust, since the executor code directly construct values in the generic cocoindex::value::Value
type, there's no enforcement to make sure the value type actually matches the schema declared by the executor.
Downstream logic just assumes value's type matching the expected schema. If not true, there can be hard to debug problems. #725 is a recent example.
We want to:
- For each source / function, validate its returned value matched the declared schema. It should happen within the evaluator. Raise an error with clear message if mismatch.
- Only do this validation under "cocoindex debug mode". We can let users to set a
COCOINDEX_DEBUG
environment variable for users to turn on this debug mode.
❤️ Contributors, please refer to 📙Contributing Guide.
Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it
or Can I work on this issue?
to avoid duplicating work. Our Discord server is always open and friendly.
Metadata
Metadata
Assignees
Labels
cocoindex-coreCocoIndex Core EngineCocoIndex Core Enginehelp wantedExtra attention is neededExtra attention is needed