Skip to content

Commit 503b1d8

Browse files
committed
Rename resolution -> resolve or solution
1 parent 165d3b6 commit 503b1d8

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

murek/src/ops/compile.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use cairo_lang_compiler::CompilerConfig;
77
use crate::core::workspace::Workspace;
88
use crate::core::PackageId;
99
use crate::ops;
10-
use crate::ops::WorkspaceResolution;
10+
use crate::ops::WorkspaceResolve;
1111

1212
#[tracing::instrument(skip_all, level = "debug")]
1313
pub fn compile(ws: &Workspace<'_>, on_diagnostic: Box<dyn FnMut(String)>) -> Result<()> {
@@ -35,24 +35,21 @@ pub fn compile(ws: &Workspace<'_>, on_diagnostic: Box<dyn FnMut(String)>) -> Res
3535
Ok(())
3636
}
3737

38-
fn build_project_config(
39-
member_id: PackageId,
40-
resolution: &WorkspaceResolution,
41-
) -> Result<ProjectConfig> {
42-
let crate_roots = resolution
38+
fn build_project_config(member_id: PackageId, resolve: &WorkspaceResolve) -> Result<ProjectConfig> {
39+
let crate_roots = resolve
4340
.resolve
4441
.collect_compilation_unit_of(member_id)
4542
.iter()
4643
.map(|id| {
47-
let pkg = &resolution.packages[id];
44+
let pkg = &resolve.packages[id];
4845
(pkg.id.name.clone(), pkg.source_dir())
4946
})
5047
.collect();
5148

5249
let content = ProjectConfigContent { crate_roots };
5350

5451
Ok(ProjectConfig {
55-
base_path: resolution.packages[&member_id].root().into(),
52+
base_path: resolve.packages[&member_id].root().into(),
5653
content,
5754
})
5855
}

murek/src/ops/resolve.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::core::workspace::Workspace;
1111
use crate::internal::asyncx::AwaitSync;
1212
use crate::resolver;
1313

14-
pub struct WorkspaceResolution {
14+
pub struct WorkspaceResolve {
1515
pub resolve: Resolve,
1616
pub packages: HashMap<PackageId, Package>,
1717
}
@@ -22,7 +22,7 @@ pub struct WorkspaceResolution {
2222
skip_all,
2323
fields(root = ws.root().display().to_string())
2424
)]
25-
pub fn resolve_workspace(ws: &Workspace<'_>) -> Result<WorkspaceResolution> {
25+
pub fn resolve_workspace(ws: &Workspace<'_>) -> Result<WorkspaceResolve> {
2626
async {
2727
let source_map = SourceMap::preloaded(ws.members(), ws.config());
2828
let mut registry_cache = RegistryCache::new(source_map);
@@ -41,7 +41,7 @@ pub fn resolve_workspace(ws: &Workspace<'_>) -> Result<WorkspaceResolution> {
4141
// so the `download` calls in this method should be cheap, but this may change the future.
4242
let packages = collect_packages_from_resolve_graph(&resolve, &mut registry_cache).await?;
4343

44-
Ok(WorkspaceResolution { resolve, packages })
44+
Ok(WorkspaceResolve { resolve, packages })
4545
}
4646
.await_sync()
4747
}

murek/src/resolver/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ pub async fn resolve(summaries: &[Summary], registry: &mut dyn Registry) -> Resu
100100
incompatibilities.sort();
101101
let incompatibilities = incompatibilities.join("\n");
102102
bail!(formatdoc! {"
103-
Version resolution failed:
103+
Version solving failed:
104104
{incompatibilities}
105105
106-
Scarb does not have real version resolution algorithm yet.
106+
Scarb does not have real version solving algorithm yet.
107107
Perhaps in the future this conflict could be resolved, but currently,
108108
please upgrade your dependencies to use latest versions of their dependencies.
109109
"});
@@ -303,10 +303,10 @@ mod tests {
303303
// "foo v1.0.0 (/main)"
304304
// ]),
305305
Err(indoc! {"
306-
Version resolution failed:
306+
Version solving failed:
307307
- bar v2.0.0 (/main/) cannot use baz v1.0.0 (/main/), because bar requires baz ^2.0.0
308308
309-
Scarb does not have real version resolution algorithm yet.
309+
Scarb does not have real version solving algorithm yet.
310310
Perhaps in the future this conflict could be resolved, but currently,
311311
please upgrade your dependencies to use latest versions of their dependencies.
312312
"}),
@@ -333,10 +333,10 @@ mod tests {
333333
// "foo v2.9.0 (/main)"
334334
// ]),
335335
Err(indoc! {"
336-
Version resolution failed:
336+
Version solving failed:
337337
- foo v2.7.0 (/main/) cannot use baz v2.1.0 (/main/), because foo requires baz ~1.7.1
338338
339-
Scarb does not have real version resolution algorithm yet.
339+
Scarb does not have real version solving algorithm yet.
340340
Perhaps in the future this conflict could be resolved, but currently,
341341
please upgrade your dependencies to use latest versions of their dependencies.
342342
"}),

0 commit comments

Comments
 (0)