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

Puppet 4 lexer fails to parse multiple heredocs on the same line

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.5, PUP 4.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-03-18, Language 2015-04-01

      Description

      Parsing this manifest:

      notice({ @(foo) => @(bar) })
      hello
      -foo
      world
      -bar
      

      Results in:

      $ puppet apply foo.pp
      Error: Could not parse for environment production: undefined local variable or method `lexing_context' for #<Puppet::Pops::Parser::Lexer2:0x007faadd1551a0> on node peterhu-osx
      

      Expected results:

      $ puppet apply foo.pp
      Notice: Scope(Class[main]): {hello => world}
      Notice: Compiled catalog for peterhu-osx in environment production in 1.18 seconds
      Notice: Applied catalog in 0.08 seconds
      

      QA risk assessment: medium (FR only for now)
      probability: low (multiple heredocs on same line)
      severity: medium (workarounds exist)
      test layer: unit (https://github.com/puppetlabs/puppet/blob/26ad83f62e1ff1d1df51591f1c2c9b555484d3e0/spec/unit/pops/parser/parse_heredoc_spec.rb#L117-L136)

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  peter.huene Peter Huene
                  QA Contact:
                  Eric Thompson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: