mirror of
https://github.com/huggingface/xet-core.git
synced 2026-06-04 13:30:29 +08:00
Currently, `UploadCommitSync` and `DownloadGroupSync` are thin wrappers around `UploadCommit` and `DownloadGroup` that delegate every method through `external_run_async_task`. This means two types, two sets of doc comments, and two test suites covering the same underlying behavior. This PR removes the separate sync types and adds `_blocking` suffixed methods directly on `UploadCommit` and `DownloadGroup`. The session factory methods `new_upload_commit_blocking()` and `new_download_group_blocking()` now return the same types as their async counterparts, and the entire `xet_session::sync` module is deleted (~680 lines removed). This also fixes a minor bug: `UploadCommitSync::upload_from_path` did not call `std::path::absolute()` on the file path before dispatching, unlike the async version. The new `upload_from_path_blocking` includes the `std::path::absolute()` call, matching the async version's behavior.