Skip to content

Commit

Permalink
fix(resolve): prefer official binaries (#1741)
Browse files Browse the repository at this point in the history
* prefer official binaries with secondary targets over quickinstall binaries

* chore(test): add jj-cli to live e2e test
  • Loading branch information
senekor authored Jun 13, 2024
1 parent 38f8eb4 commit 250814f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 5 additions & 6 deletions crates/binstalk/src/ops/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ async fn resolve_inner(
));

handles.extend(
desired_targets
.into_iter()
.map(|(triple, target)| {
resolvers
.iter()
.cartesian_product(desired_targets.into_iter().map(|(triple, target)| {
debug!("Building metadata for target: {target}");

let target_meta = package_info.meta.merge_overrides(
Expand All @@ -117,9 +117,8 @@ async fn resolve_inner(
meta: target_meta,
target_related_info: triple,
})
})
.cartesian_product(resolvers)
.map(|(target_data, f)| {
}))
.map(|(f, target_data)| {
let fetcher = f(
opts.client.clone(),
opts.gh_api_client.clone(),
Expand Down
7 changes: 6 additions & 1 deletion e2e-tests/live.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ unset CARGO_INSTALL_ROOT
# to find versions matching <= 1.3.3
# - `cargo-quickinstall` would test `fetch_crate_cratesio_version_matched` ability
# to find latest stable version.
crates="b3sum@<=1.3.3 [email protected] [email protected] [email protected] [email protected] [email protected] cargo-quickinstall"
crates="b3sum@<=1.3.3 [email protected] [email protected] [email protected] [email protected] [email protected] cargo-quickinstall [email protected]"

CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
export CARGO_HOME
Expand Down Expand Up @@ -54,3 +54,8 @@ echo "$miniserve_version"
[ "$miniserve_version" = "miniserve 0.23.0" ]

cargo-quickinstall -V

jj_version="$(jj --version)"
echo "$jj_version"

[ "$jj_version" = "jj 0.18.0-9fb5307b7886e390c02817af7c31b403f0279144" ]

0 comments on commit 250814f

Please sign in to comment.