[Glass] Metacello baseline 'get' does not work?
Johan Brichau
johan at yesplan.be
Mon Apr 24 10:29:19 PDT 2023
Hi Dale,
I tried to provide relevant snippets, as you asked.
Next, I will see if this also happens with the load of Grease (e.g.) so it can be repeated outside of our codebase.
> I'm not sure, since I'm not exactly sure what is going wrong, but it sounds like it could be a bug ... So I need to see the Transcript output for the 3(?) different scenarios:
> load and update
The first load:
topaz 1> doit
Metacello new
baseline:'Yesplan';
repository: 'filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src';
get
%
--transcript--'Fetched -> BaselineOfYesplan-cypress.1 --- filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src [5e2c7405ac:develop] --- filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src'
--transcript--'Loaded -> BaselineOfYesplan-cypress.1 --- filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src [5e2c7405ac:develop] --- filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src'
[43492353 sz:9 cls: 133461505 MetacelloCypressBaselineProject] aMetacelloCypressBaselineProject
topaz 1>
We then execute:
BaselineOfYesplan loadScript
The implementation of `loadScript` is below. This works as expected and loads the project. I don’t include all the details as the issue is not with the loading of the code but rather updating the `BaselineOfYesplan`
Metacello new
baseline: 'Yesplan';
repository: yesplanSourceRepo;
repositoryOverrides: (repos collect:[ :r | r description ]), { yesplanSourceRepo };
onLock: [ :ex | ex honor ];
onConflict: [ :ex | …. ];
load: 'NextPlan-Core’.
self reloadPatchesIfRequired “this checks for dirty ‘Patches’ packages and reloads them using Gofer"
> failed load of "change"
Now, suppose we change a part of the `loadScript`. We add the following statement at the end:
self reloadPatchesIfRequired “this checks for dirty ‘Patches’ packages and reloads them using Gofer"
We update the git repository with the filetree sources and trigger a ‘Metacello get’ for the BaselineOfYesplan:
topaz 1> doit
Metacello new
baseline:'Yesplan';
repository: 'filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src';
get
%
[46734081 sz:9 cls: 133461505 MetacelloCypressBaselineProject] aMetacelloCypressBaselineProject
At this point, we change to our `loadScript` was not loaded. The BaselineOfYesplan is still the ‘old’ version.
As a consequence, when we load, the change we made to the `loadScript` is not used.
However, _after_ executing the `loadScript`, the new version of `BaselineOfYesplan` _is_ loaded. So, a repeated executing will use the change.
> workaround for failed load of "change"
The workaround for now is to replace `Metacello get’ step with the followin. The change to `loadScript` is then loaded, though the transcript does not say much.
topaz 1> doit
Gofer new
repository: (MCRepositoryGroup default repositories detect: [ :repository |repository description = 'filetree:///home/yesplan/localrepositories/Yesplan/smalltalk-src' ]);
package: 'BaselineOfYesplan';
load
%
[53617921 sz:2 cls: 36914177 GoferLoad] aGoferLoad
topaz 1>
As you can see, we are using the MetacelloCypressBaselineProject.
I do understand it correctly that `get` should load the updated BaselineOf? I tried using a `fetch`, which does load it but it will also load all other referenced BaselineOf and ConfigurationOf. Something that is undesirable at this point though.
Cheers
Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20230424/5477d990/attachment-0001.htm>
More information about the Glass
mailing list