-
Notifications
You must be signed in to change notification settings - Fork 112
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
Naming conflict #24
Comments
I'm afraid this is a long standing issue :(. I'm not sure how best to solve this issue since it would cause backwards compatibility problems. When I wrote lua-zlib, I didn't know about lzlib. Suggestions and pull requests are welcomed (as long as it doesn't alienate existing users). |
I filed the bug here rather than on lzlib, as looking through a few projects, your project was (sadly) the less popular one. Maybe if you renamed the library to "lua-zlib" but provided a 'zlib.lua' shim for compatability purposes that just contained: return require "lua-zlib" |
Good idea, although I'm not fond of renaming mine to "lua-zlib". How about "compress.zlib" instead? I think the lzlib project is abandoned :(. Do you want to send a pull request for this? If not, I'll see about getting some time to make this adjustment. Also if you have a better naming idea, let me know. Thanks, |
That doesn't really make sense to me; that sounds like part of a suite of tools for compression; or to something called 'libcompress' or some such.
I'm trying to think of something....
|
any ideas here? |
Perhaps I should create a superset interface so that any API calls that "look" like lzlib act the same as lzlib. I could simply copy over the lzlib code. Thoughts? Thanks, |
I don't know if that's the best idea.... though perhaps it provides us a way out: lzlib isn't maintained as far as I know; so adding a backwards compatible API, then asking the lua community to essentially deprecate lzlib might work. @hishamhm what do you think? luarocks is probably the most important application to convince (though luarocks/luarocks#503 already adds luarocks support for lua-zlib.... so perhaps lua-zlib doesn't even need backwards compatibility) FWIW I did make an abstraction layer of lua-zlib/lzlib: https://github.com/daurnimator/lua-http/blob/master/http/zlib.lua |
Nowadays we also have a compatibility layer in LuaRocks. I think adding a backwards compatible API in lua-zlib is the simplest approach for projects down the road. The lzlib package is under my account in luarocks.org, because I had to tweak Lua 5.3 compatibility into it. Once lua-zlib becomes compatible, I can edit its description to say it's deprecated and direct people to lua-zlib. There are a couple other projects using lzlib in luarocks.org, ideally one should contact them too. |
Thanks for the feedback! I'll work on making lua-zlib backwards compatible with lua-lzlib and make sure it works with Lua 5.3. I should be able to do this in the next month. Thanks, |
Awesome! Make sure to ping me when you're done! |
btw, you should be able to make the backwards compat layer in pure lua. That should make it easy to maintain :) |
Although I like the idea of a pure lua layer, implementing isn't as straight forward (and not as strictly backwards compatible). So, I simply imported the code from lzlib: Feedback is welcomed. I tested this by running Thanks, |
@hishamhm and @daurnimator do you have any comments on my proposal? If I get a thumbs up, then I can upload a new lua rock release and close this issue. Thanks, |
Sounds good to me! Thank you for the initiative! |
Looks good to me. |
I've published this as v1.0.0 on luarocks: https://luarocks.org/modules/brimworks/lua-zlib Thanks, |
Thanks! my test matrix is complete for the first time: daurnimator/lua-http@c9fafa1 |
@hishamhm would you consider pushing people looking at http://luarocks.org/modules/hisham/lzlib over to lua-zlib instead? |
this library has the same 'require' string as lzlib
Installing this module can cause some weird failures around the place, including luarocks, which uses lzlib when installed
Could you rename the shared object lua-zlib gets installed as?
The text was updated successfully, but these errors were encountered: