pyrefly: 0.44.2 -> 0.46.0 (#469349)

This commit is contained in:
Gergő Gutyina
2025-12-23 22:07:11 +00:00
committed by GitHub
2 changed files with 22 additions and 10 deletions
+13
View File
@@ -0,0 +1,13 @@
diff --git a/pyrefly/lib/test/lsp/lsp_interaction/configuration.rs b/pyrefly/lib/test/lsp/lsp_interaction/configuration.rs
index edc2db09f..ce33a2774 100644
--- a/pyrefly/lib/test/lsp/lsp_interaction/configuration.rs
+++ b/pyrefly/lib/test/lsp/lsp_interaction/configuration.rs
@@ -56,7 +56,7 @@ fn setup_dummy_interpreter(custom_interpreter_path: &Path) -> PathBuf {
// Create a mock Python interpreter script that returns the environment info
// This simulates what a real Python interpreter would return when queried with the env script
let python_script = format!(
- r#"#!/usr/bin/env bash
+ r#"#!@bash@
if [[ "$1" == "-c" && "$2" == *"import json, sys"* ]]; then
cat << 'EOF'
{{"python_platform": "linux", "python_version": "3.12.0", "site_package_path": ["{site_packages}"]}}
+9 -10
View File
@@ -1,5 +1,7 @@
{
lib,
bash,
replaceVars,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
@@ -8,17 +10,17 @@
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "pyrefly";
version = "0.44.2";
version = "0.46.0";
src = fetchFromGitHub {
owner = "facebook";
repo = "pyrefly";
tag = finalAttrs.version;
hash = "sha256-d0aZQkCt2Yypj2CSav585M6TuoUEwPXpz1oKLjFo6NI=";
hash = "sha256-Owsma92bEwjyYFOb2AOzdLmAYIY398NrR9ztZ0bYhMc=";
};
buildAndTestSubdir = "pyrefly";
cargoHash = "sha256-gXKLzD5JbG62pc0pW5sRQJvBwr1ftu/ZOOXsQ7ZdWIU=";
cargoHash = "sha256-U3VlzjnsPmFlgaXdogqWOyJAv63vpPDULfcmcB5IHXc=";
buildInputs = [ rust-jemalloc-sys ];
@@ -26,18 +28,15 @@ rustPlatform.buildRustPackage (finalAttrs: {
versionCheckProgramArg = "--version";
doInstallCheck = true;
patches = [
(replaceVars ./fix-shebang.patch { bash = lib.getExe bash; })
];
# redirect tests writing to /tmp
preCheck = ''
export TMPDIR=$(mktemp -d)
'';
checkFlags = [
# FIX: tracking on https://github.com/facebook/pyrefly/issues/1667
"--skip=test::lsp::lsp_interaction::configuration::test_pythonpath_change"
"--skip=test::lsp::lsp_interaction::configuration::test_workspace_pythonpath_ignored_when_set_in_config_file"
"--skip=test::lsp::lsp_interaction::notebook_sync::test_notebook_publish_diagnostics"
];
# requires unstable rust features
env.RUSTC_BOOTSTRAP = 1;