Skip to content

Toolchain drift: 437 Array::new(capacity=…) deprecation warnings across 136 files #526

Description

@bobzhang

The current MoonBit nightly deprecates Array::new(capacity=…) in favour of
Array(capacity=…). moon check on a clean main reports 437 warnings, 0
errors
across 136 files — verified in a throwaway worktree at main, so
this is toolchain drift and not a regression from any open branch.

scripts/ci/local-gate.sh treats warnings as failures, so the local gate is red
on main until this is swept. CI floats both toolchain channels and passes if
either does (#416), which is why this has not turned CI red.

What this needs. One mechanical sweep PR, following the warning-id campaign
discipline: one warning id per PR, and per-span verification rather than a blind
sed. The deprecation-migration-traps rule applies — the suggested replacement
must be confirmed equivalent for each spelling before it is applied in bulk,
because the two constructors could differ on the zero-capacity or
negative-capacity cases.

Affected areas are broad and untargeted by any current work: xlsx/,
pagelayout/, docx2html/, office/.

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