febeling/rb-libsvm

Adjust paths to modules

apohllo opened this issue · 7 comments

In Ruby community there is a strong directory structure pattern, which makes the modules correspond to directories.

I know that the library name might not be changed to libsvm, since this a different implementation of the libsvm wrapper, but I think rb-libsvm would be less surprising for developers, if the paths inside the lib directory were corresponding the the module Libsvm.

So instead of

  lib/rb-libsvm

we would have

  lib/libsvm

This also applies to the rb-libsvm.so which is generated during library installation.

Do you have a good idea how to change that to the now common structure without breaking existing applications? Maybe aliases which issue warnings, or something?

I don't think that there is any problem at all - at least if the user requires only 'libsvm' as is stated in readme. The only thing we have to change are the directories with version and libsvm.so and some internal requires. I think we should change the name of libsvm.so to libsvm_impl.so to avoid confusion between libsvm.rb and libsvm.so.

I have a working solution (not loaded to github yet), but wasn't sure what is your opinion about this issue.

I'm totally for the Rule of Least Surprise. So if user applications don't break and the code becomes more navigable for people who try to read or do changes, I'm +1.

I've merge consistent-package-names in ref #be5535f80c0 which closes this.

good news :)

Released as 1.0.8 and pushed to rubygems.org.