improvement: update macros to not require manual imports#1071
improvement: update macros to not require manual imports#1071timokoesters wants to merge 3 commits intorhaiscript:mainfrom
Conversation
|
It could be made even more robust by adding the absolute path for Vec and Ok, but I think that's too messy to read and has little benefit |
|
My question is: what if the user pulls in Rhai under a different name? |
|
There are some CI tests not passing. Can you also take care of those? Thanks. |
|
Can you put in an attribute (e.g. The test output failure I can fix. |
timokoesters
left a comment
There was a problem hiding this comment.
I've implemented the root argument and added a test for it called one_arg_fn_with_context_custom_root
|
That test failure is strange. I'm looking into it, because I cannot reproduce it on my desktop, nor in my dev repo. |
|
Should we add some tests with I'll also update the Book to mention this attribute and remove the need to import. |
|
Small correction, the syntax is Do you want me to add one derive test and one export_module test? |
This should make it easier for users of the library, because they don't have to add random
usestatements for all the things the macros need.