Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ updates:
applies-to: security-updates
patterns: ["*"]
- package-ecosystem: cargo
directories: ["/", "/services/mobile/relay", "/services/mobile/connector", "/crates/replica", "/crates/replica-ffi"]
directories: ["/", "/services/mobile/relay", "/services/mobile/connector", "/crates/replica", "/crates/replica-ffi", "/crates/watch-protocol"]
schedule:
interval: monthly
open-pull-requests-limit: 1
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ jobs:
cargo +1.99.1 fmt --check --manifest-path crates/replica-ffi/Cargo.toml
cargo +1.99.1 clippy --locked --manifest-path crates/replica-ffi/Cargo.toml --target-dir target/replica-ffi --all-targets -- -D warnings
cargo +1.99.1 test --locked --manifest-path crates/replica-ffi/Cargo.toml --target-dir target/replica-ffi
- name: Watch protocol crate (format, lints, tests)
run: |
cargo +1.99.1 fmt --check --manifest-path crates/watch-protocol/Cargo.toml
cargo +1.99.1 clippy --locked --manifest-path crates/watch-protocol/Cargo.toml --target-dir target/watch-protocol --all-targets -- -D warnings
cargo +1.99.1 test --locked --manifest-path crates/watch-protocol/Cargo.toml --target-dir target/watch-protocol
# Packages fail without a notice for every shipped crate; find out here.
- name: Rust license notices
run: python3 scripts/collect-licenses.py "$RUNNER_TEMP/rust-licenses"
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ stable release, and raising them is routine maintenance. Run
The replica crate has its own lockfile: run
`cargo +1.99.1 test --locked --manifest-path crates/replica/Cargo.toml`; its
golden vectors must keep decoding, and `ZERUS_BLESS=1` only adds new ones.
The event stream's frame crate has one too: run
`cargo +1.99.1 test --locked --manifest-path crates/watch-protocol/Cargo.toml --target-dir target/watch-protocol`.

On Linux, the three worktree modules run through `scripts/ci/worktree-tests.py`
in a fresh PID/mount namespace, including their live process blockers and private
Expand Down Expand Up @@ -110,6 +112,16 @@ class) and before it starts.
`CHILD_PROCESS_EXEMPT` in the script names the files that may start children
otherwise, each with its reason.

The desktop parses JSON only through [JsonParse.h](tray/src/JsonParse.h), off
the GUI thread: `hgs` output in a `ProcessRunner` prepare step, other data
through `ProcessRunner::post` or an existing worker, and QSettings values
through `SettingsJson`. `check-source.py` rejects `QJsonDocument::fromJson` in
`tray/src` outside `JsonParse.cpp`, and lists the files that may still call
`JsonParse::local()` on the GUI thread and how often; that list only shrinks.
Every Qt suite runs with `ZERUS_GUI_THREAD_CHECKS=fatal`, so a parse on the GUI
thread aborts the test with its call site. A GUI suite that checks a parser
directly calls it through `offGuiThread()` (`tray/tests/support/OffGuiThread.h`).

A change to tmux or `ps` call sites must keep Unix behaviour unchanged: compare a
[tmux census](docs/ci-and-aur.md#unix-tmux-census) of the branch with one of main.
`scripts/ci/check-windows-target.sh` type-checks the Windows target from Linux or
Expand Down
9 changes: 9 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ toml_edit = "0.25"
unicode-width = "0.2"
uuid = { version = "1", features = ["v4"] }
zerus-replica = { path = "crates/replica" }
zerus-watch-protocol = { path = "crates/watch-protocol" }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = [
Expand Down
2 changes: 2 additions & 0 deletions crates/watch-protocol/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[resolver]
incompatible-rust-versions = "fallback"
107 changes: 107 additions & 0 deletions crates/watch-protocol/Cargo.lock

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

13 changes: 13 additions & 0 deletions crates/watch-protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "zerus-watch-protocol"
version = "0.1.0"
edition = "2021"
rust-version = "1.99"
license = "MIT"
description = "Frames and control operations of the hgs watch event stream (watch-v1)"
publish = false

# Shared by hgs and its clients. Keep it to serde: no Loro, Qt or async runtime.
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Loading
Loading