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
Incompatibility with Android RN master TimingModule #1801
Comments
@rodrigos-facebook wow, a big thank-you for this!!! We'll make the proper adaptation. |
FYI we have added internal land-blocking tests at facebook that ensure iOS compatibility between Detox and React Native. We are planning to add similar tests for Android once a new Detox version with fixes for the issues Rodrigo described have been published. By doing this we hope to avoid landing React Native changes to master that break the React Native/Detox interface, or at least be more proactive in fixing them before landing breaking changes in the React Native codebase. |
This is very exciting. Great to hear! |
I've put up a PR to add a new API to If that API does what we need, then we should be able to use that instead of updating Detox to refer to the new class name. I basically just copied what Detox does in TimersIdlingResource based on the discussion in #907. |
Just a thought about everything going on in here (at 01:04 AM), if we are already getting help from Facebook on this, setting up RN to fit Detox's needs, we might as well want to think of official espresso Idling resources like APIs, which are event based and not polling based, integrating idling resources inside RN itself, like described here https://developer.android.com/training/testing/espresso/idling-resource#integrate-recommended-approach Disclaimer: I haven't read the whole thread or web over the PR, but want to make sure we're moving in the recommended espresso way. I will read everything and revise this comment if needed. |
I'd definitely be interested in looking into using proper idling resources in RN for in the future, but I don't think I want to try to make that change right now - I'm working on rewriting some pieces of our infra to no longer use the bridge, so I'd probably try to make that change as part of that effort, rather than refactoring our existing code. With this PR I was just trying to do a simple fix so that Detox doesn't have to rely on reflection (since I broke that by renaming + refactoring the Timing class). What do you think? Is that PR a good step forward for now, or would you rather just keep using reflection for now, and update the class name, etc.? |
I'd choose to avoid reflection as much possible, but it's for @d4vidi to decide on this question. |
@ejanzer There's no real need for reflection here but for the sake of accessing internals. Seems like your changes in facebook/react-native#27539, then, will eliminate usage of reflection altogether! Anyways again as I already mentioned in facebook/react-native#27539, it's IMO ok to first fix this part, then when we're ready for the transition to event-based implementations... well, we already know what we're up against. The question I'm asking myself now is whether this can be closed until your facebook/react-native#27539 is merged in, or should we already have this fixed for 0.62 RC's out there? |
We have product teams at FB using Detox to test against master. Unfortunately this is currently broken because of the timer refactor. While an event based API might be architecturally best, it will take longer to make happen as @ejanzer doesn’t have the bandwidth to work on it. I’d like for us to move forward if possible with the existing PR to get detox working as quickly as possible against 0.62 so we can reenable our product team’s tests. Any support we could get to do so would be greatly appreciated. |
@TheSavior I'd be more than happy to move forward -- I wasn't suggesting to wait for the rearchitecture, just basically asking whether we could wait for facebook/react-native#27539 to be merged in so as to avoid reimplementing this twice. |
Well as facebook/react-native#27539 has been merged, it seems, I'll switch to using the newly timers interrogation API by @ejanzer. Cool with everyone? |
Yep, that's what I meant. Moving forward with the new API seems like a good idea |
consider it done |
Released under |
Describe the bug
FYI: It looks like at least 2 things the Detox android implementation depends on are no longer true in RN master in regards to the timers implementation.
To Reproduce
Test Detox against react native master and run into these build issues.
cc @cs01
The text was updated successfully, but these errors were encountered: