Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use local mapping instead of remote #1430

Merged
merged 18 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
misc: remove arc around mapping source
  • Loading branch information
nichmor committed May 24, 2024
commit 11df9911e76c8e46e8fa3d6beda6a13335b78789
4 changes: 2 additions & 2 deletions src/lock_file/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ async fn spawn_solve_conda_environment_task(
let has_pypi_dependencies = group.has_pypi_dependencies();

// Whether we should use custom mapping location
let pypi_name_mapping_location = group.project().pypi_name_mapping_source();
let pypi_name_mapping_location = group.project().pypi_name_mapping_source().clone();

tokio::spawn(
async move {
Expand Down Expand Up @@ -1657,7 +1657,7 @@ async fn spawn_solve_pypi_task(

pypi_mapping::amend_pypi_purls(
environment.project().client().clone(),
&pypi_name_mapping_location,
pypi_name_mapping_location,
&mut conda_records,
None,
)
Expand Down
14 changes: 6 additions & 8 deletions src/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,12 @@ impl Project {
}

/// Returns the custom location of pypi-name-mapping
pub fn pypi_name_mapping_source(&self) -> MappingSource {
self.mapping_source
.get_or_init(|| {
self.manifest
.pypi_name_mapping_source()
.expect("mapping source should be ok")
})
.clone()
pub fn pypi_name_mapping_source(&self) -> &MappingSource {
self.mapping_source.get_or_init(|| {
self.manifest
.pypi_name_mapping_source()
.expect("mapping source should be ok")
})
}

/// Returns the reqwest client used for http networking
Expand Down
Loading