-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Flatbuffers #927
Flatbuffers #927
Conversation
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.
Looks amazing. Just a few comments or questions basically to understand things.
Why such a double /fbs/fbs/ path? I know why and wonder whether we should rename the root one to flatbuffers. |
For some reason I don't understand Any idea why those flags are suddenly not being passed to this dependency? I've just added a new dependency (flatbuffers) within this PR and I can't see how it could affect it. cc @nazar-pc if you can please comment. NOTE: It is not a blocker, I can still go on with this PR. |
Are you sure it worked before then? I see nothing that would have affected it. |
It works in v3 indeed. Otherwise the GH actions would fail the same way. |
I see CI fails due to segfault when running tests, why do you think it is related to those constants? |
I'm certain. if you add '-v' option to meson compile statement in Then when running the test executable mediasoup initializes I've verified it compiling the debug symbols and running the test binary with |
I'm checking the rest of warnings too, which are probably related to the compiler versions used in GH actions. |
I have no idea why it stops adding constants, but should be possible to debug by incrementally modifying |
Yes, I need to debug it before continuing pushing further commits here. |
3eb3813 creates a new libwebrtc_test dependency with the required 'cpp_flags'. 'mediasoup_worker_test' makes use of such dependency instead of the non test 'libwebrtc' dependency. As indicated in the commit comment, I don't know how it worked before, but as I understand 'cpp_args' are not passed to subprojects. |
Talks to Meson folks on Matrix, they're pretty responsive there and might help |
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.
Some preliminary comments but I need a call to discuss in a call
This way we make sure no old and unused files are kept
|
@nazar-pc, could you please check the warning given by clippy? Following the compiler suggestions leads me to an endless loop. |
Once that PR is merged and released and we upgrade flatbuffers dep, there is a test in mediasoup that will fail. Easy fix. It's has a note about this. |
Please push what you have before Saturday (I'll be mostly unavailable today) and I'll try to make some progress here. Not sure how much, but it'll be helpful for me to look at changes as a whole rather than patching tiny things here and there. |
This branch is up to date. |
Workaround until planus-org/planus#180 is fixed. This change keeps compatibility with C++ and TS.
I'll be out for the weekend but I'll be available during the week. We can sync anytime. |
I am reading through changes now and trying to understand what is going on and I see things that appear to be unrelated to this branch. For example There are also a bunch of things edited under
General comments on the whole branch: 319 commits is completely insane and unmanageable at all, try to use rebase and squash features of git. You develop incrementally locally, but you don't need to push every though and every experiment to GitHub. Squash things into locally structured and named commits that can be reviewed individually. When something changes in UPD: Looks like IDEA can't even compare the branches properly anymore, it essentially shows the wrong diff, so some of above changes are not really the changes that are present 😕 |
rust/src/fbs.rs
Outdated
//! Flatbuffers data structures compiled from `.fbs` files | ||
pub use root::fbs::*; | ||
|
||
const _: () = ::planus::check_version_compatibility("planus-0.3.1"); | ||
|
||
#[no_implicit_prelude] | ||
mod root { | ||
#[allow(missing_docs)] | ||
#[allow(clippy::all)] |
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.
This file is auto-generated. Do we need to add this changes manually when the flatbuffers schema changes?
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.
I believe the way you had it before could suppress the whole project. This will is currently committed into the repo, but it will be replaced with actually auto-generated during compile time in mediasoup-sys
in the future, so these changes are temporary either way.
rust/src/fbs.rs
Outdated
@@ -1,9 +1,12 @@ | |||
pub use root::*; | |||
//! Flatbuffers data structures compiled from `.fbs` files | |||
pub use root::fbs::*; |
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 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.
nice
Probably we forgot to add that field in
Would it help if we rebase flatbuffers into a few commits with descriptive messages and force push it? |
I'm trying to reduce the history of this branch by squashing commits... |
Absolutely, but not sure how much time that'd require at this point |
It's certainly impossible in terms of spent time to do squash commits at this point. My only sane proposal is:
We would have a single commit with all the changes performed in this branch. IMHO, up to this point is the safest and cleanest option. Do we agree? |
I don't think it would be so much better, but it would likely fix my IDE showing correct diff. Please don't delete old |
NOTE: THIS PR IS DEPRECATED IN FAVOUR OF #1063 Please, don't push anything in I'm closing this PR. @nazar-pc, I'm renaming this branch |
here: |
Please notify when done so I can retarget my PR. |
It's done. |
NOTE: THIS PR IS DEPRECATED IN FAVOUR OF #1063
WIP to remove JSON in favour of flatbuffers for as the worker communication format.
Extras that come along with this changes:
memcpy
that are now executed now.Feature request for making optional field getters return
undefined
instead ofnull
if the value is not set.memcpy
in C++ and the correponding Buffer copy in TS.Uint8Array
out of the flatbuffers builder each time we send data to worker.TypeError
instead ofError
when there is a missing required field. PR