Skip to content

File doc.json is missing desc/rawdesc keys for variables #2520

@AndreasMatthias

Description

@AndreasMatthias

The following files, x1.lua and x2.lua, both define a global variable ipsum and a global function lorem.

File x1.lua:

---Func lorem() in x1.lua
function lorem()
end

---Var ipsum in x1.lua
ipsum = 123

File x2.lua:

---Func lorem() in x2.lua
function lorem()
end

---Var ipsum in x2.lua
ipsum = 123

The section of the global variable ipsum in doc.json is the following:

    {
        "defines": [
            {
                "extends": {
                    "finish": 50011,
                    "start": 50008,
                    "type": "integer",
                    "view": "integer"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x1.lua",
                "finish": 50005,
                "start": 50000,
                "type": "setglobal"
            },
            {
                "extends": {
                    "finish": 50011,
                    "start": 50008,
                    "type": "integer",
                    "view": "integer"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x2.lua",
                "finish": 50005,
                "start": 50000,
                "type": "setglobal"
            }
        ],
        "desc": "Var ipsum in x2.lua",
        "name": "ipsum",
        "rawdesc": "Var ipsum in x2.lua",
        "type": "variable"
    },

The following keys containing the variable descriptions are missing:

defines[1].extends.desc
defines[1].extends.rawdesc
defines[2].extends.desc
deinfes[2].extends.rawdesc

Note, that these keys are available for global function definitions:

    {
        "defines": [
            {
                "extends": {
                    "args": [],
                    "desc": "Func lorem() in x1.lua",
                    "finish": 20003,
                    "rawdesc": "Func lorem() in x1.lua",
                    "start": 10000,
                    "type": "function",
                    "view": "function lorem()"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x1.lua",
                "finish": 10014,
                "start": 10009,
                "type": "setglobal"
            },
            {
                "extends": {
                    "args": [],
                    "desc": "Func lorem() in x2.lua",
                    "finish": 20003,
                    "rawdesc": "Func lorem() in x2.lua",
                    "start": 10000,
                    "type": "function",
                    "view": "function lorem()"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x2.lua",
                "finish": 10014,
                "start": 10009,
                "type": "setglobal"
            }
        ],
        "desc": "Func lorem() in x2.lua",
        "name": "lorem",
        "rawdesc": "Func lorem() in x2.lua",
        "type": "variable"
    }

Could you add these keys, please?

Another question: What's the difference between desc and rawdesc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions