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

`--parser future` breaks `class application {}`

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 3.8.2
    • Fix Version/s: PUP 3.8.3, PUP 4.2.2
    • Component/s: Docs, Language
    • Labels:
      None
    • Environment:

      CentOS 6.7, Puppet 3.8.2, KVM

    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-08-19, Language 2015-09-02
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      The newly introduced keywords 'application', 'consumes' and 'produces' that were supposed to only produce a warning if used as bare words introduced a problem that disallowed them to be used as names of classes.

      Description

      First noticed after updating to 3.8.2. Compilation will fail with error:

      Error: Could not parse for environment production: Syntax error at 'application' at line 1:7 on node build.setup

      Investigation concurred that if you have a class named application, and the --parser future options specified, the compilation will fail:

      [root@build puppet]# puppet apply -e 'class application {}'
      Notice: Compiled catalog for build.setup in environment production in 0.04 seconds
      Notice: Finished catalog run in 0.01 seconds
      [root@build puppet]# puppet apply -e 'class application {}' --parser future
      Error: Could not parse for environment production: Syntax error at 'application'  at line 1:7 on node build.setup
      Error: Could not parse for environment production: Syntax error at 'application'  at line 1:7 on node build.setup
      

      Fixed by rolling back to 3.8.1:

      Installed:
        puppet.noarch 0:3.8.1-1.el6
       
      Complete!
      [vagrant@build puppet]$ puppet apply -e 'class application {}' Notice: Compiled catalog for build.setup in environment production in 0.01 seconds
      Notice: Finished catalog run in 0.02 seconds
      [vagrant@build puppet]$ puppet apply -e 'class application {}' --parser future
      Notice: Compiled catalog for build.setup in environment production in 0.24 seconds
      Notice: Finished catalog run in 0.02 seconds
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  squeeb Chris Rigby
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  10 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: