Skip to content

Commit 2597dfc

Browse files
fix merge
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
1 parent 592b189 commit 2597dfc

8 files changed

Lines changed: 14 additions & 33 deletions

File tree

bindings/java/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ crate-type = ["cdylib"]
1919
sysand-core = { path = "../../core", features = ["std", "filesystem", "networking"] }
2020
camino.workspace = true
2121
jni = "0.21.1"
22-
indexmap = { version = "2.12.1", default-features = false, features = ["serde"] }
23-
url = { version = "2.5.7", default-features = false }
24-
tokio = { version = "1.48.0", default-features = false, features = ["rt"] }
2522
reqwest-middleware = { version = "0.5.0" }
2623
indexmap = { version = "2.13.0", default-features = false, features = ["serde"] }
2724
url = { version = "2.5.8", default-features = false }

bindings/js/package-lock.json

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/workspace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use camino::Utf8PathBuf;
1+
use camino::{Utf8Path, Utf8PathBuf};
22
use fluent_uri::Iri;
33

44
#[cfg(feature = "python")]
@@ -63,7 +63,7 @@ pub enum WorkspaceReadError {
6363
#[error("failed to deserialize `.workspace.json`: {0}")]
6464
Deserialize(#[from] WorkspaceDeserializationError),
6565
#[error("invalid workspace configuration in `{0}`: {1}")]
66-
Validation(PathBuf, WorkspaceValidationError),
66+
Validation(Utf8PathBuf, WorkspaceValidationError),
6767
}
6868

6969
#[derive(Debug, Error)]

sysand/src/commands/add.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::{collections::HashMap, path::Path, sync::Arc};
55

66
use anyhow::Result;
77

8+
use camino::Utf8Path;
89
use fluent_uri::Iri;
910
use sysand_core::{
1011
add::do_add,
@@ -87,7 +88,7 @@ pub fn command_add(
8788
}
8889

8990
#[expect(clippy::too_many_arguments)]
90-
fn resolve_deps<P: AsRef<Path>>(
91+
fn resolve_deps<P: AsRef<Utf8Path>>(
9192
no_sync: bool,
9293
resolution_opts: ResolutionOptions,
9394
config: &Config,

sysand/src/commands/clone.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use camino::{Utf8Path, Utf8PathBuf};
33
use fluent_uri::Iri;
44
use semver::Version;
55

6-
use std::{collections::HashMap, fs, io::ErrorKind, mem, sync::Arc};
6+
use std::{collections::HashMap, fs, io::ErrorKind, sync::Arc};
77

88
use sysand_core::{
99
commands::lock::{DEFAULT_LOCKFILE_NAME, LockOutcome},
@@ -43,13 +43,6 @@ pub fn command_clone(
4343
client: reqwest_middleware::ClientWithMiddleware,
4444
runtime: Arc<tokio::runtime::Runtime>,
4545
) -> Result<()> {
46-
let ResolutionOptions {
47-
index,
48-
default_index,
49-
no_index,
50-
include_std,
51-
} = resolution_opts;
52-
5346
let target: Utf8PathBuf = target.unwrap_or_else(|| ".".into());
5447
let project_path = {
5548
// Canonicalization is performed only for better error messages
@@ -156,7 +149,7 @@ fn obtain_project(
156149
config: &Config,
157150
client: &reqwest_middleware::ClientWithMiddleware,
158151
runtime: &Arc<tokio::runtime::Runtime>,
159-
project_path: PathBuf,
152+
project_path: Utf8PathBuf,
160153
) -> Result<
161154
(
162155
bool,
@@ -361,10 +354,10 @@ pub fn get_project_version<R: ResolveRead>(
361354
/// Removes all files in the directory.
362355
/// All errors are ignored.
363356
fn clean_dir<P: AsRef<Utf8Path>>(path: P) {
364-
let Ok(entries) = fs::read_dir(&path) else {
357+
let Ok(entries) = fs::read_dir(path.as_ref()) else {
365358
return;
366359
};
367-
log::debug!("clearing contents of dir `{}`", path.as_ref().display());
360+
log::debug!("clearing contents of dir `{}`", path.as_ref());
368361

369362
for entry in entries {
370363
let Ok(entry) = entry else { continue };

sysand/src/commands/lock.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
use std::collections::HashMap;
55
use std::sync::Arc;
66

7-
use anyhow::{Result, bail};
7+
use anyhow::Result;
88
use camino::Utf8Path;
9-
use pubgrub::Reporter as _;
109

1110
use sysand_core::{
1211
commands::lock::{DEFAULT_LOCKFILE_NAME, LockOutcome, do_lock_local_editable},
@@ -56,7 +55,7 @@ pub fn command_lock<P: AsRef<Utf8Path>>(
5655
w.projects()
5756
.iter()
5857
.find(|p| Utf8Path::new(&p.path) == path.as_ref())
59-
.map(|p| p.iris)
58+
.map(|p| p.iris.clone())
6059
} else {
6160
None
6261
};
@@ -115,7 +114,7 @@ pub fn create_resolver<P: AsRef<Utf8Path>>(
115114
projects: memory_projects,
116115
},
117116
standard_resolver(
118-
cwd,
117+
Some(cwd),
119118
if local_env_path.is_dir() {
120119
Some(local_env_path)
121120
} else {

sysand/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub fn run_cli(args: cli::Args) -> Result<()> {
289289
Ok(l) => match Lock::from_str(&l) {
290290
Ok(l) => l,
291291
// Include file path in errors
292-
Err(e) => bail!("invalid lockfile `{}`:\n{e}", lockfile.display()),
292+
Err(e) => bail!("invalid lockfile `{lockfile}`:\n{e}"),
293293
},
294294
Err(e) => {
295295
if let ErrorKind::NotFound = e.kind() {
@@ -302,7 +302,7 @@ pub fn run_cli(args: cli::Args) -> Result<()> {
302302
runtime.clone(),
303303
)?
304304
} else {
305-
bail!("failed to read lockfile `{}`: {e}", lockfile.display())
305+
bail!("failed to read lockfile `{lockfile}`: {e}")
306306
}
307307
}
308308
};

sysand/tests/common/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ use camino_tempfile::Utf8TempDir;
77
use rexpect::session::{PtySession, spawn_command};
88
#[cfg(not(target_os = "windows"))]
99
use std::os::unix::process::ExitStatusExt;
10-
use std::path::{Path, PathBuf};
1110
use std::{
1211
error::Error,
13-
io::Write,
1412
process::{Command, Output},
1513
};
1614

0 commit comments

Comments
 (0)