-
Notifications
You must be signed in to change notification settings - Fork 39
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
Better error if binary does not match version #20
Comments
Which binaries are you using? This looks like an issue with an outdated binary. At the moment I don't want to make any stability guarantees of the same binaries being usable across versions because things in the core are still prone to change quickly. So the binary for version 0.3.0 does not work with the latest commit to master. I think the right course of action here is a better error message that informs which version of the binary you are using and which version of nlprule; that requires some sort of compatibility to read the version but that's doable. In the meantime you can download the unreleased binaries for the latest commit to master at the corresponding GH action output: https://github.com/bminixhofer/nlprule/actions/runs/531964158 |
If that's the case, then the helper API would really make sense, so issues like these won't pop up again, but compatibility is guaranteed by API. |
I agree 100%. Still it should also have a better error message and i. e. read the version as the first x bytes of the binary and if it does not match stop right away. At the moment I'm working on #15 but a |
I'll implement this soon. I think using the first 64 (or 128, 256, but I think 64 is enough) bytes of each binary to store the version encoded as UTF8 is the best way. I'm not too sure if there isn't maybe a more standard way so I'd appreciate a second opinion @drahnr :) |
I think kiss is the best approach here. Reserving 8 bytes and using them as big endian |
Oh that's a good idea! I have to check how much overhead there is from tarring / untarring (also w.r.t dependencies) but if it's reasonably small then that's definitely a better approach. |
The rust cookbook contains a few examples which might be helpful https://rust-lang-nursery.github.io/rust-cookbook/compression/tar.html |
The text was updated successfully, but these errors were encountered: