Models that the PDR depends on
The Purescript source code of the PDR refers to some Perspectives Language types. These hardcoded references should be carefully maintained
The module Perspectives.ModelDependencies
The Purescript module Perspectives.ModelDependencies
contains a series of strings that are qualified type names of several models. This module is the only place where such strings occur. All other modules import one or more of these strings if they need to look up a property or role, etc.
In the models, each such type is annotated with the keyword PDRDEPENDENCY. A change to such a type must be accompanied by a change to Perspectives.ModelDependencies
. Conversely, if a type name is no longer needed, it should be removed from the module and the PDRDEPENDENCY keyword should be removed from the model.
Important
|
special care should be taken before changing any of the types involved in (automatically) installing model patches, and recompiling the models in a Repository (recompiling local models has no model dependencies). |
Updating a model (action UpdateModel
) depends on:
-
model://perspectives.domains#System$VersionedModelManifest$External$Patch
-
model://perspectives.domains#System$PerspectivesSystem$ModelsInUse$InstalledPatch
-
model://perspectives.domains#System$VersionedModelManifest$External$Build
-
model://perspectives.domains#System$PerspectivesSystem$ModelsInUse$InstalledBuild
.
Action CompileRepositoryModels
depends on:
-
model://perspectives.domains#System$ModelManifest$External$DomeinFileName
-
model://perspectives.domains#CouchdbManagement$ModelManifest$External$VersionToInstall
-
model://perspectives.domains#System$ModelManifest$External
.
When a new type is introduced that the PDR needs
It may happen that the PDR is changed in such a way that it needs a new type, meaning that some model must be adapted. With a stretch we can say that the model must be patched. After all, the old version of the model no longer functions; it should be patched. The advantage of introducing such new types in a patch is that we have a mechanism in place that will automatically install that patch. Consequently, when a new version of the PDR arrives that needs a new type, and when the new type is available in a patch, all will be well without the end user needing to do anything at all.
An obvious exception is when the types that are used by the automatic patch installation process are changed.