-
Notifications
You must be signed in to change notification settings - Fork 17
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
Completely Refactoer #120
Completely Refactoer #120
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
===========================================
+ Coverage 14.15% 42.36% +28.20%
===========================================
Files 16 22 +6
Lines 1533 1100 -433
===========================================
+ Hits 217 466 +249
+ Misses 1316 634 -682 ☔ View full report in Codecov by Sentry. |
1. Use type aliases to define state field types (for use outside the state module). 2. std::sync::Mutex -> parking_lot::RwLock (parking lot and rw lock are more efficient)
…interact with eachother.
…turns a cache reference
…can not be poisoned; impl Debug on the Operation type
These are conceptually separated by being direct *internal* events that modify Odilia's state. As opposed to events, which are generally recieved from the outside. Also adds a few more Defualt implementations.
Hello, Currently I've started to work on the project. What kind of refactors you are doing at this time? Thank you. |
odilia-common
comparable on any architecture withstd
.wasm32-wasi
andwasm32-unknown-unknown
compilation ofodilia-common
.atspi-client
logic back into Odilia via more internal cache traits. This can be re-exported later, but the wholeAccessibleExt
system has to go, it doesn't work with this new architecture very well.odilia/src/events/*
functions to(Try)From<$atspi_event> for Vec<OdiliaEvent>
.${event}FunctionParams
structure to be created from($event, &state)
.(Try)From<${event}FunctionParams for Vec<OdiliaEvent>
.OdiliaEvent
. The resulting code should look similar to:<$odilia_evnet>::get_state_pieces(&State) -> ${odilia_event}States;
then$[odilia_event}State.apply_changes()
. Only withinapply_changes
should there by mutable access to any part of the state. Before this, you may useArc<T>
,RwLock<T>
, orT
if it is thread-safe.Vec<OdiliaEvent>
. Test for all major events. No need for 100%.This basically sets the stage for the plugin system.
Now, state is stored entirely separate to the types, and can be queried through provided functions like
query_parent(Accessible) -> Accessible
which will be implemented as guest-available functions once the plugin system is ready.Note: this PR DOES NOT implement any kind of plugin system, it merely sets everything up to be easy to test the core, and easy to integrate
pre-*
andpost-*
hooks on each major category of event.Although I'll be taking suggestions, I will not be doing a formal code review because there simply are not the available man hours for that. The new testing should suffice as proof of sound reasoning.