Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1383

Spaces in thrift input file lead to incorrectly generated code

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++ - Compiler
    • None

    Description

      Spaces in file names produce identifiers (e.g. namespaces) with spaces, which is illegal. I checked that only for the C++ generator, but there are probably other generators affected as well.

      Attachments

        Issue Links

          Activity

            rohel01 Michaël Melchiore made changes -
            Link This issue relates to THRIFT-5067 [ THRIFT-5067 ]
            jensg Jens Geyer made changes -
            Link This issue is related to THRIFT-3707 [ THRIFT-3707 ]
            jensg Jens Geyer made changes -
            Link This issue is related to THRIFT-3314 [ THRIFT-3314 ]
            jensg Jens Geyer made changes -
            Link This issue is related to THRIFT-3333 [ THRIFT-3333 ]
            jensg Jens Geyer added a comment -

            It is not only about spaces, actually. If done right, each language's generator needs to check for invalid characters when rendering identifiers etc. and take action, e.g. replace with underscore, or what else seems appropriate.

            jensg Jens Geyer added a comment - It is not only about spaces, actually. If done right, each language's generator needs to check for invalid characters when rendering identifiers etc. and take action, e.g. replace with underscore, or what else seems appropriate.

            Any thoughts on solving this?

            Seems like just having the compiler reject input files with spaces might be easiest and most direct. The compiler could remove or convert spaces automatically but that seems underhanded. I would rather the compiler be upfront about its requirement, allowing the user to choose the appropriate solution.

            My 2 cents

            codesf Randy Abernethy added a comment - Any thoughts on solving this? Seems like just having the compiler reject input files with spaces might be easiest and most direct. The compiler could remove or convert spaces automatically but that seems underhanded. I would rather the compiler be upfront about its requirement, allowing the user to choose the appropriate solution. My 2 cents
            jensg Jens Geyer made changes -
            Link This issue is related to THRIFT-1977 [ THRIFT-1977 ]
            jensg Jens Geyer made changes -
            Link This issue is related to THRIFT-2065 [ THRIFT-2065 ]
            jensg Jens Geyer made changes -
            Field Original Value New Value
            Link This issue is related to THRIFT-1866 [ THRIFT-1866 ]
            jensg Jens Geyer created issue -

            People

              Unassigned Unassigned
              jensg Jens Geyer
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: