Menu

#22 Rename header files

post v2.0
open
Kaipo
None
2015-02-12
2013-09-12
No

To add to this point, one error I dealt with when I started integrating Tide was because Crux's Peptide.h and Tide's peptide.h both had the same include guard ("#ifndef PEPTIDE_H \ #define PEPTIDE_H").
I don't think renaming conflicting header files would be a bad idea, but probably doesn't need to be done right away.

I'd say the patch is good to check in but Charles mentioned that he was going to take a look at it as well, so you may or may not want to wait on that.

Thanks,
Kaipo

On 9/11/2013 8:31 AM, William S Noble wrote:
To me, renaming the header files makes a lot of sense. It seems like having two files with exactly the same name and different content is bound to lead to confusion.

Bill

On Wed, Sep 11, 2013 at 8:19 AM, Sean McIlwain sjoemac@gmail.com wrote:
Kaipo,

This issue arises in our Spectrum.h because there is also a Spectrum.h in the MSToolkit library. So to include the Spectrum.h header from Comet into the Spectrum.h file in Crux, we have to specify a exact path. Other than renaming our header files to something like CruxSpectrum.h I don't see another way around this.

Thanks,
Sean

Related

Issues: #22

Discussion

  • William S Noble

    William S Noble - 2014-06-05
    • labels: --> High priority
     
  • Kaipo

    Kaipo - 2015-01-15

    I had an idea when removing the search-for-matches code.
    Most of the code is in the root of the src directory. I think there would be several benefits if we could reorganize the source code into separate folders, maybe something like:

    src/
    |-- app/
    |-- io/
    |-- model/
    |-- util/

    One side benefit would be that we could include only the root src directory, and if we wanted to include the Crux Spectrum header file for example, we would do #include "model/Spectrum.h".

    Also this is probably more of a preference thing but I like the idea of moving the src/c, src/c/test, and src/external directories into the root directory, i.e.:

    /src/c --> /src
    /src/c/test --> /test
    /src/external --> /ext

     
    • William S Noble

      William S Noble - 2015-01-16

      All of these sounds like good ideas to me. Anyone else care to comment?
      Otherwise, Kaipo, you can do this. But you might want to coordinate with
      anyone (e.g., Alice) who currently is working in a branch, so that they can
      propagate the changes from the trunk to their branch.

      Bill

      On Thu, Jan 15, 2015 at 3:17 PM, Kaipo kaipot@users.sf.net wrote:

      I had an idea when removing the search-for-matches code.
      Most of the code is in the root of the src directory. I think there would
      be several benefits if we could reorganize the source code into separate
      folders, maybe something like:

      src/
      |-- app/
      |-- io/
      |-- model/
      |-- util/

      One side benefit would be that we could include only the root src
      directory, and if we wanted to include the Crux Spectrum header file for
      example, we would do #include "model/Spectrum.h".

      Also this is probably more of a preference thing but I like the idea of
      moving the src/c, src/c/test, and src/external directories into the root
      directory, i.e.:

      /src/c --> /src
      /src/c/test --> /test
      /src/external --> /ext


      Status: open
      Milestone: post v2.0
      Labels: High priority
      Created: Thu Sep 12, 2013 06:35 PM UTC by William S Noble
      Last Updated: Thu Jun 05, 2014 10:27 PM UTC
      Owner: Kaipo

      To add to this point, one error I dealt with when I started integrating
      Tide was because Crux's Peptide.h and Tide's peptide.h both had the same
      include guard ("#ifndef PEPTIDE_H \ #define PEPTIDE_H").
      I don't think renaming conflicting header files would be a bad idea, but
      probably doesn't need to be done right away.

      I'd say the patch is good to check in but Charles mentioned that he was
      going to take a look at it as well, so you may or may not want to wait on
      that.

      Thanks,
      Kaipo

      On 9/11/2013 8:31 AM, William S Noble wrote:
      To me, renaming the header files makes a lot of sense. It seems like
      having two files with exactly the same name and different content is bound
      to lead to confusion.

      Bill

      On Wed, Sep 11, 2013 at 8:19 AM, Sean McIlwain sjoemac@gmail.com wrote:
      Kaipo,

      This issue arises in our Spectrum.h because there is also a Spectrum.h in
      the MSToolkit library. So to include the Spectrum.h header from Comet into
      the Spectrum.h file in Crux, we have to specify a exact path. Other than
      renaming our header files to something like CruxSpectrum.h I don't see
      another way around this.

      Thanks,
      Sean


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cruxtoolkit/issues/22/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Issues: #22

      • Charles E. Grant

        Hi Kaipo.

        On Thu, Jan 15, 2015 at 3:17 PM, Kaipo kaipot@users.sf.net wrote:

        I had an idea when removing the search-for-matches code.
        Most of the code is in the root of the src directory. I think there would
        be several benefits if we could reorganize the source code into separate
        folders, maybe something like:

        src/
        |-- app/
        |-- io/
        |-- model/
        |-- util/

        One side benefit would be that we could include only the root src
        directory, and if we wanted to include the Crux Spectrum header file for
        example, we would do #include "model/Spectrum.h".

        Also this is probably more of a preference thing but I like the idea of
        moving the src/c, src/c/test, and src/external directories into the root
        directory, i.e.:

        /src/c --> /src
        /src/c/test --> /test
        /src/external --> /ext

        This sounds like a reasonable restructuring to me. What about directories like rankprop-qranker and bullseye? Would they be directly under src or go under src/app?

        Once 'gotcha' to keep in mind is that Windows has a hard limit of 260 characters for file path lengths. Under certain circumstances we have hit that limit for some of the dependencies in external. Your suggested changes would actually relieve that problem a bit, but as we rearrange and rename directories we should definitely favor shorter over longer.

        Charles

         
        • Kaipo

          Kaipo - 2015-01-16

          I was thinking that each application would have its own directory under app (except maybe the applications that have only 1 file).

          I am not sure how well svn handles merging changes when renaming/moving things around, so maybe I will wait until any branches have been reintegrated into the trunk?

           
          • William S Noble

            William S Noble - 2015-01-16

            Ok, sounds good.
            On Jan 16, 2015 12:34 PM, "Kaipo" kaipot@users.sf.net wrote:

            I was thinking that each application would have its own directory under
            app (except maybe the applications that have only 1 file).

            I am not sure how well svn handles merging changes when renaming/moving
            things around, so maybe I will wait until any branches have been
            reintegrated into the trunk?


            Status: open
            Milestone: post v2.0
            Labels: High priority
            Created: Thu Sep 12, 2013 06:35 PM UTC by William S Noble
            Last Updated: Thu Jan 15, 2015 11:17 PM UTC
            Owner: Kaipo

            To add to this point, one error I dealt with when I started integrating
            Tide was because Crux's Peptide.h and Tide's peptide.h both had the same
            include guard ("#ifndef PEPTIDE_H \ #define PEPTIDE_H").
            I don't think renaming conflicting header files would be a bad idea, but
            probably doesn't need to be done right away.

            I'd say the patch is good to check in but Charles mentioned that he was
            going to take a look at it as well, so you may or may not want to wait on
            that.

            Thanks,
            Kaipo

            On 9/11/2013 8:31 AM, William S Noble wrote:
            To me, renaming the header files makes a lot of sense. It seems like
            having two files with exactly the same name and different content is bound
            to lead to confusion.

            Bill

            On Wed, Sep 11, 2013 at 8:19 AM, Sean McIlwain sjoemac@gmail.com wrote:
            Kaipo,

            This issue arises in our Spectrum.h because there is also a Spectrum.h in
            the MSToolkit library. So to include the Spectrum.h header from Comet into
            the Spectrum.h file in Crux, we have to specify a exact path. Other than
            renaming our header files to something like CruxSpectrum.h I don't see
            another way around this.

            Thanks,
            Sean


            Sent from sourceforge.net because you indicated interest in
            https://sourceforge.net/p/cruxtoolkit/issues/22/

            To unsubscribe from further messages, please visit
            https://sourceforge.net/auth/subscriptions/

             

            Related

            Issues: #22

  • Kaipo

    Kaipo - 2015-01-22

    I was playing with this and I put a patch at http://proteome.gs.washington.edu/~kaipot/share/restructure.diff

    The patch is 168mb, so it might be difficult to review, but if anyone wants to try it they can see if it works for them.

     
  • Kaipo

    Kaipo - 2015-01-23

    Also, this patch does not include a fix for duplicate names in include guards (#ifndef PEPTIDE_H).

    I suggest that we use "#pragma once", instead of #ifndefs.

     
  • William S Noble

    William S Noble - 2015-02-12
    • labels: High priority -->
     

Log in to post a comment.

MongoDB Logo MongoDB