nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.83k stars 304 forks source link

Shared libs #9

Closed jollyroger closed 13 years ago

jollyroger commented 13 years ago

Actually a bit modified previous pull request ( nicolasff/webdis#7 )to build webdis with simple make command. Note that with previous pull request you should at least configure jansson library before actually building webdis since there is no jansson.h file in git repository, it should be generated by ./configure script. Now the problem is solved.

nicolasff commented 13 years ago

Hello,

Thanks for your contribution. I'm not sure about git submodules, because I'd like to keep the code easy to clone. I had a submodule in another project and had users complaining about missing dependencies because they hadn't pulled the submodules.

As for the tagged dependencies, I talked with Pieter from the Redis project so that he would fix an issue related to pub/sub, and was using bleeding-edge code. Is it even possible to fetch a particular tag as a submodule?

I think this pull request goes in the right direction, but that webdis is still a very young project that doesn't need it yet. Maybe this will make more sense once both hiredis and jansson are packaged and distributed by Debian?

Nicolas

jollyroger commented 13 years ago

Thanks for your response!

I'm not sure about git submodules, because I'd like to keep the code easy to clone. I had a submodule in another project and had users complaining about missing dependencies because they hadn't pulled the submodules.

I believe there's always a place in README.markdown for these purposes, isn't it? I can add few notes there, if you wish. All you need to pull the code is just these commands:

git clone https://github.com/nicolasff/webdis.git
cd webdis
git submodule init
git submodule update

Maybe I should add some warnings to the Makefile so he would complain about missing submodules and advice the commands needed to run?

As for the tagged dependencies, I talked with Pieter from the Redis project so that he would fix an issue related to pub/sub, and was using bleeding-edge code. Is it even possible to fetch a particular tag as a submodule?

Sure it's possible. Consider these lines as example:

[jollyroger@gamma:webdis]% cd hiredis
[jollyroger@gamma:hiredis]% git checkout v0.9.2
Previous HEAD position was bf544ce... Typo fix
HEAD is now at 0fbfa45... Bump version

It's not that necessary for development branch to depend on tagged/stable versions and it sure can be updated at any time. But it would be necessary when the first tagged version of webdis appear. So I'm just talking about the future.

I agree that it will need a bit more knowledge and time to work with git (for example, do not forget to run git submodule update almost every time you pulled changes from upstream, see related chapter in the Git-SCM book ), but this will free you from unnecessary knowledge of the submodules' building process and manual copying of the submodule's source code i.e. free you from the responsibility on the source code of your submodules. And others still could browse the submodule's source code as a separate git repository.

I think this pull request goes in the right direction, but that webdis is still a very young project that doesn't need it yet. Maybe this will make more sense once both hiredis and jansson are packaged and distributed by Debian?

There are already bugs in Debian bugtracker which declarate that someone's already working on packaging both libraries (612601 and 561051). But it will take much more time to appear in Debian FTP archive and in the distribution itself.

I'm sysadmin who packages all the needed stuff into Debian packages (since it's my OS of choice) to be able to control what's going on with my servers. And since one of our developers is convinced to use webdis inside our company, I'd like to have it under control as other applications(libjansson and libhiredis are among them) I have packaged just for our company (well, we cannot wait half a year for some packages to appear in Debian archive).

Sure I'll contact package maintainers to share my work and help them to get those packages quicker to Debian, but I do need this for myself.

I'm sure can support my fork meanwhile you'll be working on webdis itself until my work will be useful for the project. And sure you can accept this pull request as another branch which I'll support.