Skip to content

Lay out the conformance code as common, v27 and v31r1 - #62

Merged
jadamcrain merged 1 commit into
mainfrom
package-layout
Oct 14, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
package-layout

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

Item 3 of #59.

3.1r1 imported 2.7's s8.helpers 48 times and placed definitions from 2.7's numbered packages. Now the code both revisions use is in common, 2.7's own code is in a flat v27, and 3.1r1 refers to the 2.7 definitions it reuses as v27.Procedure…, so each name says where it comes from.

Changes

  • Procedure names. 2.7's procedure objects are named after their ids, with the dots replaced by underscores: Procedure8_2_1_2_1 (SBO, 0x28) and Procedure8_21_2_1 (double-bit read). Before, those two shared the name Procedure82121 in different packages, as did seven other pairs.
  • v27/Tree.scala replaces the 57 Section.scala files. It's built with the section(id, title)(children*) builder that 3.1r1's tree used. The builder is now in api, replacing the varargs api.section.
  • One-line procedure objects. The 80 one-line objects are folded into one file per 8.x section: Procedures8_2, 8_4, 8_5, 8_11, 8_14 and 8_22. Each is still its own top-level singleton. The other 77 procedures keep a file each.
  • common holds:
    • the helpers from s8/helpers, except AttributeValidations and EventBufferSteps, which stay in v27
    • SupervisoryControl
    • the link-layer steps from s6's package object, as LinkSteps
  • 6.6.2 and 6.6.3 helpers. These were members of those sections' Section objects and are now v27.PrimaryFrames and v27.SecondaryFrames.
  • Visibility. private[helpers] is now private[common], and the numbered packages' private[sN] is now private[v27]. expectNoEventsUnsolicited is private[conformance], because both common and v27 use it.
  • Tests moved to match: helper tests to common, the rest to v27. The procedure tests are renamed after their procedures, e.g. Procedure8_11_2_1Test.

Unchanged

Ids, titles, levels and order are the same. A dump compared before and after the move came out byte-identical. It covered:

  • both revisions' trees
  • every procedure's -describe output: options, steps and cleanup
  • the disabled lists

It ran at each subset level of both revisions, in four configurations: the defaults, a device profile, every boolean option on, and every boolean option off. Each 3.1r1 placement still uses the same definition as before, now under its new name.

3.1r1 imported 2.7's s8.helpers 48 times and placed definitions from
2.7's numbered packages. The code both revisions use is now in common,
2.7's own code is in a flat v27, and 3.1r1 refers to the 2.7
definitions it reuses as v27.Procedure..., so each name says where it
comes from.

- 2.7's procedure objects are named after their ids, e.g.
  Procedure8_2_1_2_1 and Procedure8_21_2_1, which shared a name in
  different packages before.
- v27/Tree.scala replaces the 57 Section.scala files. It's built with
  the section(id, title)(children*) builder 3.1r1's tree used, now in
  api in place of the varargs one.
- The 80 one-line procedure objects are folded into one file per 8.x
  section, e.g. Procedures8_14.scala; the rest keep a file each.
- common holds the helpers from s8/helpers except AttributeValidations
  and EventBufferSteps, which stay in v27, plus SupervisoryControl and
  the link-layer steps of s6's package object, as LinkSteps. The 6.6.2
  and 6.6.3 helpers are v27.PrimaryFrames and v27.SecondaryFrames.
- Tests moved to match: helper tests to common, the rest to v27.

Ids, titles, levels and order are unchanged. Every procedure's
-describe output, the trees and the disabled lists are the same as
before, for both revisions at each subset level, with the defaults and
with every boolean option on and off.

Part of #59.
@jadamcrain
jadamcrain merged commit dfcf1b2 into main Oct 14, 2026
5 checks passed
@jadamcrain
jadamcrain deleted the package-layout branch October 14, 2026 21:35
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