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

fix(pack): improve compatibility of table.unpack function #107

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

abhijeetsrivastava
Copy link
Contributor

@abhijeetsrivastava
Copy link
Contributor Author

This is my first PR in a community repo, please let me know if I should be doing something different.
I also mentioned this PR in the discord server where I mentioned the issue I was facing

@abhijeetsrivastava abhijeetsrivastava changed the title LuaJit 5.1 doesn't have table.unpack function fix! LuaJit 5.1 doesn't have table.unpack function Mar 29, 2023
@abhijeetsrivastava abhijeetsrivastava changed the title fix! LuaJit 5.1 doesn't have table.unpack function fix!: LuaJit 5.1 doesn't have table.unpack function Mar 29, 2023
@mehalter mehalter changed the title fix!: LuaJit 5.1 doesn't have table.unpack function fix(pack): improve compatibility of table.unpack function Mar 29, 2023
Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

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

We shouldn't override this function like this, we should change where it is called to just (table.unpack or unpack)(...)

Since we are only using it once we can just inline it

lua/astrocommunity/pack/java/java.lua Outdated Show resolved Hide resolved
- found this fix from hrsh7th/nvim-cmp#1017
- this fix is working fine in my local
Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

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

Great! Thanks for this!

@mehalter mehalter merged commit 52b1da3 into AstroNvim:main Mar 29, 2023
owittek pushed a commit to owittek/astrocommunity that referenced this pull request Apr 4, 2023
)

LuaJit 5.1 doesn't have table.unpack function

- found this fix from hrsh7th/nvim-cmp#1017
- this fix is working fine in my local
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