-
Notifications
You must be signed in to change notification settings - Fork 621
Extend C++ RecordingStream with global/thread_local/flush/save/connect APIs & introduce C++ SDK tests #2890
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
Conversation
07edbc1 to
6a4e00b
Compare
|
Text version: |
|
uhoh. May or may not be file system delay. I left a comment in there that the test may be dangerous |
teh-cmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely based 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of expect() calls all over this module 😬
I know this was done so in the interest of development speed, but it feels like it's time to address this before it gets more complicated.
Most of those can probably be replaced by a simple error!(blabla); return void; kinda thing (and I guess we need a constant for RERUN_REC_STREAM_INIT_FAILED?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think we want a large error enum in the API. I'll do a follow-up with that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what emil prototyped so far he added a log library to C++, but I find it less and less useful actually. I'd rather have everything return an error instead of relying on an extra library.
That's somewhat related to not leaking arrow stuff too much: C++ should get its own result type where we use our own "Rerun C++ error"-type
6a4e00b to
dbe2724
Compare
teh-cmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| THEN("after destruction, the second stream produced a bigger file") { | ||
| stream0.reset(); | ||
| stream1.reset(); | ||
| CHECK(fs::file_size(test_rrd0) < fs::file_size(test_rrd1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using file metadata is asking for flakiness imo
c626ee7 to
6bdbd12
Compare
* Fixes #2662 ### What * Runs clang-format to check for unformatted files * Builds and runs the minimal example * Builds and runs rerun_sdk tests Docker image script was in a broken state, fixed it and updated the image everywhere. Do not under any circumstances review commit per commit 😉 (srsly the history is messed up) TODO: * [x] check if overall ci goes green * [x] break both ci jobs on purpose (already did compile failures, try actual test failure instead * [x] fix it again (duh ;)) Future todo: * #2903 * todos from #2890 * cache C++ build results? ### 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/2901) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2901) - [Docs preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp%2Fci/docs) - [Examples preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp%2Fci/examples)


(SDK! Not codegen! :))
What
Adds a test dependency to the Catch2 testing framework in order to start testing all the new RecordingStream features added here.
C++ tests can be conveniently run via
./rerun_cpp/build_and_run_tests.shnow!For quick api overview start with the
rerun.handrecording_stream.hheaders.Fixes a range of compiler warnings as a consequence of improving some of the CMake setup, more to do there!
Adds lots more documentation to RecordingStream as well.
Next steps:
Checklist