-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Intermittent bindgen failures #51
Comments
I'm still not sure what's happening, but I've started seeing another odd issue. Now I sometimes get the error below when I'm compiling my Rust code. It only happens sometimes:
I've attached a video of what it looks like to run 2021-10-31_01-15-49.mp4 |
Thanks for reporting this. Looks like a race condition of some sort since it only happens sometimes. Basically rid keeps state internally to see which ones it already rendered but if somehow macro expansion runs in parallel (which I don't think) or if the check if we rendered this happens at the wrong places and still results in two wrapper methods (more likely) then it could cause that issue. I'm gonna look through the code to see how that could be fixed when I get some more bandwidth. Thanks for your patience. |
All good! I understand how that goes, no rush :) I will keep posting as I see new symptoms. I've reproduced this on three different Windows machines and I should have an opportunity to try it on a macOS machine soon. |
I can confirm that both errors occur on macOS:
|
Isn't it that the code generator sometimes run too early, while other scripts might still be running ? Exactly like when running |
I've noticed a redundant failure this early morning because I'm used to chain bash commands (e.g. with Makefile): |
I don't think that's the issue. I am running the build script directly via |
@SecondFlight in order to fix this could you please clarify if this happens on Windows only of other OSes as well? |
Hi @thlorenz, I have reproduced this on Windows and x86 macOS. I was able to test three Windows environments and one macOS environment. I have not tried any other platforms. I tried to create a minimal reproducible test case in the clock example (see my initial investigation above), but I couldn't reproduce the issue. The issue seems to require either a sufficiently complex setup or a specific structure, I'm not sure which. The repository I linked reproduces the issue reliably on all systems I tested. |
I have a case where bindgen succeeds but it somtimes doesn't generate
RawTimeSignatureChange
inffigen_binding.dart
. It seems random as to whether it will include it or leave it out.Here's the relevant files in my repo:
https://github.com/SecondFlight/anthem/blob/bindgen-race/src/model/pattern.rs
https://github.com/SecondFlight/anthem/blob/bindgen-race/src/model/time_signature.rs
This issue first started happening after I added the
time_signature_changes
anddefault_time_signature
fields toPattern
.I tried recreating this issue in
examples/dart/clock
, but to no avail. I was trying to generically recreate the structure in the files linked above:This did not cause the issue to occur, so I'm not sure what's happening.
The text was updated successfully, but these errors were encountered: