Closed ionenwks closed 9 months ago
Yes, you were exactly right. If you want to quickly verify tree-sitter parsing online, you can use this. And as you said, removing this magic code (what does it even do?), and also that line does issues:
if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
After removing those 2 hard blocks, it now parsed correctly the ebuild.
Well, just tried again with pkgcheck-0.10.25-r2 which uses a tree-sitter-bash 2023-09-21 snapshot and, as expected, these false positives are gone. Think this can be considered fixed.
Thanks to everyone involved.
I still need to update the bundled C code to use the newest version (doesn't affect ::gentoo ebuilds, since they use system version).
Reporting for the record, but may not be worth fixing.
aka with gentoo.git at cbafd7b7750f162971e18fd80474868f05ce3825 in app-emulation/wine-vanilla (or staging):
But:
Goes away if this earlier horrible block is removed:
Not looked further but I have little doubt that it's tree-sitter-bash being confused by this, vim is not able to highlight this stuff properly either.
Could always use temporary variables to avoid triggering it. For now there's a note in the ebuild so these aren't removed when they shouldn't.