spacedriveapp/spacedrive · warning · anyhow::Error

Library merging is not yet implemented

Error message

Library merging is not yet implemented

What it means

Thrown by the library sync wizard when the user selects option 2, 'Merge libraries (combine two libraries)', which is explicitly labeled '[NOT YET IMPLEMENTED]' in the menu. This is a deliberate guard, not a runtime failure: the merge action has no implementation yet, so the wizard bails immediately instead of pretending to proceed.

Source

Thrown at apps/cli/src/domains/library/mod.rs:404

					)
				})
				.collect();

			let remote_lib_idx = select("Select remote library to join", &remote_lib_choices)?;
			let remote_library = &discovery_out.libraries[remote_lib_idx];

			println!("\n✓ Will join remote library: {}\n", remote_library.name);

			(
				LibrarySyncAction::JoinRemoteLibrary {
					remote_library_id: remote_library.id,
					remote_library_name: remote_library.name.clone(),
				},
				Some(remote_library.id),
			)
		}
		2 => {
			anyhow::bail!("Library merging is not yet implemented");
		}
		_ => unreachable!(),
	};

	// Leader device is always local for now (deprecated concept but still in input struct)
	let leader_device_id = local_device_id;

	Ok(LibrarySyncSetupInput {
		local_device_id,
		remote_device_id,
		local_library_id,
		remote_library_id: action.1,
		action: action.0,
		leader_device_id,
	})
}

View on GitHub (pinned to 6dfeccf211)

Solutions

  1. Use 'Share my library' or 'Join remote library' to achieve a single shared library between the two devices
  2. If you truly need merged contents, manually move/copy files into one library and let indexing run
  3. Track the upstream repository for merge support before selecting that option

Example fix

// before: the wizard offers an option that always bails
let action_idx = select("Select sync action", &[
    "Share my library to remote device (create shared library from local)".to_string(),
    "Join remote library (use their existing library)".to_string(),
    "Merge libraries (combine two libraries) [NOT YET IMPLEMENTED]".to_string(),
])?;

// after: don't offer unimplemented actions
let action_idx = select("Select sync action", &[
    "Share my library to remote device (create shared library from local)".to_string(),
    "Join remote library (use their existing library)".to_string(),
])?;
Defensive patterns

Strategy: fallback

Validate before calling

// Hide unimplemented options instead of letting users hit the bail
let choices: Vec<String> = vec![
    "Share my library to remote device (create shared library from local)".into(),
    "Join remote library (use their existing library)".into(),
];
assert!(choices.iter().all(|c| !c.contains("NOT YET IMPLEMENTED")));

Type guard

fn is_implemented_choice(choice: &str) -> bool {
    !choice.contains("NOT YET IMPLEMENTED")
}

Prevention

When it happens

Trigger: Selecting index 2 in the 'Select sync action' menu of 'sd library sync'. Any other path is unreachable (_ => unreachable!()).

Common situations: A user ignores the [NOT YET IMPLEMENTED] label and tries merge anyway; a script drives the wizard and picks the last option.

Related errors


AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16). Data as JSON: /api/errors/79b3e2a88f51df10. Report an issue: GitHub.