You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is very annoying for users if they get mismatched headers and library files. It can lead to very hard-to-debug problems.
To protect against that we can hard-code the version into both rerun.h (#define RERUN_VERSION …) and into a library-defined function (rr_version()). The C++ library can then check that RERUN_VERSION == rr_version before it does anything else.
The text was updated successfully, but these errors were encountered:
emilk
changed the title
Sanity-check that the header version and library version is the same
Sanity-check that the C++ header version and library version is the same
Oct 16, 2023
emilk
changed the title
Sanity-check that the C++ header version and library version is the same
Sanity-check that the C header version and rerun_c library version is the same
Oct 24, 2023
…y version (#4330)
### What
* Fixes#3868
* Fixes left over to set generic package version from #4326
* Yes there's two levels of regex'ing existing files now, but I'm happy
with it because it avoids etching the version into more places: The repo
cmake setup first figures out the rerun version by taking a look at
Cargo.toml and puts that into rerun.h which we commit. Then when doing
an install (in repo or outside!) we check rerun.h's version and put that
into the CMake Install shenanigans
Tests erro'red correctly when I still had a longer string, looked like
this:
```
-------------------------------------------------------------------------------
Scenario: RecordingStream can connect
Given: a new RecordingStream
-------------------------------------------------------------------------------
/Users/andreas/dev/rerun-io/rerun/rerun_cpp/tests/recording_stream.cpp:433
...............................................................................
/Users/andreas/dev/rerun-io/rerun/rerun_cpp/tests/recording_stream.cpp:433: FAILED:
due to unexpected exception with message:
Rerun_c SDK version and SDK header/source versions don't match match. Make
sure to link against the correct version of the rerun_c library.
Rerun_c version:
re_sdk 0.11.0-alpha.1+dev [rustc 1.72.1 (d5c2e9c34 2023-09-13), LLVM 16.0.5]
aarch64-apple-darwin
SDK header/source version:
0.11.0-alpha.1+dev
```
### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4330) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
- [PR Build Summary](https://build.rerun.io/pr/4330)
- [Docs
preview](https://rerun.io/preview/72b1b7eedaa4934a8a34d1ab498c9b7752dd8125/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/72b1b7eedaa4934a8a34d1ab498c9b7752dd8125/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
It is very annoying for users if they get mismatched headers and library files. It can lead to very hard-to-debug problems.
To protect against that we can hard-code the version into both
rerun.h
(#define RERUN_VERSION …
) and into a library-defined function (rr_version()
). The C++ library can then check thatRERUN_VERSION == rr_version
before it does anything else.The text was updated successfully, but these errors were encountered: