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

Completely Refactoer #120

Closed
wants to merge 105 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
56c165b
initial implementation of a more pure (functional) Odilia
TTWNO Jun 15, 2023
97a111c
Add Odilia events, remove some error types
TTWNO Jun 17, 2023
b3d8ac1
Use new ssip crate layout
TTWNO Jun 17, 2023
58d7842
Update ssip-client-async and add ssip-common (a core crate)
TTWNO Jun 17, 2023
5c0ba86
Merge main
TTWNO Jun 17, 2023
1417b35
Add wasm info to readme
TTWNO Jun 17, 2023
0bfed06
Make odilia-common compileable on wasm
TTWNO Jun 17, 2023
27ce9cc
Add zvariant and zbus_names as workspace deps
TTWNO Jun 17, 2023
21062f0
Add test for benchamrks to ensure benchmarks don't break before a merge
TTWNO Jun 18, 2023
1eb645f
Add CI check that common crate can be compiled on both major wasm tar…
TTWNO Jun 18, 2023
fd98927
Move cache types to common, decouple implementation from type definit…
TTWNO Jun 18, 2023
d3526c8
Fix compile errors due to different types and trait imports
TTWNO Jun 18, 2023
882004c
Update dependencies and internal feature flags
TTWNO Jun 18, 2023
7fafaa7
tabs -> spaces in github workflow file
TTWNO Jun 18, 2023
52a3abf
Use git instead of local path version for atspi-&
TTWNO Jun 18, 2023
e3e421a
Add beta clippy lints to CI
TTWNO Jun 18, 2023
f04c8f9
MAke sure that specifically the cache benchmarks are run
TTWNO Jun 18, 2023
59ef3cf
Fix unused imports
TTWNO Jun 19, 2023
b172a26
Remove unused imports, unused functions are commented for now
TTWNO Jun 19, 2023
0ea3fbd
Refactor state.
TTWNO Jun 19, 2023
0f829ca
Add parking lot and static assertions
TTWNO Jun 19, 2023
2469be6
Add traits system to define how events, state and state modification …
TTWNO Jun 19, 2023
98fe41b
Remove old code; implement a get_key function for the cache, which re…
TTWNO Jun 19, 2023
9f1dfe2
Use cache AccessiblePrimtiive for primary Accessible typdef: make Tex…
TTWNO Jun 19, 2023
b7a3e2e
std::sync::RwLock -> parking_lot::RwLock; remove unused deps
TTWNO Jun 19, 2023
2761506
std::sync::RwLock -> parking_lot::RwLock
TTWNO Jun 19, 2023
bd1780b
Fix transition to parking_lot in benchmarks
TTWNO Jun 19, 2023
fc325b4
Add command errors; remove poisoning error since parking_lot RwLocks …
TTWNO Jun 19, 2023
9a1ded3
Refactor most events into "commands".
TTWNO Jun 20, 2023
1be3106
Use better names for the traits
TTWNO Jun 21, 2023
d022036
Return a specific enum from IntoStateProduct
TTWNO Jun 21, 2023
67f3184
Reinstate associated type
TTWNO Jun 21, 2023
1166f6b
Implement a single event under the new architecture
TTWNO Jun 21, 2023
95615a0
Remove end_index field for TextInsert state structure
TTWNO Jun 21, 2023
c9fe077
Remove unused and document types
TTWNO Jun 23, 2023
9a6cc50
Remove state
TTWNO Jun 23, 2023
9f94c2f
Moved state to views, since state can not be defined in the common crate
TTWNO Jun 23, 2023
9883c00
Add common traits; in this case define an associated type for a non-m…
TTWNO Jun 23, 2023
0b6dc18
Add new commands
TTWNO Jun 23, 2023
b843551
Create a conversion for CacheRef -> CacheItem
TTWNO Jun 23, 2023
73fdcca
Fix compile errors
TTWNO Jun 23, 2023
8a84ddf
Force documentation in common crate
TTWNO Jun 23, 2023
795b44c
Move tiny result file into lib.rs
TTWNO Jun 23, 2023
e4af049
Remove result mod
TTWNO Jun 23, 2023
82923d5
Move tiny modes file to lib
TTWNO Jun 23, 2023
f683937
Remove mode mod, and change imports
TTWNO Jun 23, 2023
9fa7e2d
Get rid of a bunch of unused error types and document most of the rem…
TTWNO Jun 23, 2023
13dce2f
Prepare for more events
TTWNO Jun 23, 2023
38b6eb7
Add docs
TTWNO Jun 23, 2023
0c2108e
Add docs
TTWNO Jun 23, 2023
31314f0
Add docs, and change one type
TTWNO Jun 23, 2023
29cfe84
Remove elements module
TTWNO Jun 23, 2023
2caddb1
Add docs to all error types; remove some old variants
TTWNO Jun 23, 2023
ea2fff3
Add docs for cache and lib
TTWNO Jun 23, 2023
f270bad
Modify cache to remove HostExt
TTWNO Jun 23, 2023
e193213
add missing docs lint to cache
TTWNO Jun 23, 2023
bd95596
Remove cache_item_ext from cache
TTWNO Jun 23, 2023
49038fe
Add docs for everything in cache
TTWNO Jun 23, 2023
60d8360
add missing_docs on tts crate
TTWNO Jun 23, 2023
f05e54b
Remove async_trait, since these these traits necessarily need to be u…
TTWNO Jun 23, 2023
94c33cb
Remove legacy docs (from async), add a new trait, add a new bound to …
TTWNO Jun 23, 2023
ca69d1a
Remove encapsulated implementation of Command
TTWNO Jun 23, 2023
b32a666
Actually include traits module
TTWNO Jun 23, 2023
f8681b0
Add views to lib, and add docs
TTWNO Jun 23, 2023
ac35b40
Add error for unknown types of events
TTWNO Jun 23, 2023
74520be
Add InvalidVairant from InvalidStateVariant error
TTWNO Jun 23, 2023
691565a
Add conversion between Accessible <-> AccessiblePrimitive
TTWNO Jun 23, 2023
e2d18d7
Add basic trait-based implementation of how to handle events in stages
TTWNO Jun 24, 2023
c92902a
Remove unused function that was never fully implemented
TTWNO Jun 24, 2023
4d753f9
Add StateChangedCommand, add macro to implement simple conversions be…
TTWNO Jun 24, 2023
048940a
Add cache get function for anything that implements TryInto<Accessibl…
TTWNO Jun 24, 2023
9e34d67
Move complex cache types into odilia_cache
TTWNO Jun 25, 2023
37bc4d8
RwLock -> Mutex
TTWNO Jun 25, 2023
1e964b2
Asyncify cache again
TTWNO Jun 25, 2023
514f276
Asyncify benchmarks, again
TTWNO Jun 25, 2023
579f3a3
Asyncify all the traits.
TTWNO Jun 25, 2023
a497cde
add tests to state_changed event chain
TTWNO Jun 25, 2023
e399f53
Move cache to new structure
TTWNO Jun 25, 2023
a2a089d
Fix benchmark that kept crashing
TTWNO Jun 25, 2023
368160e
DashMap<K,V> -> RwLock<DashMap<K,V>>
TTWNO Jun 25, 2023
7dc7646
Explicitly drop read lock in populate_references
TTWNO Jun 25, 2023
ed5d347
Don't drop the cache lock, since it is borrowed
TTWNO Jun 25, 2023
b5f8136
Update cache to use more locks
TTWNO Jun 27, 2023
c34d2d2
Cargo format
TTWNO Jun 27, 2023
cac3a3f
Clippy errors
TTWNO Jun 27, 2023
61f6e24
Add children modification commands
TTWNO Jun 27, 2023
0d9c950
Add child changed commands, views
TTWNO Jul 2, 2023
d555b11
Add PartialEq and Eq for OdiliaError; this is helpful for testing
TTWNO Jul 2, 2023
bbb1919
Add cache events under new trait-based system
TTWNO Jul 2, 2023
e55686a
Add state changed, text changed events under trait based arch
TTWNO Jul 2, 2023
149f91c
Add text_caret_moved handlers
TTWNO Jul 2, 2023
54a1e9d
Add module root for objects
TTWNO Jul 2, 2023
8ccdaa7
Add AddAccessible, RemoveAccessible evnets and commands
TTWNO Jul 2, 2023
68b71b2
Add a new add_* function for cache
TTWNO Jul 2, 2023
a4e2127
Add serde to cargo.toml
TTWNO Jul 2, 2023
3a9aa13
Add async trait, update lockfile
TTWNO Jul 2, 2023
51d03ae
Remove legacy handlers
TTWNO Jul 2, 2023
55c0477
Change module names
TTWNO Jul 2, 2023
bbff978
parking_lot -> tokio for sync primitives
TTWNO Jul 2, 2023
4eb1264
Fix most clippy warnings
TTWNO Jul 2, 2023
f62eaee
Report invalidated item key in Error
TTWNO Jul 2, 2023
6b385f8
Fix most clippy errors in cache
TTWNO Jul 2, 2023
9f6e15b
from_cache_ref docs
TTWNO Jul 2, 2023
b97991d
Fix un-asyncified tests
TTWNO Jul 2, 2023
cf8a0a2
Use generic handle_event
TTWNO Feb 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 59 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,28 @@ jobs:
run: sudo apt -y install at-spi2-core systemd
- name: Run tests
run: cargo test
clippy:
benchmarks:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-
- name: Run benchmarks
working-directory: ./cache/
run: cargo bench
wasm-compatibility:
runs-on: ubuntu-latest
steps:
- name: Git checkout
Expand All @@ -66,14 +87,45 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm32-wasi and wasm32-unknown-unknwon
run: rustup target add wasm32-wasi && rustup target add wasm32-unknown-unknown
- name: Compile common data types crate (wasm32-wasi)
working-directory: ./common/
run: cargo build --target wasm32-wasi
- name: Compile common data types crate (wasm32-unknown-unknwon)
working-directory: ./common/
run: cargo build --target wasm32-unknown-unknown

- name: Run tests
uses: actions-rs/cargo@v1
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta]
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
command: clippy
# "-- -D warnings" will make the job fail if their are clippy warnings
args: --workspace --no-deps -- -D warnings -W clippy::print_stdout

path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
components: clippy
toolchain: ${{ matrix.toolchain }}
- name: Run tests
run: cargo clippy --workspace --no-deps -- -D warnings
rustfmt:
runs-on: ubuntu-latest
steps:
Expand Down
96 changes: 70 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,29 @@ pre-release-hook = ["cargo", "fmt"]
dependent-version = "upgrade"

[workspace.dependencies]
atspi = { version = "0.16.0", default-features = false, features = ["tokio", "unstable-proxy-traits"] }
atspi-client = { version = "0.1.0", default-features = false }
atspi-proxies = { version = "0.1.0", default-features = false }
atspi-common = { version = "0.1.0", default-features = false }
atspi-connection = { version = "0.1.0", default-features = false }
odilia-common = { version = "0.3.0", path = "./common" }
atspi = { git = "https://github.com/odilia-app/atspi/", branch = "error-serialization", version = "0.16.0", default-features = false, features = ["tokio", "unstable-proxy-traits"] }
atspi-client = { git = "https://github.com/odilia-app/atspi/", branch = "error-serialization", version = "0.1.0", default-features = false }
atspi-proxies = { git = "https://github.com/odilia-app/atspi/", branch = "error-serialization", version = "0.1.0", default-features = false }
atspi-common = { git = "https://github.com/odilia-app/atspi/", branch = "error-serialization", version = "0.2.0", default-features = false }
atspi-connection = { git = "https://github.com/odilia-app/atspi/", branch = "error-serialization", version = "0.1.0", default-features = false }
odilia-common = { version = "0.3.0", path = "./common", features = ["zbus", "proxies"] }
odilia-cache = { version = "0.3.0", path = "./cache" }
eyre = "0.6.8"
nix = "0.26.2"
serde_json = "1.0.89"
ssip-client-async = { default-features = false, features = ["tokio"], version = "0.10.0" }
ssip-common = "0.1.0"
ssip-client-async = { default-features = false, features = ["tokio"], version = "0.11.0" }
tokio = { version = "^1.22.0", default-features = false, features = ["sync", "macros", "rt", "signal", "tracing"] }
tracing = "^0.1.37"
tracing-log = "^0.1.3"
tracing-subscriber = { version = "0.3.16", default-features = false, features = ["env-filter", "parking_lot"] }
tracing-error = "^0.2.0"
tracing-tree = "^0.2.2"
zbus = { version = "^3.6.2", default-features = false, features = ["tokio"] }
zvariant = { version = "3.6.2" }
zbus_names = { version = "2.4.0" }
serde_plain = "1.0.1"

smartstring = { version = "1.0.1", features = ["serde"] }
dashmap = "5.4.0"
fxhash = "0.2.1"
async-trait = "0.1.68"
Loading