Skip to content

refactor(station): drop try_publish to track aimdb-sync - #14

Merged
lxsaah merged 3 commits into
mainfrom
refactor/drop-try-publish
Oct 7, 2026
Merged

lxsaah merged 3 commits into
mainfrom
refactor/drop-try-publish

Conversation

@lxsaah

@lxsaah lxsaah commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

aimdb-sync removed SyncProducer::try_set, try_set_value and SyncError::SetTimeout (aimdb-dev/aimdb#288). Every built-in buffer overwrites rather than refusing a write, so try_set did the same thing as set(). This PR removes the station APIs that were built on it.

Breaking: the station's FFI surface shrinks.

  • Rust: StationHandle::try_publish_temperature / try_publish_humidity
  • C: ws_station_try_publish_temperature / ws_station_try_publish_humidity
  • C++: Station::try_publish_*
  • Python: Station.try_publish_*

Callers should switch to publish_*. It no longer waits for buffer space, so it doesn't block where the try_ form didn't.

Also:

  • The publish_* docs no longer say the call blocks or waits for room in the buffer.
  • other_db_failures_stay_runtime now uses SyncError::GetTimeout, which is classified as Retry just like SetTimeout was.

Test plan

  • cargo test -p weather-station --features sync
  • cargo test -p weather-station-cpp --lib
  • cargo clippy -D warnings on weather-station (sync), weather-station-py, weather-station-cpp
  • cargo fmt --check
  • weather-station-cpp/cpp/station.cpp syntax-checks against the trimmed headers

🤖 Generated with Claude Code

lxsaah and others added 3 commits October 7, 2026 19:31
aimdb-sync removed SyncProducer::try_set and SyncError::SetTimeout:
every built-in buffer overwrites, so try_set duplicated set().
Remove the try_publish_* variants built on it from StationHandle and
the C, C++ and Python bindings, and stop describing publish_* as
waiting for buffer space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aimdb-knx-connector no longer depends on embassy-sync or
critical-section, so the path-dependency lock was stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lxsaah
lxsaah merged commit a46e4e3 into main Oct 7, 2026
5 checks passed
@lxsaah
lxsaah deleted the refactor/drop-try-publish branch October 7, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant