-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Conversation
Would turning |
Theoretically, no. We've done that before when we migrated The slightly confusing element to end-users perhaps here is that we'd be actively moving away from a Luarocks that only supports one Lua to potentially 4 Luarocks supporting their own Lua version - So despite supporting multiple Luarocks |
I like this idea generally, seems like a step forward. A couple of questions:
Thanks! |
We could, but like the Python situation I think it would blunt the usefulness of merging luarocks in. Luarocks is an important enough part of the Lua 'experience', with such a wide range of modules that don't necessarily play nicely with differing Lua versions, that IMO it's worth supporting the multi-setup.
It's difficult because the build options used and the way Luarocks builds versioned directories requires such different configure options. I'm open to suggestions, but not sure there's an easier way to handle the requirement to version, sadly.
It's pretty similar to Python. The libraries will never conflict - They'll be installed in The binaries suffer from the Python problem, where one version overrides the other - This only applies to the main There's some caveats in the formula about how to handle this. Luarocks attempts to automatically migrate conflict by changing the exec script names to prevent conflict - In practice though, this method can be a little flawed. The Rocks themselves, and the directories they are installed in will work across updates to either Lua or the internalised Luarocks. We could probably fix the exec script problem by moving the luarocks install to The issue as such is that |
Apologies for the long answer. Hopefully it's more useful than ramble. |
Ok, that makes sense to me. Last bit that confuses me: how will I know which version of luarocks to use? Just depending on the project I'm working on? |
As in, how the heck do I know which modules I should use which Luarocks for? 😸. That's kind of the frustrating thing about Luarocks - The central websites involved don't do a PyPi-esque It's frustrating, and something that would ideally change long-term. A lot of it is still trial-and-error, aside from checking the websites themselves. If I do luarocks-5.2 install example does it work, or does it break? kind of thing, sadly. |
Looks like I may be able |
Fixed the exec persistence issue. Took a couple of extra blocks of code, but nothing too hideous/hacky. I'm relatively happy for this to ⛵ if you are @MikeMcQuaid. |
@@ -65,6 +73,39 @@ def install | |||
ln_s "#{include}", "#{include}/lua5.2" | |||
ln_s "#{lib}/pkgconfig/lua.pc", "#{lib}/pkgconfig/lua5.2.pc" | |||
ln_s "#{lib}/pkgconfig/lua.pc", "#{lib}/pkgconfig/lua-5.2.pc" | |||
|
|||
# This resource must be handed after the main install, since there's a lua dep. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"[handled] after the main install"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crumbs. Well spotted. I read that line about 10 times and still missed the typo 😿
@MikeMcQuaid Anything else need doing here? No rush to merge; Just checking through my 'old' open PRs, seeing what's still relevant, what can be closed, etc. |
if revision > 0 | ||
iargs = "#{version}_#{revision}" | ||
else | ||
iargs = version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can just use pkg_version
here which will do what you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat. That'd certainly be preferable. Will check it out.
One comment and then I'm good to merge this. |
Oh, last thing would be checking the upgrade path for this works well? |
As in does it work with |
Aye, what happens if you're using the old formula and upgrade. Will all your packages be preserved etc. and what happens if the |
Blurgh. We're going to need to enforce the removal of Still think it's a worthwhile thing to do, even if not being able to kill Luarocks entirely ourselves is a pain. What did Homebrew do when the
Yeah they won't get wiped, but they'll be ignored. You'll need to migrate them to the new system once. Essentially the current |
You can't really enforce removal, unfortunately. The best way to do that is probably have the upgrade install nothing (or make it keg-only) so the linking works.
Cool, that's fine but we may want to add a caveat about it. |
There's an existing PR to update |
@MikeMcQuaid Xu merged the |
This PR ‘pythonises’ the Lua setup. There have been requests for us to do this for a while, and it’s a good idea - It’s just taken me a while to finish ironing out. The individual luarocks formula dies entirely, in favour of luarocks being vendored into the two Lua formulae in Homebrew/homebrew with versioned trees. This provides roughly the same experience we deliver with pip and co from Python. Luajit is not yet supported, because it’s being a pain, but Luajit support will land in the semi-near future, as will support for Lua53 in Versions. All 4 installations can sit side-by-side with no non-binary conflict. Binary conflict is handled roughly the same way Python handles it sadly, which is regrettable but presently unavoidable.
Merged into the Lua formulae.
Added 👍 |
From my point of view, making luarocks keg-only outside of this PR wasn't a good idea. It took me a while to figure out why luarocks wasn't available anymore after doing a |
Merged now, thanks @DomT4! |
Thanks Mike! |
The Versions twin of Homebrew/legacy-homebrew#37842
This PR ‘pythonises’ the Lua setup. There have been requests for us to do this for a while, and it’s a good idea - It’s just taken me a while to finish ironing out.
The individual luarocks formula dies entirely, in favour of luarocks being vendored into the two Lua formulae in Homebrew/homebrew with versioned trees. This provides roughly the same experience we deliver with pip and co from Python.
Luajit is not yet supported, because it’s being a pain, but Luajit support will land in the semi-near future, as will support for Lua53 in Versions. All 4 installations can sit side-by-side with no non-binary conflict. Binary conflict is handled roughly the same way Python handles it sadly, which is regrettable but presently unavoidable.