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

fzy-lua fails to install on Windows #11

Closed
mrcjkb opened this issue Mar 7, 2024 · 6 comments · Fixed by #12
Closed

fzy-lua fails to install on Windows #11

mrcjkb opened this issue Mar 7, 2024 · 6 comments · Fixed by #12

Comments

@mrcjkb
Copy link
Contributor

mrcjkb commented Mar 7, 2024

Hey 👋

Attepting luarocks install fzy on Windows fails with

src/match.c(18): fatal error C1083: Cannot open include file: 'strings.h': No such file or directory

https://github.com/nvim-neorocks/rocks-binaries/actions/runs/8191805472/job/22401866175#step:9:815

There are two ways I could think of to fix this:

  1. Use a platform override in the rockspec to prevent it from trying to compile the native library.
  2. Add an adapter header (see this PR). I'm not sure if there are any other headers that might be missing on Windows though.
@swarn
Copy link
Owner

swarn commented Mar 8, 2024

I am confuse!

The match.c code does not use strings.h, it uses the standard string.h. It seems to build on Windows.

...

As I was writing that, I got a horrible feeling, and went and checked and the rockspec. It's referencing a tag that is an older version that does include strings.h.

So, I'll update the rockspec, then update this issue.

@swarn
Copy link
Owner

swarn commented Mar 8, 2024

@mrcjkb , you've clearly been uploading a lot of rockspecs lately, can you give me some tips here?

I ran luarocks upload fzy-scm-1.rockspec --api-key=.... That spec is listed on the luarocks site, but the older spec is still what gets pulled on luarocks install fzy.

Do I need to tag the lastest commit, make a rockspec fzy-1.0.1-1.rockspec that references it, then upload that?

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Mar 8, 2024

@mrcjkb , you've clearly been uploading a lot of rockspecs lately, can you give me some tips here?

I ran luarocks upload fzy-scm-1.rockspec --api-key=.... That spec is listed on the luarocks site, but the older spec is still what gets pulled on luarocks install fzy.

Ah, now I understand. I was confused about why your CI worked fine 😅

The fzy-scm-1.rockspec is an scm rockspec, which luarocks uploads to the dev manifest.
You need a SemVer version for it to be uploaded to the root manifest, which luarocks pulls from by default.
If you run luarocks install fzy scm --dev, it should pull the latest scm version.

Do I need to tag the lastest commit, make a rockspec fzy-1.0.1-1.rockspec that references it, then upload that?

There are different ways you can do this.
One way is to maintain a rockspecs subdirectory with a rockspec for each release.

I maintain a luarocks-tag-release GitHub action that runs automatically whenever you create a tag and generates a release rockspec for you, which it then uploads to luarocks.org.
If you like, I can PR this for you.

@swarn
Copy link
Owner

swarn commented Mar 8, 2024

Wow, I asked just the right guy for help with this. I would appreciate the PR very much. I've add the luarocks API key as repo secret LUAROCKS_API_KEY.

@swarn
Copy link
Owner

swarn commented Mar 8, 2024

I'll reopen this until we're double-plus sure everything is working. The latest rockspec is live on Luarocks now.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Mar 8, 2024

It works! 🎉

@mrcjkb mrcjkb closed this as completed Mar 8, 2024
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 a pull request may close this issue.

2 participants