Skip to content

Report every record id swallowed by one skipped-record recovery #20

Closed

Description

@GeneralPawz

Follow-up to #17 (found in review of #19).

Problem. Lenient recovery resynchronises at the next ;. A record missing its ; therefore swallows the following record, and one SkippedRecord diagnostic covers both but names only the first id.

Repro. #1=A(1)\n#2=B();\n#3=C(); under ParseOptions::lenient() keeps only #3. It gives one SkippedRecord with instance() == "1", whose span contains #2=B();. #2 is lost and no diagnostic names it, so a consumer that reserves skipped ids (openbimrs/ifc#614, #617) can reuse #2.

Options.

  • Resync before a #digits= at the start of a line or after whitespace, so #2 is parsed rather than dropped.
  • Or report every #id= inside the skipped span, as extra diagnostics or a list on the diagnostic.

The first option recovers more data; check it against literals and comments, as resync_from already does for ; and ENDSEC. Pinned today by a_skip_over_several_records_names_only_the_first, which the fix would update.

Metadata

Metadata

Assignees

Labels

needs-triageFiled but not yet accepted, sized, or scheduled

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions