my-th-os / KML

Kerbal Markup Lister - A persistence file editor for Kerbal Space Program

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add more info to warning lines to make it less ambigous and problems directly addressable

darthgently opened this issue · comments

Specifically, uid of part in warning entry would allow searching within the savefile to the specific craft and part directly.
Maybe craft name would be nice but not necessary. For context I am only using the CLI mono version and only plan to use this version as it it can be driven by script with low overhead. So the request is for mono version. As far as I know the GUI version may already address this in another way.

commented

Yes you are right, in the GUI the warnings store a reference to the affected part if possible, and you can navigate there by double-click.

So I understand the need for some more help in the CLI.

commented

Well, the warnings have an affected thing and the message goes like:

parent thing -> affected thing : message

In many cases the affected thing is a part, so the parent will be the vessel and its name will show up in the warning message already.

In other cases the problem is identified on a specific attribute, which then is the affected thing, having the parent to be the part or whatever node. The next level up, like vessel, is not shown in this case.

I'm thinking about displaying the affected thing besides the warning in the CLI. Not every affected thing is a part and has a uid, so I'd rather restrain from being that specific. But if it is a part, showing it will give you the uid.

commented

@darthgently Would this help? Selecting a specific warning like -ws=0 shows the origin of that warning, haven't commited that yet.

> KML.exe ".\KML_Test\Data\Files_Warning\ReducedGrappling.sfs" -ws=0
Warnings in ".\KML_Test\Data\Files_Warning\ReducedGrappling.sfs"

0: VESSEL (Visitor Trans, Ship, ORBITING) -> PART [64] (Mark1Cockpit): Part grappled by parent part. Docking state should be 'Grappled' but is 'Disabled', parent grapple: PART [45] (GrapplingDevice): Disabled

VESSEL (Visitor Trans, Ship, ORBITING)

PART [64] (Mark1Cockpit)

name = Mark1Cockpit
cid = 0
uid = 2616629714
launchID = 0
parent = 45
position = 0.240886777639389,-9.10970878601074,0.223656728863716
rotation = 0.6305876,0.01030447,-0.3941126,-0.6685271
...
> KML.exe ".\KML_Test\Data\Files_Warning\ReducedSymmetryBounds.sfs" -ws=0
Warnings in ".\KML_Test\Data\Files_Warning\ReducedSymmetryBounds.sfs"

0: PART [0, root] (PotatoRoid) -> sym = 1: Invalid symmetry entry 'sym = 1', you should delete this attribute

VESSEL (Ast. GBG-152, SpaceObject, ORBITING)

PART [0, root] (PotatoRoid)

name = PotatoRoid
uid = 1433930675
parent = 0
position = 0,0,0
sym = 1
flag =

And maybe I should in general show "node's parent -> node -> attrib" for warnings about attributes and stay with "node's parent -> node" for warnings about nodes.

commented

Implemented always showing 2 nodes, even for warnings about attributes ee158f8
Implemented showing source node for selected warning 77c6083
This includes a dirtry trick to do multiselect with -wm=* to show nodes for all warnings and spam the screen :-)

This should do? I might release it later today.

I'm not seeing ship name in current warnings. Fwiw, -v option reports earlier version than most recent but zip I am using is named as most recent and is most recent on site for download

Your suggestions address things 100%

commented

Fwiw, -v option reports earlier version than most recent but zip I am using is named as most recent and is most recent on site for download

Yes I noticed that I did a few previous releases wrong and didn't update the version in the Mono assembly info, I fixed that as well.

commented

Released in v0.9.4