-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Meta issue about lua ecosystem progress #56398
Comments
Some nice things that would require upstream luarocks changes (from a brief preliminary investigation):
None of these are super necessary, but all would be potentially useful. These would require changes to luarocks to make it capable of searching multiple rocks trees for the relevant operations. It already does this for They would also need changes to add a way to have |
I noticed that some packages which use Lua, (e.g AwesomeWM and Neovim) use an old version of Lua (5.2 && 5.1 - respectively). As a beginner Nixos user I'm not sure if it is easily override-able but I think it'd be worth mentioning that nixpkgs should use 5.3 as the default version of Lua for these packages' inputs. |
why is that ? lua5.2 looks standard; 5.3 qnd 5.4 seem to have breaking changes. As for neovim they explicitly require 5.1 |
As for Neovim, you are correct but as for AwesomeWM, anything higher than 5.1 is fine. They both support LuaJIT as well. I'm not sure what should be dictated as nixpkgs' policy but my opinion is that Lua 5.3 should be treated as the default as it's considered the latest version upstream. You are right that it has breaking changes and that's why Neovim Neovim explicitly requires 5.1 but this is an upstream issue, not nixpkgs'. Additionally, I think that in the specific case of Neovim, since LuaJIT is supported as well EDIT: The default Neovim build uses LuaJIT - it surprised me since it's inputs are |
I suspect moving to lua53 would break many things. lua versions are different between eachother. I've added the support in nix for luarocks mirrors so don't be surprised if luarocks-nix generates some strange urls. I've also moved the luarocks-nix repository to nix-community. |
@grwlf Many packages are marked broken in pkgs/applications/science/machine-learning/torch/torch-distro.nix . What do you think about replacing them with the current lua infrastructure ? |
@teto how about removing torch-distro completely? Sadly upstream didn't have any activity since 2017. |
lua-torch is no longer maintained (the codebase was migrated to pytorch) and communities have been marked as non-existent. I think removing torch is valid. Doing so would also close #71888. See https://github.com/torch/torch7#development-status |
@teto Hi. I think it is OK to remove old torch files. I may be listed as a maintainer of some of them, but actually I don't plan to maintain anything because my focus shifted towards TF/pytorch nowdays.. |
ok thanks for the update. I guess we can remove it then. I was hoping someone |
See NixOS#71888 and NixOS#56398 To sump up, development has moved on to other technologies than lua: https://github.com/torch/torch7#development-status and the current packages are broken anyway.
See #71888 and #56398 To sump up, development has moved on to other technologies than lua: https://github.com/torch/torch7#development-status and the current packages are broken anyway.
See NixOS#71888 and NixOS#56398 To sump up, development has moved on to other technologies than lua: https://github.com/torch/torch7#development-status and the current packages are broken anyway. (cherry picked from commit 05b6836)
See NixOS#71888 and NixOS#56398 To sump up, development has moved on to other technologies than lua: https://github.com/torch/torch7#development-status and the current packages are broken anyway. (cherry picked from commit 05b6836)
See NixOS#71888 and NixOS#56398 To sump up, development has moved on to other technologies than lua: https://github.com/torch/torch7#development-status and the current packages are broken anyway. (cherry picked from commit 05b6836)
I marked this as stale due to inactivity. → More info |
@Mic92 @timokau with the rise of a the lua ecosystem with neovim 0.5, I am looking at ways to consolidate dependency management in that ecosystem (with #131499 for instance). The "maintainers/scripts/update-luarocks-packages: shellscript is not up to the task anymore so I was considerng adaptin pkgs/misc/vim-plugins/update.py and pluginupdate.py to generate pkgs/development/lua-modules/generated-packages.nix as well. |
Sorry for the late response. It has been a while since I touched the vim plugin infrastructure and I don't know much about lua. I think you're more up to date on both of these things than me, so I defer to you :) |
status update:
While investigating how to reconcile vim plugins and lua packages, I found out this luarocks config element
that creates a flat hierarchy and could reduce the number of nested folders in our nix packages. |
big changes in #140801 to remove the use of EDIT: fixed link |
#166162 fixes the issue we had on luv that was blocking luarocks to 3.2. We can now bump it to 3.8. One problem is that handling of LUA_PATH across nixpkgs is very heterogeneous, and so it makes harder to make some global changes. I think it's heterogeneous partly because lua utilities are broken. For instance the LUA_PATH generation hook removes the defaults from the lua interpreter (";;"). Many modules hardcode the different lua paths instead of using e.g. wrapLuaProgram, luaPathList from pkgs/development/lua-modules/lib.nix . I believe wrapLuaProgram is broken so let's first fix this and add some tests. I would welcome some help as I wont likely be able to do it anytime. |
I've merged #195869 that adds a testing infra for the interpreter, which I hope will help prevent naive regressions in the future. I've also merged #195732 which should hopefully allow to have the best of both worlds for neovim plugins: automatic dependency management from the rockspec + uptodate plugins via the vim plugin updater. Next step will be to track every per-package custom nix code for lua and replace it with code from the luaLib so that I can configure flat installs in luaLib and it will affect all of nixpkgs. |
Here's a GitHub Search query that can perhaps help with that: https://github.com/search?q=repo%3ANixOS%2Fnixpkgs+lang%3Anix+lua+NOT+wrapLuaPrograms+NOT+withPackages&type=code There are definitely some false positives, but I'm also seeing some other packages could use some love. |
More packages that could use TLC (pure Lua packages, most likely compatible with the neo-builders):
|
Issue description
Meta issue about changes to how lua is handled in nixpkgs (obsoletes #33903).
Possibie improvements
implement a lua.mkDerivationexternal_deps_dirs = {}
(https://github.com/luarocks/luarocks/wiki/Paths-and-external-dependencies)Here is an upstreaming roadmap:
quvi(quvi: drop #269966)move packages from torch-distro.nix to the generated ones torchPackages, torch-repl: remove #81173with self;
in generated-packages.nix . I have a (messy) working prototype at teto@dde3bd2lua_modules_path = ""
that creates a flat hierarchy and could reduce the number of nested folders in our nix packages. Investigate its usage.The text was updated successfully, but these errors were encountered: