-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Expressions as parameters in StringNamespace functions #314
Comments
OK fixed this locally on my computer for str.slice directly inside bin/.lazy/expr/string.js
And looking at the code, I think there are many places where we have the same type of "error/confusion". For some of them, the rust code should be also reviewed. Exemple with str_replace function where pat and val should be &JsExpr instead of String and then calling pat.inner.clone() and val.inner.clone() and then calling ca.replace(pat.onner.clone(), val.inner.clone().
Only a "guess", shall be confirmed by the maintainers and eventually changed inside all functions accepting parameters (TBC), as I am not yet able to locally test modifications of rust code for now. Thanks |
|
Thanks a lot, OK, I will do my best to list and detail all missing test cases I encounter. |
|
Hi and sorry again,
I think I found a global issue in StringNamespace implementation.
Comparing with this example of slice implementation between string an list
This raises the following error for the last expression .str.slice(pl.list(0),pl.lit(2)) :
Then I compared the code on rust side and js side for both slice implementations
Except the difference for optional length (which is not an issue, nothing to highlight)
Then in JS:
The processing of the parameter seems to differ between both implementations.
Sorry in advance if I am wrong...
The text was updated successfully, but these errors were encountered: