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: pass config
  • Loading branch information
nichmor committed May 24, 2024
commit 5bca2fe135389f2492bfc42c61d2163812d56de9
4 changes: 1 addition & 3 deletions src/project/manifest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,9 @@ impl Manifest {
/// Returns what pypi mapping configuration we should use.
/// It can be a custom one in following format : conda_name: pypi_name
/// Or we can use our self-hosted
pub fn pypi_name_mapping_source(&self) -> miette::Result<MappingSource> {
pub fn pypi_name_mapping_source(&self, config: &Config) -> miette::Result<MappingSource> {
match self.parsed.project.conda_pypi_map.clone() {
Some(url) => {
let config = Config::load_global();

// transform user defined channels into rattler::Channel
let channels = url
.keys()
Expand Down
2 changes: 1 addition & 1 deletion src/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/// The dependency types we support
#[derive(Debug, Copy, Clone)]
pub enum DependencyType {
CondaDependency(SpecType),

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Check intra-doc links

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Cargo Lint

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Cargo Lint

unused import: `once_cell::sync::OnceCell`

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Build Binary | Linux-x86_64

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Build Binary | Linux-aarch64

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Build Binary | macOS-x86

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Build Binary | macOS-arm

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Build Binary | Windows

the name `OnceCell` is defined multiple times

Check failure on line 47 in src/project/mod.rs

View workflow job for this annotation

GitHub Actions / Build Binary | Windows-arm

the name `OnceCell` is defined multiple times
PypiDependency,
}

Expand Down Expand Up @@ -402,7 +402,7 @@
pub fn pypi_name_mapping_source(&self) -> &MappingSource {
self.mapping_source.get_or_init(|| {
self.manifest
.pypi_name_mapping_source()
.pypi_name_mapping_source(&self.config)
.expect("mapping source should be ok")
})
}
Expand Down
Loading