Re: [sbe-discussion] Determining what Metacello would load

1 view
Skip to first unread message

Mariano Martinez Peck

unread,
Dec 8, 2011, 4:20:33 AM12/8/11
to sbe-dis...@iam.unibe.ch, meta...@googlegroups.com


On Wed, Dec 7, 2011 at 11:04 PM, Sean P. DeNigris <se...@clipperadams.com> wrote:
The Metacello chapter is great, especially the workflow part - thank you.

Thanks. If you have feedback, as this one, as well as English corrections, PLEASE give it. You can hace access to the latex files if you want.


I would mention fetching, which is very useful for testing configs and
before accidentally loading the wrong thing. For example, printing
"ConfigurationOfMyProject project bleedingEdge fetch loadDirective"
gives you a description of what would be loaded in the current image.


The chapter says:


-----------
\paragraph{Debugging Configuration.}


If you want to simulate the loading of a configuration, without actually loading it, you should use \ct{record:} instead of \ct{load:}. Then to get the result of the simulation, you should send it the message \mthind{loadDirective}{loadDirective} as follows:

\begin{code}{}
  ((ConfigurationOfCoolBrowser project version: '0.2') !\textbf{record:}!
          { 'CoolBrowser-Core' .
        'CoolBrowser-Addons' }) !\textbf{loadDirective}!.
\end{code}

--------
 

So what is the difference between both?  one uses #fetch and one uses #record. I don't know exactly the differences but it sounds that #record is more closed to reality (#load) than #fetch. Dale ?


Thanks!

Sean

--
View this message in context: http://forum.world.st/Determining-what-Metacello-would-load-tp4170701p4170701.html
Sent from the Pharo By Example mailing list archive at Nabble.com.
_______________________________________________
Sbe-discussion mailing list
Sbe-dis...@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion



--
Mariano
http://marianopeck.wordpress.com

Dale Henrichs

unread,
Dec 8, 2011, 2:02:46 PM12/8/11
to meta...@googlegroups.com, sbe-dis...@iam.unibe.ch
The difference between #fetch: and #record: is that:

#fetch: accesses and downloads the mcz files from the repository

#record: simply records which mcz files should be downloaded

So #record: will run a lot faster than #fetch:.

While we're in the neighborhood:

#load: does a #fetch: followed by a #doLoad on the result of the #fetch:

This means you can do a #fetch:, inspect the result to peruse the list of packages that will be loaded and then resume the load with a #doLoad if you approve of the load list...

Dale

Mariano Martinez Peck

unread,
Dec 8, 2011, 5:16:35 PM12/8/11
to meta...@googlegroups.com, sbe-dis...@iam.unibe.ch
Thanks for the explanaiton. It turns I was wrong, I thought #record was downloadind the mcz files, but it seems this is only done by #fetch, which makes completly sense!
I will update the chapter. Thanks Sean for asking.
--
Mariano
http://marianopeck.wordpress.com

Reply all
Reply to author
Forward
0 new messages