Skip to content

file_only region key is never read, dropping shared top-level code #148

Description

@drewbitt

extract_regions keys a side with no entities as file_only (region.rs:55). Nothing reads that key, so top-level text identical on all three sides is dropped. Exit 0, no warning, so git merge looks clean.

# base.ts      ours.ts       theirs.ts
let a=0        let a=0       b()
b()            let d=0
               b()
cp ours.ts A.ts && weave-driver base.ts A.ts theirs.ts 7 f.ts
# exit 0; A.ts is `let d=0`, b() gone

Statements, comments and strings all drop. reconstruct.rs:59 handles this shape but only for file_header, hence #99 fixed #95 and not this. Repros on 0.3.6, main (05b19bd), #113.

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