diff --git a/package/src/test.rs b/package/src/test.rs index 5f7e85b..e0a7f7e 100644 --- a/package/src/test.rs +++ b/package/src/test.rs @@ -320,7 +320,13 @@ fn test_pants_bootstrap_handling(scie_pants_scie: &Path) { // a need to restart. let output = execute( Command::new(scie_pants_scie) - .args(["--no-pantsd", "-V"]) + .args([ + "--no-pantsd", + // Work around https://github.com/pantsbuild/pants/issues/21863, which results in + // irrelevant nailgun-related log lines + "--no-process-execution-local-enable-nailgun", + "-V", + ]) .stderr(Stdio::piped()), ) .unwrap(); @@ -1189,6 +1195,18 @@ fn test_pants_bootstrap_urls(scie_pants_scie: &Path) { // A fresh directory to ensure the downloads happen fresh. let scie_base = tmpdir.path().join("scie-base"); + // Set up a pants.toml + let pants_release = "2.18.0rc1"; + let pants_toml_content = format!( + r#" + [GLOBAL] + pants_version = "{pants_release}" + "# + ); + let project_dir = tmpdir.path().join("project"); + let pants_toml = project_dir.join("pants.toml"); + write_file(&pants_toml, false, pants_toml_content).unwrap(); + // The file that we'll plop our URL overrides into... let urls_json = tmpdir.path().join("urls.json"); // ... plus helpers to write to it, we start with the `ptex` key/value of this scie-pants's @@ -1217,7 +1235,6 @@ fn test_pants_bootstrap_urls(scie_pants_scie: &Path) { // Reference data for the Pants we'll try to install (NB. we have to force new-enough version of // Pants to install via PEXes, older versions go via PyPI which isn't managed by // PANTS_BOOTSTRAP_URLS) - let pants_release = "2.18.0rc1"; let platforms = [ "darwin_arm64", "darwin_x86_64", @@ -1235,7 +1252,7 @@ fn test_pants_bootstrap_urls(scie_pants_scie: &Path) { .arg("-V") .env("PANTS_BOOTSTRAP_URLS", &urls_json) .env("SCIE_BASE", &scie_base) - .env("PANTS_VERSION", pants_release); + .current_dir(&project_dir); // Part 1: Validate that we attempt to download the CPython interpreter from (invalid) override // URLs @@ -1295,14 +1312,28 @@ fn test_pants_bootstrap_stdout_silent(scie_pants_scie: &Path) { issue = issue_link!(20315, "pantsbuild/pants") ); let tmpdir = create_tempdir().unwrap(); + + let scie_base_dir = tmpdir.path().join("scie-base"); + + let pants_release = "2.19.1"; + let pants_toml_content = format!( + r#" + [GLOBAL] + pants_version = "{pants_release}" + "# + ); + let project_dir = tmpdir.path().join("project"); + let pants_toml = project_dir.join("pants.toml"); + write_file(&pants_toml, false, pants_toml_content).unwrap(); + // Bootstrap a new unseen version of Pants to verify there is no extra output on stdout besides // the requested output from the pants command. let (output, _stderr) = assert_stderr_output( Command::new(scie_pants_scie) .arg("-V") - .env("PANTS_VERSION", "2.19.1") + .current_dir(&project_dir) // Customise where SCIE stores its caches to force a bootstrap... - .env("SCIE_BASE", tmpdir.path()) + .env("SCIE_BASE", scie_base_dir) .stdout(Stdio::piped()), // ...but still assert bootstrap messages to ensure we actually bootstrapped pants during this execution. vec![ diff --git a/pants.toml b/pants.toml index 5623f32..7bdb35a 100644 --- a/pants.toml +++ b/pants.toml @@ -1,5 +1,5 @@ [GLOBAL] -pants_version = "2.21.0" +pants_version = "2.23.0" backend_packages = [ "pants.backend.python", @@ -8,6 +8,9 @@ backend_packages = [ "pants.backend.python.typecheck.mypy", ] +# FIXME #421: remove this once scie-pants's CI doesn't use these versions +allow_deprecated_macos_before_12 = true + [anonymous-telemetry] enabled = true repo_id = "e0b99427-9bc2-4f6a-b197-f5f378849b15"