8000 mfile: one constraint check for loadout_mode, so a broken constraint gives one message · Issue #3304 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

mfile: one constraint check for loadout_mode, so a broken constraint gives one message #3304

Open

Description

@agent-137

Residual of BOX T126 (#3254, PR #3301), from arch condition C4 (arch_rulings 1173).

Two checks now read a Box Type's loadout_mode constraint. T126's gate() in crates/mfile/src/expand.rs reads it through holding_constraint() and returns Error::ConstraintViolated. T23's check_constraints (#3292) reads every constraint and returns BoxTypeError::ConstraintBroken. One broken constraint can therefore print two different messages.

Scope: once #3292 has merged, make gate() read the loadout_mode constraint by the rules of check_constraints and return BoxTypeError::ConstraintBroken. Remove Error::ConstraintViolated and holding_constraint(), so one constraint check gives one message. Keep the BOX-181 order: the check runs before any loadout is read.

Refs #2236, #3254, #3292, #3295, #3301.


This is a residual of epic #2236 (BOX).

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

    priority:nice-to-have

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0