Skip to content

docx: four write-only fields in field_projection.mbt are hidden by declaration-wide #warnings suppressions #498

Description

@bobzhang

Surfaced by review during the per-warning-id sweep (PR #496, id [0007] unused_field).

Four fields in docx2html/docx/field_projection.mbt are populated and never read
by production or by the whitebox suites:

  • ReaderFieldBoundary.carrier_identity (field_projection.mbt:36)
  • ReaderField.separate_marker_identity (:56)
  • ReaderField.separate_carrier_identity (:57)
  • ReaderField.end_carrier_identity (:60)

They are invisible to moon check because their declarations already carry
#warnings("-unused_field"), added before this sweep. That is the general hazard
with declaration-wide suppression, which MoonBit 0.1.20260821 gives no per-field
alternative to: the attribute covers fields added later, and fields that go dead
later.

Not fixed in #496 because they are not [0007] diagnostics on any backend, and
removing them touches the field-classification construction and assignment sites,
which deserves its own review.

Worth checking while doing it: whether any of the three mutable ones was supposed
to be consulted by a consumer, in which case the finding is a bug rather than
dead weight.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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