Skip to content

Metada Location should have nonzero column and line #8579

@JanKrivanek

Description

@JanKrivanek

Issue Description

MetadataElement of an ItemElement doesn't have line&col of Location set despite those are se for the parent ItemElement.

image
[code]

Errors referencing metadata can hence have location reported as (0,0)

Analysis

Location is hardcoded to 0, 0 (here), because at the time of creating of metadata, the reader is already not available (nullified here), it's only available during Load phase, metadata are created during parsing phase (the two phases here)

Possible way out: either reuse the Location info from owning parent (possibly off for element definition spanning over multiple lines - but likely still better than (0, 0) location); or rework the code to create metadata during Load phase - or somehow preserve location information from that phase.

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasebugtriaged

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions