Jira (PUP-5612) Error message for declaring resource without title is confusing

5 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Dec 15, 2015, 1:15:04 PM12/15/15
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Puppet / Bug PUP-5612
Error message for declaring resource without title is confusing
Change By: Henrik Lindberg
Summary: Error message for declaring resource without  name  title  is confusing
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Dec 15, 2015, 1:16:03 PM12/15/15
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Sprint: Language Triage
Scrum Team: Language

Daniele Sluijters (JIRA)

unread,
Dec 15, 2015, 3:04:03 PM12/15/15
to puppe...@googlegroups.com
Daniele Sluijters commented on Bug PUP-5612
 
Re: Error message for declaring resource without title is confusing

Correct, the snippet was located in a class, part of a module with some failing tests that I was trying to help out with.

Does something like `blah

{ thing => value }

` ever make any sense in the class? As in, can we reliably detect this and simply go "it looks like you tried to declare a resource of blah but forgot to give it a title".

Henrik Lindberg (JIRA)

unread,
Dec 16, 2015, 4:08:04 PM12/16/15
to puppe...@googlegroups.com

Thomas Hallgren (JIRA)

unread,
Dec 29, 2015, 10:07:03 AM12/29/15
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Dec 29, 2015, 10:16:05 AM12/29/15
to puppe...@googlegroups.com

Kylo Ginsberg (JIRA)

unread,
Jan 4, 2016, 11:28:03 AM1/4/16
to puppe...@googlegroups.com
Kylo Ginsberg updated an issue
Change By: Kylo Ginsberg
Sprint: Language  Triage  2016-01-13

Henrik Lindberg (JIRA)

unread,
Jan 4, 2016, 2:49:04 PM1/4/16
to puppe...@googlegroups.com
Henrik Lindberg updated an issue

Merged to stable at: 4ef4424

Change By: Henrik Lindberg
Release Notes Summary: Error message for "resource without title" has been improved and is now specifically pointing this out instead of presenting a generic message.
Release Notes: Bug Fix

Eric Thompson (JIRA)

unread,
Jan 6, 2016, 6:10:12 PM1/6/16
to puppe...@googlegroups.com
Eric Thompson assigned an issue to qa
Change By: Eric Thompson
Status: Ready for  CI  Test
Assignee: qa

Sean Griffin (JIRA)

unread,
Jan 6, 2016, 7:46:05 PM1/6/16
to puppe...@googlegroups.com
Sean Griffin updated an issue
Change By: Sean Griffin
QA Risk Assessment: Low
QA Status: Reviewed

Daniele Sluijters (JIRA)

unread,
Jan 7, 2016, 2:11:03 AM1/7/16
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Jan 14, 2016, 5:19:07 PM1/14/16
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Change By: Henrik Lindberg
Scope Change Category: Adopted
Scope Change Reason: This was some time ago - IIRC, thomas was out of work in the then current sprint.

Kjetil Torgrim Homme (Jira)

unread,
Dec 1, 2022, 4:58:02 AM12/1/22
to puppe...@googlegroups.com
Kjetil Torgrim Homme commented on Bug PUP-5612
 
Re: Error message for declaring resource without title is confusing

Since searching for this error message on the web has this issue as the top hit:  This error message will still appear for resource references with whitespace between the resource type and name.

```

class acme::install

{   notice("install") }

class acme

{   class \{ 'acme::install': }

->
  Class [  'acme'  ]
}

include acme
```

> Error: Could not parse for environment production: This Array Expression has no effect. A Host Class Definition can not end with a value-producing expression without other effect (file: /tmp/init.pp, line: 7, column: 9)

Removing the space so it becomes `Class[ 'acme' ]` solves the issue.

I'm not suggesting re-opening the issue or see a big need to fix this smile.png

 

This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Henrik Lindberg (Jira)

unread,
Dec 2, 2022, 8:26:02 AM12/2/22
to puppe...@googlegroups.com

Kjetil Torgrim Homme It is an error by design - when slicing (i.e. using [] as an operator) it must follow the left hand side expression without any whitespace inbetween).

Class ['acme'] 

and

Class
['acme'] 

means the same thing - just a reference to the type Class (which  is meaningless), and then the production of an array with a single string value.

Reply all
Reply to author
Forward
0 new messages