Skip to content
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

feat: add fennel-ls #4648

Merged
merged 4 commits into from
Mar 17, 2024
Merged

feat: add fennel-ls #4648

merged 4 commits into from
Mar 17, 2024

Conversation

XeroOl
Copy link
Contributor

@XeroOl XeroOl commented Feb 22, 2024

Adds fennel-ls language server

Copy link
Member

@williamboman williamboman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

packages/fennel-ls/package.yaml Outdated Show resolved Hide resolved
@XeroOl
Copy link
Contributor Author

XeroOl commented Mar 8, 2024

Oh no! I think luarocks needs to be version 3.10+ to be able to install the fennel-ls rock anywhere other than system-wide, due to a bug in luarocks.

@williamboman
Copy link
Member

williamboman commented Mar 13, 2024

Oh no! I think luarocks needs to be version 3.10+ to be able to install the fennel-ls rock anywhere other than system-wide, due to a bug in luarocks.

Ah that's a bit unfortunate. Luarocks packages are currently only tested on macOS, which only recently updated to 3.10+. I've re-ran the test so hopefully it'll pass now.

@williamboman
Copy link
Member

williamboman commented Mar 13, 2024

Ok had to jump through some hoops to add Luarocks support on all platforms on GitHub runners. For some reason the build passes on Windows but fails on Darwin (macOS) and Linux with similar errors (using Luarocks v3.11.0):

sh: src/fennel-ls/message.lua: No such file or directory

Error: Build error: fennel failed to compile the file src/fennel-ls/message.fnl
sh: 1: cannot create src/fennel-ls/handlers.lua: Directory nonexistent

Error: Build error: fennel failed to compile the file src/fennel-ls/handlers.fnl

The command used by mason.nvim to invoke Luarocks is:

luarocks install --tree <install_path> fennel-ls 0.1.2-2

@XeroOl
Copy link
Contributor Author

XeroOl commented Mar 13, 2024

That's a strange error! I will look into it and let you know when I fix it.

@williamboman
Copy link
Member

That's a strange error! I will look into it and let you know when I fix it.

I wasn't able to reproduce when using Luarocks installed via Homebrew. However, I was able to by replicating the installation process of the GitHub actions (basically downloading the Luarocks and Lua source tarballs, unpacking them, and compiling Luarocks against the compiled Lua artifact). Makes me wonder if there's an issue with Luarocks itself, I'll try to investigate further as well.

@williamboman
Copy link
Member

So CI is failing on darwin_x64 even with Luarocks 3.11 installed via Homebrew. I really can't tell where the issue is, but the fact that it keeps failing when using different methods of Luarocks installation is a bit concering. Let's get this merged anyway, I'll disable CI explicitly.

@williamboman williamboman enabled auto-merge (squash) March 17, 2024 20:20
@williamboman williamboman merged commit 93b7f77 into mason-org:main Mar 17, 2024
19 checks passed
@XeroOl
Copy link
Contributor Author

XeroOl commented Mar 22, 2024

The issue was with the luarocks package luarocks-build-fennel, which fennel-ls depends on. @tranzystorekk was kind enough to make a patch that seems to fix the issue, and I've pushed it live to luarocks.

The CI can be enabled now.

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