public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ruff] f44: Patch flaky symlink_inside_project test
@ 2026-09-04 16:38 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-04 16:38 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ruff
Branch : f44
Commit : 0d1924b12d0f08fe6fcdcb21d24bb05972ac5800
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-09-04T14:41:08+01:00
Stats : +54/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ruff/c/0d1924b12d0f08fe6fcdcb21d24bb05972ac5800?branch=f44
Log:
Patch flaky symlink_inside_project test
---
diff --git a/28245.patch b/28245.patch
new file mode 100644
index 0000000..33c09bc
--- /dev/null
+++ b/28245.patch
@@ -0,0 +1,51 @@
+From 6ca0c8ffde8e9ecb21aa623634c1b845efec3eff Mon Sep 17 00:00:00 2001
+From: Xeonacid <h.dwwwwww@gmail.com>
+Date: Wed, 2 Sep 2026 07:42:11 +0200
+Subject: [PATCH] [ty] Relax symlink_inside_project index assertion
+
+unix::symlink_inside_project already documents that the file watcher
+may emit the change for the original path or the symlink path. Applying
+a change event for `bar/baz.py` adds that path to the project index.
+inotify reports the symlink path on some hosts, including riscv64,
+so the strict "original path only" check fails there.
+
+Keep the original path indexed and allow the symlink path as the only
+extra entry.
+---
+ crates/ty/tests/file_watching.rs | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/crates/ty/tests/file_watching.rs b/crates/ty/tests/file_watching.rs
+index 98e2dbf127992..6c88b691f61ee 100644
+--- a/crates/ty/tests/file_watching.rs
++++ b/crates/ty/tests/file_watching.rs
+@@ -2019,6 +2019,9 @@ mod unix {
+ // * PyCharm doesn't update diagnostics if a symlinked module is changed (same as ty).
+ //
+ // That's why I think it's fine to not support this case for now.
++ //
++ // Applying a change event for the symlink path also adds `bar/baz.py` to the project
++ // index. inotify reports that path on some hosts, so allow it as the only extra entry.
+
+ let patched_baz_text = source_text(case.db(), patched_bar_baz_file);
+ let did_update_patched_baz = patched_baz_text.as_str() == "def baz(): print('Version 2')";
+@@ -2033,7 +2036,18 @@ mod unix {
+ bar_baz_text = bar_baz_text.as_str()
+ );
+
+- case.assert_indexed_project_files([patched_bar_baz_file]);
++ let indexed = case.db().project().files(case.db());
++ assert!(
++ indexed.contains(patched_bar_baz_file),
++ "Expected '{patched_bar_baz}' to remain indexed."
++ );
++ for file in &indexed {
++ let path = file.path(case.db());
++ assert!(
++ file == patched_bar_baz_file || file == baz_file,
++ "Indexed project files contains '{path}' which was not expected."
++ );
++ }
+ Ok(())
+ }
+
diff --git a/ruff.spec b/ruff.spec
index bd65776..6521ac1 100644
--- a/ruff.spec
+++ b/ruff.spec
@@ -164,6 +164,9 @@ Source: %{url}/archive/%{version}/ruff-%{version}.tar.gz
Patch: 0001-Downstream-patch-always-find-the-system-wide-ruff-ex.patch
# * ignore tests in vendored annotate-snippets that hang indefinitely:
Patch: 0002-ignore-vendored-annotate-snippets-tests-that-hang-in.patch
+# [ty] Relax symlink_inside_project index assertion - #28245
+# https://github.com/astral-sh/ruff/pull/28245
+Patch: %{url}/pull/28245.patch
BuildSystem: pyproject
BuildOption(install): --assert-license ruff
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-04 16:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04 16:38 [rpms/ruff] f44: Patch flaky symlink_inside_project test Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox