Fix for #1319 in Dolphin 8 and some related extras#1325
Merged
Conversation
blairmcg
commented
Feb 8, 2025
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.