lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Stefano once stated:
> On 5 November 2015 at 21:27, Sean Conner <sean@conman.org> wrote:
> >
> >  Your problem is assuming that "org" is the name of my module---it isn't
> > (and no, I'm not being sarcastic here).  You made an assumption that "foo"
> > will always be the top level of a module and anything "below" that is a
> > submodule.  And yes, luasocket works that way, and possibly most modules
> > work that way (I don't know, while I have downloaded every rockspec from the
> > LuaRocks website, I haven't don't a full analysis yet) it's not *every*
> > module.  A repackaged, correct, version of this would be (possibly---it's not
> > my project and I have no code to try this with):
> >
> > org_conman_env
> > org_conman_env/1_0_1+3
> > org_conman_env/1_0_1+3/__meta.lua
> > org_conman_env/1_0_1+3/Linux
> > org_conman_env/1_0_1+3/Linux/x64
> > org_conman_env/1_0_1+3/Linux/x64/-org_conman_env.so
> > org_conman_env/1_0_1+3/Linux/x86
> > org_conman_env/1_0_1+3/Linux/x86/-org_conman_env.so
> > org_conman_env/1_0_1+3/OSX
> > org_conman_env/1_0_1+3/OSX/x64
> > org_conman_env/1_0_1+3/OSX/x64/-org_conman_env.so
> > org_conman_env/1_0_1+3/OSX/x86
> > org_conman_env/1_0_1+3/OSX/x86/-org_conman_env.so
> > org_conman_env/1_0_1+3/Windows
> > org_conman_env/1_0_1+3/Windows/x64
> > org_conman_env/1_0_1+3/Windows/x64/-org_conman_env.dll
> > org_conman_env/1_0_1+3/Windows/x86
> > org_conman_env/1_0_1+3/Windows/x86/-org_conman_env.dll
> 
> Among other problems that I can thing of:
> 
> require 'org.conman.env'
> 
> How does the package manager know which of the following is correct?
> 
> org/1_0_1+3/conman_env/...
> org_conman/1_0_1+3/env/...
> org_conman_env/1_0_1+3/...
> 
> Most importantly, the proposed approach does not work with math-evol
> and math-somethingelse.
> They necessarily end up in the same math directory.

  You missed the point.  The point is to make the top level directory named
after the *entire* module name, not just the first portion.  For *every*
module you install.  So that means you get

	Math_Evol/1_13_0+1/...
	Math_RungeKutta/1_8_0+1/...

Did you not see the example I gave for luasocket?  Here it is again:

	ltnl2/2_0_2+1/...
	mime/2_0_2+1/...
	mime_core/2_0_2+1/...
	socket/2_0_2+1/...
	socket_core/2_0_2+1/...
	socket_ftp/2_0_2+1/...
	socket_headers/2_0_2+1/...
	socket_http/2_0_2+1/...

  -spc