lua-users home
lua-l archive

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


On 5 November 2015 at 21:27, Sean Conner <sean@conman.org> wrote:
>> >   Just because "org.conman.table" is stored on disk as
>> > "org/conman/table.lua" doesn't necessarily mean "org" is the top level
>> > module here.  It's "org.conman.table".  Yes, this might complicate your
>> > package manager some, but I was able to deal with a ZIP file with
>> > duplicate filenames!
>>
>> The point of contention is that 'some'.
>>
>> If it is so trivial, you would really do me a great favor by contributing a
>> patch that solve this contentious point once and for all.
>
>   As far as I can see, there is no code out there that actually *generates*
> the PKG files that are downloaded.  That is where the change needs to
> happen, in the actual packaging of the Lua modules.  Currently, I see this
> structure:
>
> org
> org/1_0_1+3
> org/1_0_1+3/__meta.lua
> org/1_0_1+3/Linux
> org/1_0_1+3/Linux/x64
> org/1_0_1+3/Linux/x64/-org_conman_env.so
> org/1_0_1+3/Linux/x86
> org/1_0_1+3/Linux/x86/-org_conman_env.so
> org/1_0_1+3/OSX
> org/1_0_1+3/OSX/x64
> org/1_0_1+3/OSX/x64/-org_conman_env.so
> org/1_0_1+3/OSX/x86
> org/1_0_1+3/OSX/x86/-org_conman_env.so
> org/1_0_1+3/Windows
> org/1_0_1+3/Windows/x64
> org/1_0_1+3/Windows/x64/-org_conman_env.dll
> org/1_0_1+3/Windows/x86
> org/1_0_1+3/Windows/x86/-org_conman_env.dll
>
>  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.

Stefano