Skip to content

Fix for #1319 in Dolphin 8 and some related extras#1325

Merged
blairmcg merged 4 commits into
masterfrom
blairmcg/1319
Feb 8, 2025
Merged

Fix for #1319 in Dolphin 8 and some related extras#1325
blairmcg merged 4 commits into
masterfrom
blairmcg/1319

Conversation

@blairmcg

@blairmcg blairmcg commented Feb 8, 2025

Copy link
Copy Markdown
Contributor
  • Prevents DB buffer classes from being removed from a deployed application
  • Environment Browser opened on an app contents (from deployment manifest) will highlight unbound classes to make them easy to see.
  • Spotted that DpiAwareness unnecessarily retained in a deployed console app, so fixed that.

DBColAttr class>>#initialize is the only reference in code to the
database buffer classes, and so must not be stripped or the buffer classes
will be removed.

A new package closure test is included, but unfortunately the closure test
mechanism isn't sophisticated enough to catch this particular fault
because it only finds missing code caused by the calculation of the
transitive closure of packages required for an application. It does not
account for code removed by the deployment process that iteratively removes
(supposedly) unreferenced methods and classes, as this is difficult to
simulate. It looks possible to create a better test simulation using
RB environments than the simplistic approach currently employed, but it is
not easy, and in the meantime this corrects the particular case of the
apps using Database Connection not working after deployment.
…asses

Rather than initializing the buffer classes into a class variable that is
only accessed from one method, inline the initialization into a constant
expression in that method. The compiler will insert all the classes
referenced in the const expression into the literal frame of the method,
so they will be implicitly preserved, and no special categorisation or
other trick is needed to stop them being removed on application deployment.

Also rename the #bind: selectors so that each operation has a distinct
message name that is more intention revealing.
After deploying an application, one can browser the final content of the
application by opening an Environment Browser that is configured to show
the included code from the manifest that is written to the deployment log.
This would include any unbound classes, but they are not marked out in any
way so they cannot be identified. One has to refer back to the text of the#
log and look for classes in the manifest with the attribute unbound='true'.

With this commit, the unbound classes will be shown in a different colour
and underlined. All apps will have 3 unbound clases in them that are
related to the deployment infrastructure: BasicImageStrippr, ImageStripper,
and DeploymentContext. Any other unbound classes in an application are
likely to cause runtime issues, and so need to be investigated.
The DpiAwareness instance held by UserLibrary blocks the removal of GUID,
and RPCLibrary.
@blairmcg blairmcg merged commit aeda601 into master Feb 8, 2025
@blairmcg blairmcg deleted the blairmcg/1319 branch February 8, 2025 15:20
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