GNU bug report logs - #79027
xref/pp changes in latest versions?

Previous Next

Package: emacs;

Reported by: Gonzalo Larumbe <gonzalomlarumbe <at> gmail.com>

Date: Tue, 15 Jul 2025 22:06:02 UTC

Severity: normal

Full log


Message #17 received at 79027 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gonzalo Larumbe <gonzalomlarumbe <at> gmail.com>
Cc: 79027 <at> debbugs.gnu.org
Subject: Re: bug#79027: xref/pp changes in latest versions?
Date: Wed, 16 Jul 2025 16:28:46 +0300
> From: Gonzalo Larumbe <gonzalomlarumbe <at> gmail.com>
> Date: Wed, 16 Jul 2025 14:54:29 +0200
> Cc: 79027 <at> debbugs.gnu.org
> 
> The test compares a reference text file generated beforehand using `xref` and `pp` (e.g.
> https://github.com/gmlarumbe/verilog-ext/blob/main/test/ref/xref/ucontroller.xref.defs.el) with a text file
> generated during the test.
> 
> Reference files and current test files are generated using the function `test-hdl-process-file-fn`:
> - Line 84 @
> https://github.com/gmlarumbe/test-hdl/blob/86ed7f9dcb0d0697e6b7ce0a64d82b7245cfade9/test-hdl-common.el
> 
> 
> This particular xref test compares a list of xref objects gathered from a Verilog file using the following test
> function:
> (cl-defun verilog-ext-test-xref-fn (&key refs type)
>   (let (ret-val)
>     (dolist (ref refs (nreverse ret-val))
>       (push (verilog-ext-xref--find-symbol ref type) ret-val))))
> 
> The function `verilog-ext-xref--find-symbol` returns a list of `xref-items` with their respective
> `xref-file-locations` from a hash-table created previously by parsing the file using tree-sitter.
> - Line 40 @ https://github.com/gmlarumbe/verilog-ext/blob/main/verilog-ext-xref.el
> 
> This list is pretty printed to a file using `pp-29` as `pp-default-function` for compatibility in tests between
> Emacs 29 and 30.
> 
> Use of font-lock to have a list of fontified xref matches is customizable. In this case the files are parsed and
> `font-lock-ensure` is run. This did not seem to be a problem and the behaviour is the same for versions from
> 29.1 to 30.1.
> 
> I tried to override the existing definitions on `pp.el` and `xref.el` so that all Emacs versions in CI used the
> same code. However the `snapshot` build still fails.

Why can't you ignore the differences in the 'fontified' property?  It
should be completely uninteresting for your test to pay attention to
that property.  E.g., run the text through remove-text-properties to
remove the 'fontified' property, and then compare.




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.