Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"We had this mapping values are not allowed here" on YAML tag

Tags:

yaml

netbeans

I have a .yml file open in Netbeans 8.1 which looks like the following:

---
rules: 
  - !tp.aoi.topology.TopologyRule
    labels:
       - empty_A
    output:
       - entry_B

Netbeans has a squiggly red line under the - !tp.aoi.topology.TopologyRule line and spits out the following:

We had this mapping values are not allowed here 

What causes this error? The grammar of this phrase is nonsensical to me. If I remove the tag, there aren't any problems. From what I understand of YAML from the spec, this should be valid YAML (see the examples on "primary tag handles" under section 6.18), also this section of the spec under section 2.24 "Global Tags".

There are no tabs in this document, only spaces.

I'm fairly certain that I've opened this exact same file with an earlier version of NetBeans on Windows (I'm currently on Ubuntu) without any problems, but I may have also been using some other YAML plugins.

What is causing this error? I've tried other parsers, and this seems to be valid. From another post on SO, it seems that this is often related to missing a space between both sides of a mapping; this doesn't appear to be my issue.

like image 888
karobar Avatar asked Jan 23 '16 22:01

karobar


1 Answers

This is a known bug: see the netbeans bugtracker here

like image 163
Gary Avatar answered Nov 11 '22 22:11

Gary