Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72647 - [pacman-contrib] 1.4.0-4: parentheses in optdepends break syntax highlighting in vim

Attached to Project: Community Packages
Opened by Pascal Ernster (hardfalcon) - Saturday, 06 November 2021, 07:48 GMT
Last edited by Andreas Radke (AndyRTR) - Wednesday, 17 November 2021, 22:21 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Johannes Löthberg (demize)
Daniel M. Capella (polyzen)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

In PKGBUILD scripts, optdepends() array members may contain parentheses in the text describing what features the respective optdepend is needed for. However, using parentheses currently breaks syntax highlighting since the closing parenthesis inside the descriptive text string is misinterpreted as closing parenthesis for the whole optdepends() array, which in turn results in the closing string delimiter (" or ') being ignored and thus essentially the whole syntax highlighting for the rest of the file going bonkers.

Here are two examples of PKGBUILDs affected by this issue:

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gnome-shell-extension-emoji-selector-git#n12

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tilp#n16

Note that the issue only occurs if the optdepends() array is actually matched by the corresponding optdepends syntax highlighting rule, which requires the array to be at the beginning of the line and not being preceded by any whitespace/indention. For this reason, this bug doesn't occur with the following PKGBUILD:

https://github.com/archlinux/svntogit-packages/blob/packages/gvfs/trunk/PKGBUILD#L55

I've attached a patch which fixes the parentheses issue on my machine.
This task depends upon

Comment by Pascal Ernster (hardfalcon) - Saturday, 06 November 2021, 19:09 GMT
Turns out my patch is buggy incorrect and causes other syntax highlighting issues, so please don't merge the above patch. The issue remains to be solved.

Loading...