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> 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 >> > >