Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-42246

IDL configs break if strings contain \n.

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.3 Desired
    • Component/s: IDL, Internal Code
    • Labels:
      None
    • Service Arch
    • ALL

       

      configs:
        benchmark_filter: 
          description: >
            A regular expression that specifies the set of benchmarks
            to execute. If this flag is empty, no benchmarks are run. If
            this flag is the string "all", all benchmarks linked into the
            process are run. 
          arg_vartype: String 
          default: .
       
      

      The 'description' field above contains newlines because of the > block-quoting.

      This produces a C++ _gen.cpp file containing expressions like:

       

      const char s[]=
      "A regular expression that specifies the set of benchmarks
      to execute. If this flag is empty, no benchmarks are run. If
      this flag is the string \"all\", all benchmarks linked into the
      process are run.");
      
      

      And the unescaped newlines inside the string literal are invalid C++.

       

      It can be worked around with YAML >- quoting instead of >, as >- removes newlines.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: