Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934041 - app-editors/helix: Discussion to re-introduce 'grammars' USE flag
Summary: app-editors/helix: Discussion to re-introduce 'grammars' USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-11 10:57 UTC by Jonas Frei
Modified: 2024-07-23 05:27 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Frei 2024-06-11 10:57:55 UTC
In hindsight, I'm not sure if it was the right call to remove the USE flag. Users are confused about the change, see e.g. [933727](https://bugs.gentoo.org/show_bug.cgi?id=933727). And while we may update the Wiki and update the einfos to be more specific, I think it's not great UX if users have to do these things manually. And I'm quite sure that most users will want the grammars installed, that's why it was enabled by default before. Now, most users will have to perform manual actions to have a good experience.

Also, I think there was some confusion about fetching the grammar sources (see https://github.com/gentoo/gentoo/pull/36660):
> Fetching grammars is done with git, therefore doing that during the package build is not the best.

This was not the case. The grammar sources are included with the source tarball - There is no need for git to fetch anything during build time, everything is there. And the message with complains about "unsafe directories" was only a warning, not a blocker - right? Also, when running `hx --fetch` the sources are downloaded to ~/.config/helix/runtime/grammars and the compiled libraries (*.so) will also be there, which is highly unusual.

I think we should reconsider this.

Reproducible: Always
Comment 1 Joonas Niilola gentoo-dev 2024-06-11 11:12:57 UTC
Also adding parona to CC who had an idea how to fix this. 

Thanks for looking into it!
Comment 2 Larry the Git Cow gentoo-dev 2024-07-23 05:27:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10f4218cb62f02b5ecfcaa97a877dc81f06cd944

commit 10f4218cb62f02b5ecfcaa97a877dc81f06cd944
Author:     Steffen Winter <steffen.winter@proton.me>
AuthorDate: 2024-07-17 13:05:18 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-07-23 05:26:49 +0000

    app-editors/helix: re-add grammar USE flag
    
    This also patches two tree-sitter parsers which wouldn't built with
    the newer stricter compilers regarding C11.
    
    Closes: https://bugs.gentoo.org/901107
    Closes: https://bugs.gentoo.org/912050
    Closes: https://bugs.gentoo.org/918941
    Closes: https://bugs.gentoo.org/933727
    Closes: https://bugs.gentoo.org/934041
    
    Signed-off-by: Steffen Winter <steffen.winter@proton.me>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../helix-23.10-tree-sitter-d-gnu-extension.patch  | 65 ++++++++++++++++++++++
 ...x-23.10-tree-sitter-rescript-implicit-int.patch | 38 +++++++++++++
 ...helix-23.10-r2.ebuild => helix-23.10-r3.ebuild} | 28 +++++++---
 .../{helix-24.03.ebuild => helix-24.03-r1.ebuild}  | 26 ++++++---
 app-editors/helix/metadata.xml                     |  3 +
 5 files changed, 142 insertions(+), 18 deletions(-)