レビュー指摘の通り、次の session-grouping-introduce で新 SessionId が
入る前に名称衝突を避けるため取り残しを掃除。
- PodError::Session{Empty,ScopeMissing} → Segment{Empty,ScopeMissing}
- ScopeLockError::SessionConflict → SegmentConflict
- Pod.session_state / SegmentState.set_session_id 系
- source_session_id / prev_session_id / ensure_session_head / short_session
- pod_cli の "Session ID:" 表示
- fs_store の sessions ローカル変数
39 lines
1.1 KiB
Rust
39 lines
1.1 KiB
Rust
//! Error type for mutating pod-registry operations.
|
|
|
|
use std::io;
|
|
use std::path::PathBuf;
|
|
|
|
use manifest::ScopeRule;
|
|
use session_store::SegmentId;
|
|
|
|
/// Errors raised by the mutating pod-registry operations.
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum ScopeLockError {
|
|
#[error("I/O error on pods.json: {0}")]
|
|
Io(#[from] io::Error),
|
|
#[error("pod name `{0}` is already registered")]
|
|
DuplicatePodName(String),
|
|
#[error("requested scope `{}` conflicts with pod `{competitor}` rule `{}`", .rule.target.display(), .competitor_rule.target.display())]
|
|
WriteConflict {
|
|
competitor: String,
|
|
rule: ScopeRule,
|
|
competitor_rule: ScopeRule,
|
|
},
|
|
#[error(
|
|
"requested scope `{}` is not within spawner `{spawner}`'s effective scope",
|
|
.rule.target.display()
|
|
)]
|
|
NotSubset { spawner: String, rule: ScopeRule },
|
|
#[error("pod `{0}` is not registered")]
|
|
UnknownPod(String),
|
|
#[error(
|
|
"session {segment_id} is already held by pod `{pod_name}` at {}",
|
|
.socket.display()
|
|
)]
|
|
SegmentConflict {
|
|
segment_id: SegmentId,
|
|
pod_name: String,
|
|
socket: PathBuf,
|
|
},
|
|
}
|