jrblevin / markdown-mode

Emacs Markdown Mode
http://jblevins.org/projects/markdown-mode/
GNU General Public License v3.0
875 stars 160 forks source link

v2.6 ERT test failures on wiki-link-rules and wiki-link-search-under-project with Emacs 29.1 #825

Closed manphiz closed 4 months ago

manphiz commented 4 months ago

When preparing packaging v2.6 for Debian, we encountered 2 ERT test failures on wiki-link-rules and wiki-link-search-under-project. This happens with emacs 29.1. Both tests fail with condition (end-of-file "Error reading from stdin").

Full build log: https://gist.github.com/manphiz/cacca1b994903e4aafd2d0a792bebf42

Backtrace

For wiki-link-rules: https://gist.github.com/manphiz/cacca1b994903e4aafd2d0a792bebf42#file-markdown-mode_2-6-1_amd64-build-L1002 For wiki-link-search-under-project: https://gist.github.com/manphiz/cacca1b994903e4aafd2d0a792bebf42#file-markdown-mode_2-6-1_amd64-build-L1063

Software Versions

syohex commented 4 months ago

I cannot reproduce the issue. I think this could be your environment issue. So please ignore the results.

Reference

manphiz commented 4 months ago

It looks like I can reproduce the test failure using both Emacs 28.2 from Debian Bookworm (stable) or Emacs 29.1 from Debian Sid (unstable). May I ask what your environment setting is like?

Also regarding the org-roam issue, the tests is done directly using emacs without any daemon mode involved, so I think it's probably unrelated.

syohex commented 4 months ago

May I ask what your environment setting is like?

I tested following Emacs on Desktop Ubuntu and Server Ubuntu but I cannot reproduce this issue on every Emacs

manphiz commented 4 months ago

After some debugging, it turns out that default-directory may become empty during the run which broke the tests that relies on its value for project root detection. Setting project-current-directory-override at the beginning of the ERT tests works around this issue (the fix is at [1] if anyone is interested).

As this issue is specific to the build environment and a workaround exists, I'm closing this.

[1] https://salsa.debian.org/emacsen-team/markdown-mode/-/commit/a0ca5da83053230ea7b7f8c795492d173f5c0e63