public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/ruff] f43: Patch flaky symlink_inside_project test
Date: Fri, 04 Sep 2026 16:39:50 GMT [thread overview]
Message-ID: <178853999059.1.8341456198871729639.rpms-ruff-0d1924b12d0f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/ruff
Branch : f43
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=f43
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
reply other threads:[~2026-09-04 16:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178853999059.1.8341456198871729639.rpms-ruff-0d1924b12d0f@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox