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

            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

            People

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

              Dates

                Created:
                Updated: