Skip to content

Remove unused code and API - #63

Merged
jadamcrain merged 1 commit into
mainfrom
remove-unused
Oct 14, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
remove-unused

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

Item 4 of #59.

Removed

  • Mandatory procedures. TestProcedure.mandatoryAt and Revision.unmetMandatory, with their branches in Revision.validate and -disabled. Nothing set them.
  • Unimplemented 3.1r1 tests. notYet in v31r1/Tree.scala, and the text in the tree, the README and docs/manual-testing.md saying some 3.1r1 tests aren't implemented. All of them are, and a new test checks that none is incomplete. The README's "Test procedures" section now describes both revisions.
  • supports.noClassAssignment, which no procedure reads.
  • Harness.legacyNotice, the report's notice about dnp3c 0.1.0's results folders, along with Report.create's notices parameter, which only it used, and the docs that described it.
  • Parameters every caller gave the same value:
    • LinkWriter.write's isMaster
    • TestDriver.readAllResponses's func
    • TestDriver.checkSolicited's function, whose only non-default caller was readAllResponses
  • Unused members:
    • FrameValidator.function
    • TypeTraits.CTOEvent (Group2Var3 is a plain Event)
    • the UInt* objects' min and max
    • Fields.index8
    • IIN.startupBits
  • PrefixedPayload constructors: every one except the case classes' own.
  • Unreachable branches in TestRunner.runSteps: the ones for an incomplete or disabled procedure. The runner skips those before running any steps. The tests' Run helper now refuses a disabled definition too.

Checks

The trees, every procedure's -describe output, the disabled lists and Revision.validate's result are byte-identical to main. That holds for both revisions, at each subset level, in four configurations: the defaults, a device profile, every boolean option on, and every boolean option off.

Downstream

stepfunc/dnp3's conformance configuration sets supports.noClassAssignment = true. A release with this change rejects that key as an unknown option, so the line has to go when dnp3 upgrades.

- TestProcedure.mandatoryAt and Revision.unmetMandatory, with their
  branches in validate and -disabled: no procedure is mandatory.
- 3.1r1's notYet, and the text in its tree, the README and the docs
  that says some 3.1r1 tests aren't implemented: all are. A test now
  checks that none is incomplete.
- The supports.noClassAssignment option, which no procedure reads.
- Harness.legacyNotice, the report's notice of dnp3c 0.1.0's results
  folders, and Report.create's notices parameter that only it used.
- Parameters every caller gave the same value: LinkWriter.write's
  isMaster, readAllResponses's func, and checkSolicited's function.
- FrameValidator.function, TypeTraits.CTOEvent, the UInt* min and max
  values, Fields.index8 and IIN.startupBits.
- PrefixedPayload's constructors other than the case classes'.
- runSteps's branches for an incomplete or disabled procedure, which
  the runner skips before running its steps. The tests' Run helper
  refuses a disabled definition likewise.

The README describes both revisions. Every procedure's -describe
output, the trees and the disabled lists are unchanged.

Part of #59.
@jadamcrain
jadamcrain merged commit 3c62b6c into main Oct 14, 2026
5 checks passed
@jadamcrain
jadamcrain deleted the remove-unused branch October 14, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant