agriffis / neovim

Nightly neovim rpms
https://arongriffis.com/2019/03/02/neovim-nightly-builds
Other
20 stars 0 forks source link

Tree sitter parsers are not built by default #29

Closed yorickpeterse closed 2 months ago

yorickpeterse commented 3 months ago

Neovim 0.10 started using Tree sitter for certain files by default (e.g. Lua), but this package doesn't install these parses by default. The stable/official Fedora package appears to be suffering from the same problem: https://bugzilla.redhat.com/show_bug.cgi?id=2283243.

The result of this is that if you run e.g. nvim --clean foo.lua, you get an error because the parser isn't found.

agriffis commented 3 months ago

@yorickpeterse It's not clear to me what needs to change in the build to fix this. Do you know?

yorickpeterse commented 3 months ago

@agriffis The parsers are built into ./build/lib/nvim/parser. Looking at the spec file, I don't see a mention of ./build/lib (or _libdir or anything like that) anywhere, so I'm guessing the files simply aren't moved into the package. I'm currently not able to look into this deeper, but if desired I can give this a shot tomorrow or so.

agriffis commented 3 months ago

Unfortunately, it's a bit more complicated than that. The Fedora build (and this package) doesn't use the bundled treesitter because distro packaging policy mandates unbundling. Additionally, the bundled build dynamically fetches the parsers from external resources, see https://github.com/agriffis/neovim/blob/copr/cmake.deps/cmake/BuildTreesitterParsers.cmake but the rpm needs to build from versioned sources that are fetched ahead of time.

Looks like Andreas is saying essentially the same thing at https://bugzilla.redhat.com/show_bug.cgi?id=2283243#c2

Whatever fix is applied will need to happen to both the official Fedora package and this one. Preferably the fix should land in Fedora official first. The spec we use here is based on that one.

yorickpeterse commented 3 months ago

@agriffis That sounds reasonable, so I'll keep an eye on the bugzilla issue :)

agriffis commented 2 months ago

This was fixed in Fedora and should also be fixed now here