Peter,
Very good summary ...
First off, Metacello doesn't support circular project dependencies.
Secondly, there is supposed to be a "cucularity detector" in Metacello
that avoids going into an infinite loop, but in retrospect, the detector
has not been tested with Baselines - I have submitted a bug[1]
Presumably in your second scenario all of the packages load correctly,
except that the extensions methods are not loaded ... is that correct?
I think you should be able to address your problem by using the #atomic
load type, by adding the following method to each of your baselines:
project
^ project
ifNil: [
project := super project.
project loadType: #'atomic'.
project ].
The default #linear load type loads each package individually. The
#atomic load type loads all of the accumulated definitions at one time
and missing dependencies like the one you are seeing should be resolved
by load time ... The accumulation of definitions crosses project boundaries.
I've submitted a bug to make changing the default load type a bit
easier[2] ... sometimes I wish that I made #atomic load the default, but
it is hard to change defaults in midstream without causing lots of
breakage...
Let me know if this addresses your issue.
Dale
[1] https://github.com/dalehenrich/metacello-work/issues/383
[2] https://github.com/dalehenrich/metacello-work/issues/384
On 2/16/16 12:33 AM, Peter Uhnák wrote:
Unfortunately #includes: doesn't seem to matter and I still get errors.
I tried to somehow summarize my findings with minimal code & results
here http://peteruhnak.com/metacello/
On Mon, Feb 15, 2016 at 11:31 PM, Werner Kassens <wkass...@libello.com
<mailto:wkass...@libello.com>> wrote:
Hi Peter,
have you looked at metacellos #includes: method?
from
https://code.google.com/archive/p/metacello/wikis/APIReference.wiki :
"When 'Example-AddOn' is loaded, load 'Example-UI'"
includes: #('Example-UI' );
werner
On 02/13/2016 11:26 PM, Peter Uhnák wrote:
Hi,
I have the following situation:
I have ProjectMain, and ProjectPlugin, now normally the Plugin
depends
on Main, however I would like to load Plugin as part of Main.
The problem is that I can't specify to load Plugin after Main
has been
already fully loaded, if I do something like this
BaselineOfMain>>baseline: spec
<baseline>
spec
for: #common
do:
[ spec
baseline: 'Plugin'
with: [ spec
repository: '...';
loads: #('default' OR 'plugin') ].
spec
package: 'Main' with: [ spec requires: #(more stuff) ];
spec group: 'default' with: #('Main').
specgroup: 'complete' with: #('default' 'Plugin') ]
The BaselineOfPlugin has two groups… "default", which loads
also "Main",
and "plugin", which doesn't.
Now the problem is that there is no guaranteed way that Plugin
will load
after Main (in fact the should happen). If I load the plugin's
#default,
then Metacello ends up in an endless loop for some reason, and
if I load
#plugin, then it will load it before the Main which will break it
(because Plugin has dependencies on main).
So my question is:
is it possible to reverse it somehow?
Maybe add at the end `specpostLoadDoIt: #postLoadPlugins`, and
then in
that method manually load the plugins with Metacello/Gofer? Or
is there
a better way?
Thanks,
Peter