-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add dynamic load data #413
Conversation
I like the idea here, but I think dynamic As is, this will break existing |
Sure, I'll update it in the free time and ping you |
83bc935
to
5208d74
Compare
@hansihe refactored and tested on my project |
5208d74
to
463f049
Compare
463f049
to
7394fb5
Compare
@kaaboaye do you think you could add a test for this? In EDIT: Also, I fixed clippy on master, so rebasing should fix clippy problems here as well I think. |
7394fb5
to
85f384a
Compare
Thanks for the tests! Yes, the output is expected. |
The pipeline complains on windows:
|
I can fix this test for Windows but I could figure out some other case which doesn’t rely on platform specific API. Windows fix would work as an example usage of this feature with real world use case. but it would also mean that when adding support to other platforms this test could fail again Should I fix it for windows or figure out something different? |
I think fixing it for windows is sufficient. We have runners for linux, macos and windows, it suffices to only make them work for now. |
Looking into the issue of initialization I've realized that those modules can be also unloaded while updating. So maybe instead of making sure that the DATASET is initialized only once we should make sure that upgrades are properly handled? Does anyone here have any experience with how upgrades work? Does the library get new "static" memory space or is it reusing the old memory? |
We have a long-standing issue w.r.t. upgrades: #13. Currently, upgrading is not allowed.
As upgrades are not supported right now, we can probably revisit that part later on. But maybe we need to figure out how to handle |
I think |
Ok, so only the test on windows is left here I think. |
Added windows support, all tests are green on windows now. |
@kaaboaye thanks for all your work! Can you try to rebase one more time on master? We had some changes to the CI, which should make the tests run more reliably. With that, I think we can then merge here. |
`Some(load)` has been replaced with `load = load`. Also add a stub for showing how `load` should look like.
According to https://github.com/foresterre/cargo-msrv, the current MSRV is 1.56.1. Clippy needs to obey this, as new lints may not be available to old versions of Rust.
The target was copied from rustler_test, but should be different. Fix ed1dff9.
8780f04
to
51bf30e
Compare
Done |
Seems that there is a merge conflict, can you resolve that? |
@philss resolved the merge conflict, thanks! |
Makes it possible to compute
load_data
at the runtime.Example use case it to provide priv path to the nif.
Also added explicit errors to indicate that user provided invalid config.