lunarmodules / luasocket

Network support for the Lua language
http://lunarmodules.github.io/luasocket/
MIT License
1.85k stars 629 forks source link

What is the correct way to use luarocks? #406

Closed wushu037 closed 1 year ago

wushu037 commented 1 year ago

I'm having two problems

  1. some modules are downloaded with names that don't match the names used by require. E.g. luarocks install luasocket -> require("socket")
  2. does luarocks offer the ability to manage multiple versions of a module? I didn't find a description.

This can be difficult when doing collaborative development and long term development. So:

  1. do I need to add a file to the project that describes which modules are used in the project?
  2. Since there is no version management, it is possible that everyone in the team installs a different version of the module at a different time, so should I put the module in the project directory?

I need to hear from the luarocks team.

catwell commented 1 year ago

I am unsure why you are opening this issue on luasocket, but:

To have a specific set of versions for a project across a team, you can create a rockspec and install with --only-deps

wushu037 commented 1 year ago

@catwell Sorry, I asked in the wrong place. But thank you for your answer.