[BioLib-dev] Merging libsequence into main

Pjotr Prins pjotr.public14 at thebird.nl
Sat Aug 1 08:16:43 UTC 2009


On Fri, Jul 31, 2009 at 12:01:32PM -0400, Xin Shuai wrote:
> Except for the doubt I raised in my last email(I really don't dare to commit
> freely this time unless you told me nothing is wrong), I've already updated
> the contrib with two submodules: libsequence-1.6.6 and boost.

I would have created another remote branch. That way it would have
been possible for me to see the differences. Now I am blind to the
latest changes.

> Regarding to your error, yes, I once met them before. So I modified
> a few .hpp , .cc and .tcc files to make them work for swig. That's
> way I once asked you if it is OK for me to modify the original
> files.
> 
> I attached a txt file which documents all the files I have modified and how.

Ah, that is cool. I see you have fixed a number of problems by
modifying BOOST and libsequence sources. The only problem is that I
don't have them in the tree now.

The nice thing is that we actually have both libraries as git
repositories in biolib(!). This means we can clone the trees onto our
own github accounts, and push the patches. That way we can make
visible what works and doesn't work - and share the changes.

If you use my latest libsequence branch and run

  git submodule -i update

you will have both repositories locally. Let's start with a change to
libsequence:

  cd contrib/libsequence-1.6.6
  git checkout -b xin    # important since a git submodule is a virtual branch
  # hack hack
  # test
  git commit

Now you have patches. So what next? Two options, clone the
libsequence library at http://github.com/pjotrp/libsequence/tree on
github and push the patches to your tree. 

This is nice. I can pull from that tree.

Another option is to mail me the patches (as generated by git).

The same thing can be done for the BOOST tree. I cloned it from
git://gitorious.org/boost/svn.git. Unfortunately it is
large and may not fit into your free github account. You'll have to
either upgrade github, or I need add you to my github account, or you
send me patches. What do you prefer?

BTW, fixing upstream libraries - you have to make a call. Really
changes should go in we can send upstream to the maintainers. Just
commenting out problematic code is not a 'solution'. For isolated
cases there are a number of options:

  1. Tell SWIG to ignore the code (renames, macros)
  2. Create a derived class that is used by SWIG, rather than the
  parent

If it is unavoidable to parse the master file, and SWIG cracks, maybe
we can have a copy of that one particular file in the biolib tree,
which is compiled, rather than the one in contrib. So problematic.h
is found in:

  ./src/clibs/libsequence/include/problematic.h

rather then

  ./contrib/libsequence/include/problematic.h

In other words, fixing the master repositories should be useful to
upstream users. Otherwise we need to hack it in biolib itself.

Pj.





More information about the BioLib-dev mailing list