Issue #22365 has been updated by Charlie Sharpsteen.

Status changed from Unreviewed to Needs Decision
Assignee set to Henrik Lindberg
Keywords set to future_parser

It appears that these errors are rising up to [a rescue 
statement](https://github.com/puppetlabs/puppet/blob/3.2.4/lib/puppet/parser/compiler.rb#L30-L33)
 in the compiler. This rescue adds the node name to the error context, but has 
no access to file and line number information.

Henrik, it looks like line number information can be retrieved using 
`Puppet::Pops::Utils.find_adapter(o, 
Puppet::Pops::Adapters::SourcePosAdapter)`. Should we be adding this 
information to errors generated in the future parser?



----------------------------------------
Bug #22365: All errors created by future parser ast_transformer lack line 
numbers
https://projects.puppetlabs.com/issues/22365#change-97417

* Author: Erik Dalén
* Status: Needs Decision
* Priority: Normal
* Assignee: Henrik Lindberg
* Category: parser
* Target version: 
* Affected Puppet version: 3.2.4
* Keywords: future_parser
* Branch: 
----------------------------------------
Errors created by the ast transformer in the future parser have the wrong type, 
so they lack line numbers. An example is:

    puppet apply --parser=future -e 'File<||> ? {default=>foo}'


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to