Skip to content
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

feat: device hot-reload, tools-relative adb, auto port bind #3586

Merged
merged 16 commits into from
Jan 21, 2025

Conversation

jkelleyrtp
Copy link
Member

@jkelleyrtp jkelleyrtp commented Jan 17, 2025

Fixes a number of issues:

Attempted and failed to get code-signing working. My old prototype doesn't work anymore.

This might get us close to polishing the number of CLI bugs I'm currently aware of.

@jkelleyrtp jkelleyrtp marked this pull request as ready for review January 18, 2025 06:16
@jkelleyrtp jkelleyrtp requested a review from a team as a code owner January 18, 2025 06:16
}
}

static APP_FN_PTR: Mutex<Option<fn() -> Element>> = Mutex::new(None);
static APP_OBJECTS: Mutex<Option<BoundLaunchObjects>> = Mutex::new(None);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be a thread local instead of a static? Box<dyn Any> is not send or sync so this looks unsound

Copy link
Member Author

@jkelleyrtp jkelleyrtp Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to test on-device to see if the android on_load is guaranteed to be fired from the main thread...

there's a chance it's not and we might need to mess with how this is structured a bit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay the way we do main has weird semantics. I think technically this is fine since the program needs to terminate before the main() call can finish up during load. I believe this the same case as an Rc moving between threads being sound only if you can prove it moves completely. We actually do have an assurance the Box<dyn Any> is not held onto anything from the main thread since the main thread no longer exists.

I'll add a note about this in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants