The one shape every model in this package uses to point at a declared
contract: the file it's declared in, and the binding it's exported as.
Nothing else -- see ADR 0039.
Remarks
Deliberately not carrying contractName. A display name is a rendering
concern, resolved on demand from ContractModel (the one model that owns
it) by whichever renderer actually needs prose; duplicating it onto every
reference made it a second, independently-stale copy of a fact that can
change under a documentEnv() edit. Deliberately not carrying a
pre-formatted identity string either -- ${file}#${exportName} is
trivially derivable, and a stored copy is one more thing that can disagree
with the two fields it was built from. Code that genuinely needs a map key
builds that string locally, at the point of use.
The one shape every model in this package uses to point at a declared contract: the file it's declared in, and the binding it's exported as. Nothing else -- see ADR 0039.
Remarks
Deliberately not carrying
contractName. A display name is a rendering concern, resolved on demand fromContractModel(the one model that owns it) by whichever renderer actually needs prose; duplicating it onto every reference made it a second, independently-stale copy of a fact that can change under adocumentEnv()edit. Deliberately not carrying a pre-formattedidentitystring either --${file}#${exportName}is trivially derivable, and a stored copy is one more thing that can disagree with the two fields it was built from. Code that genuinely needs a map key builds that string locally, at the point of use.