Skip to content

migration-guide: interface vs concrete-class inputs#74

Merged
alexeid merged 1 commit into
masterfrom
migration-guide-interfaces
May 7, 2026
Merged

migration-guide: interface vs concrete-class inputs#74
alexeid merged 1 commit into
masterfrom
migration-guide-interfaces

Conversation

@alexeid
Copy link
Copy Markdown
Member

@alexeid alexeid commented May 7, 2026

Summary

  • Adds an explicit subsection to scripts/migration-guide.md covering when to type an Input<> to a spec interface (RealScalar, IntScalar, ...) vs a concrete class (RealScalarParam, IntScalarParam, ...).
  • The spec README.md already states this principle (developer guide sections ii) but the migration guide is what developers read when migrating an external package.

Surfaced while migrating bModelTest, where every model component had been typed against RealScalarParam/IntScalarParam/BoolScalarParam. That precluded passing in derived producers like AsIntScalar or IntSum, which the spec system explicitly supports for read-only inputs.

Test plan

  • Read the new section to confirm it matches the spec README and is consistent with existing migration guide tone.

The spec README already states this principle (sections ii of the
developer guide) but the migration guide is the document developers
read when migrating an external package. Adds an explicit subsection
under section 2 with a class-kind/input-type table and a note about
how tests that mutate a parameter should hold their own reference
rather than retrieve through the (now-interface) input.

Surfaced while migrating bModelTest where every model component had
been typed against RealScalarParam/IntScalarParam/BoolScalarParam,
which precluded passing in derived producers like AsIntScalar or
IntSum.
@alexeid alexeid merged commit 0d0e57e into master May 7, 2026
1 check passed
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