[Insight-developers] removing the dash in the module names

Bill Lorensen bill.lorensen at gmail.com
Thu Jun 23 14:56:25 EDT 2011


I suggest the following:

1) Clone the itk repo.
2) Apply your suggested changes to the module names (uses -'s to delimit)
3) Do all of the wrapping changes you need to accommodate itk modular.
I assume there is some work to be done here and you may uncover other
issues.

Once this is complete, propose a solution to the development team.

We cannot afford to delay the beta. It has already slipped several months.

Comments from the team?

Bill

2011/6/23 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
> Le 23 juin 11 à 19:23, Bill Lorensen a écrit :
>
>> This really should have been discussed last March.
>
> I must agree on that point.
> Unfortunately things have not moved as expected and we are dealing with that
> issue now.
>
>> With all of the
>> other things we need to do before the beta this seems disruptive at
>> this time. Almost 1800 files will need changes and over 4800 lines.
>> Even if an automated script catches 90% of the changes, we can expect
>> some turmoil. All if the A2D2 projects will be affected.
>
> 90% seems quite underestimated.
> I won't guarantee that it won't cause any problem though, but I expect them
> to be quite limited.
>
> We could also do it in the same series of commits that Hans was planning to
> rename the .txx in .hxx.
> That would lower the annoyance of merging conflicts when most of the files
> are touched.
>
>>
>> Also, are there other issues that may come up regarding wrapping?
>
> Probably a few other things - mostly fixing broken code which hasn't been
> catched by our tests before.
>
>
> I proposed this change because it requires a lot less effort than dealing
> with non usable names for wrapping - in addition to avoid complicating the
> wrapping code.
> Unfortunately I've already spent way more time to discuss that issue than
> the initial edit to actually fix it - less than 5 minutes:
>
>  modules=`find * -name itk-module.cmake | xargs grep itk_module | cut -d'('
> -f2 | cut -d')' -f1 | cut -d" " -f1`
>  for m in $modules; do
>    M=${m//-/_}
>    echo $M
>    find * -type f | xargs perl -e "s/$m/$M/g" -pi
>  done
>
> Should be not too long to fix the remaining problems by hand
>
>  [glehmann at marvin ITK]$ git grep ITK- | wc -l
>  36
>  [glehmann at marvin ITK]$ git diff --stat | tail -1
>   1750 files changed, 4475 insertions(+), 4482 deletions(-)
>
> Gaëtan
>
>>
>> Bill
>>
>> 2011/6/23 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>>>
>>> Hi Xiaxio,
>>> Hi David,
>>>
>>> Le 23 juin 11 à 17:35, David Cole a écrit :
>>>
>>>> Why couldn't there be a name-mapping (reversible, 2-way) in just the
>>>> Wrapping libraries? Are the "real" module names referenced directly in
>>>> many
>>>> places other than target_link_libraries calls?
>>>
>>> They are reused in many places in wrapping.
>>> Moving to the new modules defined in ITK is not that easy unfortunately,
>>> and
>>> dealing with non compatible module names make it even harder.
>>>
>>>>
>>>> How many languages can't handle the "-" in names? Is it just python, or
>>>> are dashes also bad in some other language?
>>>>
>>>
>>> At least python and java.
>>> I haven't checked for Tcl.
>>>
>>>>
>>>> On Thu, Jun 23, 2011 at 11:15 AM, Xiaoxiao Liu
>>>> <xiaoxiao.liu at kitware.com>
>>>> wrote:
>>>> Yup, not only most of the cmake files need some string replacements, all
>>>> the header files (for doxygen) need to be touched as well.
>>>
>>> Yes - nothing some regular expressions can't do.
>>>
>>>> It might affect all other under-development external modules (e.g.
>>>> Lesion
>>>> sizing toolkit, maybe a couple of other out there).
>>>>
>>>
>>> We are doing many changes which are affecting the development of other
>>> modules.
>>> I think it shouldn't affect a design decision at that point.
>>> In that case, using underscores instead of dashes doesn't make the names
>>> less good, but it does make the wrapping easier.
>>>
>>>> If there is no easy work-around, I prefer Bra'd's  "underscore" naming.
>>>
>>> Ok!
>>>
>>> Gaëtan
>>>
>>>
>>>
>>>>
>>>> 2011/6/23 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
>>>>
>>>> Le 23 juin 11 à 15:19, Bill Lorensen a écrit :
>>>>
>>>>
>>>> Virtually every .h file in the toolkit will need editing... Is there
>>>> some other, perhaps wrapping-specific solution?
>>>>
>>>> That would force us to do a lot of conversions with cmake.
>>>> In addition to make the code more complicated, I'm concerned that it may
>>>> make the already quite slow configuration even slower.
>>>>
>>>> Is it really a big problem to touch all the headers?
>>>>
>>>> Gaëtan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jun 23, 2011 at 8:53 AM, Brad King <brad.king at kitware.com>
>>>> wrote:
>>>> On 06/23/2011 04:07 AM, Gaëtan Lehmann wrote:
>>>> most of the languages won't support a dash in the module name.
>>>>
>>>> Would it be ok to remove those dash in the module names?
>>>>
>>>>  ITK-Common
>>>>  ITK-IO-Base
>>>>
>>>> would become
>>>>
>>>>  ITKCommon
>>>>  ITKIOBase
>>>>
>>>> Perhaps underscores?
>>>>
>>>>  ITK_Common
>>>>  ITK_IO_Base
>>>>
>>>> IMO having a separator breaks with our C++ coding guideline naming
>>>> style enough to clearly distinguish the names as modules.  It also
>>>> makes the name components clear, especially when the module names
>>>> are all uppercase.  Consider
>>>>
>>>>  ITK-IO-PNG   =>  ITKIOPNG  v. ITK_IO_PNG
>>>>  ITK-IO-TIFF  =>  ITKIOTIFF v. ITK_IO_TIFF
>>>>
>>>> -Brad
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>
>>>>
>>>> --
>>>> Gaëtan Lehmann
>>>> Biologie du Développement et de la Reproduction
>>>> INRA de Jouy-en-Josas (France)
>>>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>>>> http://mima2.jouy.inra.fr  http://www.itk.org
>>>> http://www.bepo.fr
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> ---------------------------------------------
>>>> Xiaoxiao Liu, Ph.D.
>>>> R & D Engineer
>>>> Kitware Inc.
>>>> Clifton Park, NY
>>>> Phone: (518) 881-4924  or  (518) 371-3971 x124
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>
>>>>
>>>
>>> --
>>> Gaëtan Lehmann
>>> Biologie du Développement et de la Reproduction
>>> INRA de Jouy-en-Josas (France)
>>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>>> http://mima2.jouy.inra.fr  http://www.itk.org
>>> http://www.bepo.fr
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>>
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://mima2.jouy.inra.fr  http://www.itk.org
> http://www.bepo.fr
>
>


More information about the Insight-developers mailing list