Skip to content

fix(lua): skip selene install on aarch64 platforms #1464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

av1155
Copy link

@av1155 av1155 commented Apr 21, 2025

selene is not compatible with aarch64 (e.g., Raspberry Pi 5). This adds architecture detection to avoid installing selene where unsupported, while preserving all other functionality. This prevents constant failed installs on Nvim start when using Lua pack.


📑 Description

This pull request introduces conditional support for the selene linter based on the system architecture, specifically excluding it on aarch64 systems. It also refactors related configurations to ensure compatibility and maintainability.

Conditional selene Support:

  • Added a check for the system architecture (aarch64) using vim.loop.os_uname().machine and stored the result in a new is_aarch64 variable. (lua/astrocommunity/pack/lua/init.lua, lua/astrocommunity/pack/lua/init.luaR5-R22)
  • Modified mason-null-ls.nvim and mason-tool-installer.nvim configurations to conditionally include selene in the ensure_installed list only if not on aarch64. (lua/astrocommunity/pack/lua/init.lua, lua/astrocommunity/pack/lua/init.luaL35-R77)
  • Updated nvim-lint configuration to exclude selene from linters_by_ft and linters on aarch64 systems. (lua/astrocommunity/pack/lua/init.lua, lua/astrocommunity/pack/lua/init.luaL67-R105)

selene is not compatible with aarch64 (e.g., Raspberry Pi 5). This adds architecture detection to avoid installing selene where unsupported, while preserving all other functionality. This prevents startup errors and failed installs.
Copy link

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • Proper usage of opts table rather than setting things up with the config function.

  • Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

@av1155 av1155 changed the title fix(pack.lua): skip selene install on aarch64 platforms fix(lua): skip selene install on aarch64 platforms Apr 21, 2025
@Uzaaft
Copy link
Member

Uzaaft commented Apr 21, 2025

Selene actually supports and releases arm64/aarch64 binaries. Is it an issue with mason perhaps?

@av1155
Copy link
Author

av1155 commented Apr 21, 2025

Yeah, when the Lua pack is enabled, Mason does not like it.
{ import = "astrocommunity.pack.lua" },

Mason says on each start:
image


  Failed
    ✗ selene
      ▼ Displaying full log
        The current platform is unsupported.

I used to have a workaround in mason.lua, but because a lot has changed recently in Mason and Nvim 0.11, my workaround does not work anymore.

@Uzaaft
Copy link
Member

Uzaaft commented Apr 21, 2025

lets try and upstream it to mason instead. What does the mason logs say?

@av1155
Copy link
Author

av1155 commented Apr 21, 2025

:MasonLog gives the following, related to selene:

[INFO  Mon 21 Apr 2025 14:51:20 EDT] ...Executing installer for Package(name=selene) {}
[ERROR Mon 21 Apr 2025 14:51:20 EDT] ...Installation failed for Package(name=selene) error="The current platform is unsupported."
[INFO  Mon 21 Apr 2025 14:51:27 EDT] ...Executing installer for Package(name=selene) {}
[ERROR Mon 21 Apr 2025 14:51:27 EDT] ...Installation failed for Package(name=selene) error="The current platform is unsupported."
[INFO  Mon 21 Apr 2025 15:38:03 EDT] ...Executing installer for Package(name=selene) {}
[ERROR Mon 21 Apr 2025 15:38:03 EDT] ...Installation failed for Package(name=selene) error="The current platform is unsupported."
[INFO  Mon 21 Apr 2025 15:42:57 EDT] ...Executing installer for Package(name=selene) {}
[ERROR Mon 21 Apr 2025 15:42:57 EDT] ...Installation failed for Package(name=selene) error="The current platform is unsupported."

@av1155
Copy link
Author

av1155 commented Apr 22, 2025

lets try and upstream it to mason instead. What does the mason logs say?

I went ahead and upstreamed it directly to Mason with a fix, as suggested.
Here’s the PR: Kampfkarren/selene#638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants