Skip to content

Commit 9c319dc

Browse files
committed
Try removing local_path
1 parent 0c56d7d commit 9c319dc

File tree

5 files changed

+1
-23
lines changed

5 files changed

+1
-23
lines changed

crate_universe/src/api/lockfile.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ mod test {
176176
},
177177
target: String::from("anyhow"),
178178
alias: None,
179-
local_path: None,
180179
},
181180
CrateDependency {
182181
id: CrateId {
@@ -185,7 +184,6 @@ mod test {
185184
},
186185
target: String::from("reqwest"),
187186
alias: None,
188-
local_path: None,
189187
},
190188
],
191189
);

crate_universe/src/context/crate_context.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use std::collections::{BTreeMap, BTreeSet};
44

5-
use camino::Utf8PathBuf;
65
use cargo_metadata::{Node, Package, PackageId};
76
use serde::{Deserialize, Serialize};
87

@@ -26,11 +25,6 @@ pub struct CrateDependency {
2625
/// Some dependencies are assigned aliases. This is tracked here
2726
#[serde(default, skip_serializing_if = "Option::is_none")]
2827
pub alias: Option<String>,
29-
30-
/// Local path of this dependency if provided. This captures local paths from both the
31-
/// `[dependencies]` table and the `[patches]` table so they can be used in rendering.
32-
#[serde(default, skip_serializing_if = "Option::is_none")]
33-
pub(crate) local_path: Option<Utf8PathBuf>,
3428
}
3529

3630
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)]
@@ -392,10 +386,6 @@ impl CrateContext {
392386
id: CrateId::new(pkg.name.clone(), pkg.version.clone()),
393387
target,
394388
alias: dep.alias,
395-
local_path: match source_annotations.get(&dep.package_id) {
396-
Some(SourceAnnotation::Path { path }) => Some(path.clone()),
397-
_ => None,
398-
},
399389
}
400390
};
401391

@@ -493,10 +483,6 @@ impl CrateContext {
493483
id: current_crate_id,
494484
target: target.crate_name.clone(),
495485
alias: None,
496-
local_path: match source_annotations.get(&annotation.node.id) {
497-
Some(SourceAnnotation::Path { path }) => Some(path.clone()),
498-
_ => None,
499-
},
500486
},
501487
None,
502488
);

crate_universe/src/context/platforms.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ mod test {
135135
id: CrateId::new("mock_crate_b".to_owned(), VERSION_ZERO_ONE_ZERO),
136136
target: "mock_crate_b".to_owned(),
137137
alias: None,
138-
local_path: None,
139138
},
140139
None,
141140
);
@@ -194,7 +193,6 @@ mod test {
194193
id: CrateId::new("mock_crate_b".to_owned(), VERSION_ZERO_ONE_ZERO),
195194
target: "mock_crate_b".to_owned(),
196195
alias: None,
197-
local_path: None,
198196
},
199197
Some(configuration),
200198
);
@@ -281,7 +279,6 @@ mod test {
281279
id: CrateId::new("mock_crate_b".to_owned(), VERSION_ZERO_ONE_ZERO),
282280
target: "mock_crate_b".to_owned(),
283281
alias: None,
284-
local_path: None,
285282
},
286283
Some(configuration.clone()),
287284
);
@@ -348,7 +345,6 @@ mod test {
348345
id: CrateId::new("mock_crate_b".to_owned(), VERSION_ZERO_ONE_ZERO),
349346
target: "mock_crate_b".to_owned(),
350347
alias: None,
351-
local_path: None,
352348
},
353349
Some(configuration.clone()),
354350
);

crate_universe/src/rendering.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,6 @@ mod test {
20252025
// this is identical to what we have in the `name` attribute
20262026
// which creates conflict in `render_module_build_file`
20272027
alias: Some("mock_crate".into()),
2028-
local_path: None,
20292028
}])),
20302029
..Default::default()
20312030
},
@@ -2151,13 +2150,11 @@ mod test {
21512150
id: dependency_id.clone(),
21522151
target: "my_dependency".into(),
21532152
alias: None,
2154-
local_path: None,
21552153
},
21562154
CrateDependency {
21572155
id: dependency_id,
21582156
target: "my_dependency".into(),
21592157
alias: Some("my_dependency_other".into()),
2160-
local_path: None,
21612158
},
21622159
])),
21632160
..Default::default()

crate_universe/src/splicing/splicer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ mod test {
637637
use super::*;
638638

639639
use std::fs::File;
640+
use std::path::PathBuf;
640641
use std::str::FromStr;
641642

642643
use cargo_metadata::PackageId;

0 commit comments

Comments
 (0)