Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5026

error message "illegal comma separated argument list" does not give a line number

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.2.1
    • Fix Version/s: PUP 4.3.0
    • Component/s: Language
    • Labels:
      None
    • Environment:

      macosx

    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-09-30
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Some error messages like "illegal comma separated list" did not contain the source location (file and line).

      Description

      Overview

      If code accidentally includes bad list syntax in the body of their class code, they will receive an error message that does not include a line number. This is somewhat confusing. I had this error and spent a good few minutes looking at the parameters to my class before I realised the error was in the body of my code.

      Expected behaviour

      The compile error should give a line number so that user's can find the error easily

      Actual behaviour

      User's receive the message illegal comma separated argument list which contains a filename but no line number.

      Specifically, the testcase below gives the message:

      Error: Could not parse for environment production: illegal comma separated argument list in /Users/geoff/whoops.pp
      

      Testcase

      class whoops($a,$b,$c) {
        $d = "oh noes",  "b"
      }
      

      Suggested fix

      The line number should be included in the error message

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                john.duarte John Duarte
                Reporter:
                geoff.williams Geoff Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support