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

Regression in heredoc parser in 5.5.8

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • PUP 5.5.8
    • None
    • None
    • None
    • Customer Feedback
    • 32661
    • 1
    • Needs Assessment

    Description

      Puppet Version: 5.5.8
      Puppet Server Version: N/A
      OS Name/Version: N/A

      Starting with Puppet 5.5.8, previously working code now fails to validate or compile:

      $text = @("EOT")
               foo=${a}(value="${h['v']}")
               |EOT
      

      Desired Behavior:
      This code should validate and compile normally.

      Actual Behavior:

      # puppet parser validate test.pp
      Error: Could not parse for environment production: Syntax error at '[' (file: /root/test.pp, line: 3, column: 12)
      

      Note that the spacing, brackets, and parentheses must be of the form above to replicate the error. It seemed as though changing pretty much anything along those lines caused the error to disappear.

      This looks to be a regression caused by the changes from https://github.com/puppetlabs/puppet/pull/7114/commits/49b42a55a181f7b68663edcd2e99fc21001f967b. If I back out that commit, the code validates and compiles as it did in Puppet 5.5.6.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adam.bottchen Adam Bottchen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support