Only Baseline Loading

8 views
Skip to first unread message

Sean DeNigris

unread,
Nov 19, 2020, 12:44:08 PM11/19/20
to Metacello
I can't quite figure out a reproducible case, but sometimes when I do a load script like the following, only the baseline gets loaded and re-running doesn't help. 

[ EpMonitor current disable.
Metacello new
baseline: 'ComputerWorld';
repository: 'github://seandenigris/Computer-World';
onConflict: [ :ex | 
ex projectName = 'XMLParser'
ifTrue: [ ex useLoaded ] ];
load.
EpMonitor current enable

] fork

NB. the fork is because I'm running in GT (on top of P8) and Bloc notifications don't show otherwise.

Here's the transcript:
Fetched -> BaselineOfComputerWorld-CompatibleUserName.1605807023 --- g...@github.com:seandenigris/ComputerWorld.git[master] --- g...@github.com:seandenigris/ComputerWorld.git[master]
Loaded -> BaselineOfComputerWorld-CompatibleUserName.1605807023 --- g...@github.com:seandenigris/ComputerWorld.git[master] --- g...@github.com:seandenigris/ComputerWorld.git[master]
Loading baseline of BaselineOfComputerWorld...

How do I debug this?


Dale Henrichs

unread,
Nov 19, 2020, 12:58:29 PM11/19/20
to meta...@googlegroups.com

Sean,

Without looking closely or thinking hard .... the leading cause of a "second load failure" is when you are using a metadataless repository without having defined the "metadataless" project class MetacelloCypressBaselineProject in your baseline with the #projectClass method like the following:

projectClass
	Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ cl ].
	^ super projectClass

For standard Monticello repositories, packages are not loaded unless the version of the package is later than the version of the currently loaded package ... when using metadataless repositories the version of the package is always 1, so the first load succeeds and subsequent loads do not succeed ...

Dale

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metacello+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metacello/00408dce-9f14-4119-9023-8e193f015aa8n%40googlegroups.com.

Sean DeNigris

unread,
Feb 24, 2021, 9:11:41 PM2/24/21
to Metacello
Finally coming back to this (since it just bit me again lol)...

 the leading cause of a "second load failure" is...

I think I explained poorly. The problem is on the first load. I just tried the second time to see if that would help. 

On 11/19/20 9:44 AM, Sean DeNigris wrote:

I can't quite figure out a reproducible case, but sometimes when I do a load script like the following, only the baseline gets loaded and re-running doesn't help. 

[ EpMonitor current disable.
Metacello new
baseline: 'ComputerWorld';
repository: 'github://seandenigris/Computer-World';
onConflict: [ :ex | 
ex projectName = 'XMLParser'
ifTrue: [ ex useLoaded ] ];
load.
EpMonitor current enable

] fork
Tudor discovered something weird: if the conflict block is replaced by "onConflictUseLoaded;", the load succeeds, loading all baselines and other packages. However, with the first version above with the block, only baselines are loaded, no other packages. Does that tell you anything about the cause?
 

Dale Henrichs

unread,
Feb 25, 2021, 12:44:39 PM2/25/21
to meta...@googlegroups.com, Metacello
Sean,
This does sound like pretty bizarre behavior ... and on the first load? ... Anyway, my next go to is to look at the Transcript output for the load, to see if there are any clues there ...

Hmmm, looking at the load expression, I am curious what happens if the the projectName XMLParser, because as the code stands now I'm not completely sure what happens ... I'd be inclined to send an explicit message in the ifFalse: case ... and at a minimum, log the projects for which you are having conflicts and that combined with the full Transcript log might give me/us a clue ...

Dale
--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metacello+...@googlegroups.com.

Sean DeNigris

unread,
Feb 25, 2021, 2:25:10 PM2/25/21
to Metacello
On Thursday, February 25, 2021 at 12:44:39 PM UTC-5 Dale wrote:
I'd be inclined to send an explicit message in the ifFalse: case

Yes! The following worked:
Metacello new
baseline: 'ComputerWorld';
repository: 'github://seandenigris/Computer-World';
onConflict: [ :ex | 
ex projectName = 'XMLParser'
ifTrue: [ ex useLoaded ]
ifFalse: [ ex useLoaded ] "adding this makes it work :)" ];
load

Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Reply all
Reply to author
Forward
0 new messages