Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Detailed Compilation Errors by Allowing Scripting Engine to Return robj Instead of C Strings #1470

Closed
PingXie opened this issue Dec 22, 2024 · 4 comments · Fixed by #1312
Assignees

Comments

@PingXie
Copy link
Member

PingXie commented Dec 22, 2024

          > I think the more generic approach is to allow the scripting engine to return a C string with the error message.

Yeah if we would like to provide detailed compilation errors then we need to keep this capability but I would suggest robj too over C strings.

Originally posted by @PingXie in #1277 (comment)

@PingXie
Copy link
Member Author

PingXie commented Dec 22, 2024

FYI @rjd15372

@rjd15372
Copy link
Contributor

@PingXie @zuiderkwast can one of you assign this issue to me?

@PingXie
Copy link
Member Author

PingXie commented Dec 23, 2024

I did try assigning these issues to you but couldn't find your name in the assignee drop down list and I couldn't add new names either. Maybe Viktor would know?

@enjoy-binbin
Copy link
Member

He needs to be a member of the org, or he needs to have commented on this issue.

zuiderkwast pushed a commit that referenced this issue Jan 16, 2025
This commit creates a new compilation unit for the scripting engine code
by extracting the existing code from the functions unit.
We're doing this refactor to prepare the code for running the `EVAL`
command using different scripting engines.

This PR has a module API change: we changed the type of error messages
returned by the callback
`ValkeyModuleScriptingEngineCreateFunctionsLibraryFunc` to be a
`ValkeyModuleString` (aka `robj`);

This PR also fixes #1470.

---------

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
proost pushed a commit to proost/valkey that referenced this issue Jan 17, 2025
…1312)

This commit creates a new compilation unit for the scripting engine code
by extracting the existing code from the functions unit.
We're doing this refactor to prepare the code for running the `EVAL`
command using different scripting engines.

This PR has a module API change: we changed the type of error messages
returned by the callback
`ValkeyModuleScriptingEngineCreateFunctionsLibraryFunc` to be a
`ValkeyModuleString` (aka `robj`);

This PR also fixes valkey-io#1470.

---------

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: proost <jwalag87@gmail.com>
kronwerk pushed a commit to kronwerk/valkey that referenced this issue Jan 27, 2025
…1312)

This commit creates a new compilation unit for the scripting engine code
by extracting the existing code from the functions unit.
We're doing this refactor to prepare the code for running the `EVAL`
command using different scripting engines.

This PR has a module API change: we changed the type of error messages
returned by the callback
`ValkeyModuleScriptingEngineCreateFunctionsLibraryFunc` to be a
`ValkeyModuleString` (aka `robj`);

This PR also fixes valkey-io#1470.

---------

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
enjoy-binbin pushed a commit to enjoy-binbin/valkey that referenced this issue Feb 2, 2025
…1312)

This commit creates a new compilation unit for the scripting engine code
by extracting the existing code from the functions unit.
We're doing this refactor to prepare the code for running the `EVAL`
command using different scripting engines.

This PR has a module API change: we changed the type of error messages
returned by the callback
`ValkeyModuleScriptingEngineCreateFunctionsLibraryFunc` to be a
`ValkeyModuleString` (aka `robj`);

This PR also fixes valkey-io#1470.

---------

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants