Skip to content

Commit

Permalink
Temporarily default to primitive resolver (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr authored Jan 17, 2025
1 parent ee7f7a2 commit 62ed793
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 66 deletions.
11 changes: 10 additions & 1 deletion scarb/src/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ pub async fn resolve(
let s = var.as_str();
s == "true" || s == "1"
})
.unwrap_or(false);
// Defaults to primitive!
.unwrap_or(true);
if algo_primitive {
primitive::resolve(summaries, registry, lockfile).await
} else {
Expand Down Expand Up @@ -252,6 +253,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn backtrack_1() {
check(
registry![
Expand All @@ -268,6 +270,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn backtrack_2() {
check(
registry![
Expand Down Expand Up @@ -313,6 +316,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn sub_dependencies() {
check(
registry![
Expand Down Expand Up @@ -341,6 +345,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn unsatisfied_version_constraint() {
check(
registry![("foo v2.0.0", []),],
Expand All @@ -359,6 +364,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn no_matching_transient_dependency_1() {
check(
registry![
Expand All @@ -375,6 +381,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn no_matching_transient_dependency_2() {
check(
registry![
Expand All @@ -395,6 +402,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn no_matching_transient_dependency_3() {
check(
registry![
Expand Down Expand Up @@ -509,6 +517,7 @@ mod tests {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn lock_conflict_1() {
check_with_lock(
registry![("foo v1.0.0", []),],
Expand Down
1 change: 1 addition & 0 deletions scarb/tests/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ fn path_version() {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn runs_resolver_if_network_is_allowed() {
let t = TempDir::new().unwrap();

Expand Down
2 changes: 2 additions & 0 deletions scarb/tests/git_source_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use scarb_test_support::command::Scarb;
use scarb_test_support::project_builder::{Dep, DepBuilder, ProjectBuilder};

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn https_something_happens() {
thread::scope(|ts| {
let server = TcpListener::bind("127.0.0.1:0").unwrap();
Expand Down Expand Up @@ -48,6 +49,7 @@ fn https_something_happens() {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn ssh_something_happens() {
thread::scope(|ts| {
let server = TcpListener::bind("127.0.0.1:0").unwrap();
Expand Down
67 changes: 2 additions & 65 deletions scarb/tests/http_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,6 @@ fn usage() {
###
GET /index/3/b/bar.json
accept: */*
accept-encoding: gzip, br, deflate
host: ...
if-none-match: ...
user-agent: ...
304 Not Modified
content-length: 0
etag: ...
###
GET /bar-1.0.0.tar.zst
accept: */*
accept-encoding: gzip, br, deflate
Expand Down Expand Up @@ -161,19 +148,6 @@ fn publish_verified() {
###
GET /index/3/b/bar.json
accept: */*
accept-encoding: gzip, br, deflate
host: ...
if-none-match: ...
user-agent: ...
304 Not Modified
content-length: 0
etag: ...
###
GET /bar-1.0.0.tar.zst
accept: */*
accept-encoding: gzip, br, deflate
Expand All @@ -191,6 +165,7 @@ fn publish_verified() {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn not_found() {
let mut registry = HttpRegistry::serve(None);
registry.publish(|t| {
Expand Down Expand Up @@ -254,6 +229,7 @@ fn not_found() {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn missing_config_json() {
let registry = HttpRegistry::serve(None);
fs::remove_file(registry.child("api/v1/index/config.json")).unwrap();
Expand Down Expand Up @@ -377,19 +353,6 @@ fn caching() {
###
GET /index/3/b/bar.json
accept: */*
accept-encoding: gzip, br, deflate
host: ...
if-none-match: ...
user-agent: ...
304 Not Modified
content-length: 0
etag: ...
###
GET /bar-1.0.0.tar.zst
accept: */*
accept-encoding: gzip, br, deflate
Expand Down Expand Up @@ -428,32 +391,6 @@ fn caching() {
304 Not Modified
content-length: 0
etag: ...
###
GET /index/3/b/bar.json
accept: */*
accept-encoding: gzip, br, deflate
host: ...
if-none-match: ...
user-agent: ...
304 Not Modified
content-length: 0
etag: ...
###
GET /index/3/b/bar.json
accept: */*
accept-encoding: gzip, br, deflate
host: ...
if-none-match: ...
user-agent: ...
304 Not Modified
content-length: 0
etag: ...
"#]];
expected.assert_eq(&registry.logs());
}
Expand Down
3 changes: 3 additions & 0 deletions scarb/tests/local_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ fn usage() {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn not_found() {
let mut registry = LocalRegistry::create();
registry.publish(|t| {
Expand Down Expand Up @@ -75,6 +76,7 @@ fn not_found() {
// TODO(mkaput): Test path dependencies overrides.

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn empty_registry() {
let registry = LocalRegistry::create();

Expand All @@ -100,6 +102,7 @@ fn empty_registry() {
}

#[test]
#[ignore = "TODO(#1883): Unignore after fixing pubgrub and changing default registry."]
fn url_pointing_to_file() {
let registry_t = TempDir::new().unwrap();
let registry = registry_t.child("r");
Expand Down

0 comments on commit 62ed793

Please sign in to comment.