Freezing version Moose-based tools

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Freezing version Moose-based tools

Stéphane Ducasse
Hi guys

I finished to find a stupid bug today. Now the moose reloader works.
The idea is that you can freeze a complete Moose tools and be able to take a 1.4 image and reload all the packages
that were loaded when you snapshot it.

I could reload the latest version of Moose in a 1.4 image.
I published the result on ConfigurationOfMoose.


Gofer new
          url: 'http://smalltalkhub.com/mc/StephaneDucasse/MooseReloader/main'
          username:  ''
          password: '';
     package: 'ReloaderForMoose';
     load



Here is the comment of this class.



I'm a kind of saver/loader that knows how to save and load list of packages by recursively navigating metacello configurationOf. To work I need a metacello record and a place to save package version.

Here are examples to create a spec of packages to be saved.
===========================================
In an image containing the loaded configuration of the tools you want to version execute the following:
 
Reloader new
        configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
        repositoryClass: MooseConfigurationRepositoryForPharo14;
        publishNewVersion
       
Reloader new
        configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
        repositoryClass: ConfigurationOfMoose;
        publishNewVersion

It will produce a method called scriptXxx in the repositoryClass you specify.
Here is an example of such method.


script5

        ^ #(
                #('ConfigurationOfFame-StephaneDucasse.6.mcz'  'http://www.squeaksource.com/Fame/'  'ConfigurationOfFame' )
                #('ConfigurationOfMooseAlgos-TudorGirba.28.mcz'  'http://www.squeaksource.com/MooseAlgos/'  'ConfigurationOfMooseAlgos' ) ......
        )

       
You can then use this method as follows, for example in a ConfigurationOf you can

flatVersion47: spec
        <version: '4.7-flat'>
       
        spec for: #common do: [
                self populateSpec: spec with: self script5 ]

Note that the populateSpec:  with: is generated when necessary.  

       
Reloading.
===================================
In another image you can reload the configuration in two different ways:
either by using metacello or by using the reloader.

Using metacello is simple if you created a method similar to
flatVersion47: spec
        <version: '4.7-flat'>
       
        spec for: #common do: [
                self populateSpec: spec with: self script5 ]
       
        just execute

(ConfigurationOfMoose project version: '4.7-flat') load



If you do not use a configurationOf you can simply invoke the method reload: with the number of the script

using the method
       
        reload: aNumber
                and it will load all the packages you previously specified.
               
        reloadLatest
                will load the latest script version
                               
Typical use cases are:
------------------------------------
Reloader new
        repositoryClass: MooseConfigurationRepositoryForPharo14;
        reload: 2

Reloader new
        repositoryClass: SynectiqueCaseOneConfigurationRepository;
        publishNewVersion
       
Reloader new
        repositoryClass: SynectiqueCaseOneConfigurationRepository;
        loginSpecification: {{ '*squeaksource*' . 'sd' . 'xyxyx'} . { '*ss3*' . 'StephaneDucasse' . 'xxxx'} . { '*' . '' . ''}};
        reload: 2
       
                       
                       
===================================================
Implementation Notes.
First version fully working on metacello records.

Let me know if it works for you.

Stef


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Freezing version Moose-based tools

Stéphane Ducasse
And I forgot but I want to thanks Dale for the help.
He spotted the bug much faster than me.

Stef


> Hi guys
>
> I finished to find a stupid bug today. Now the moose reloader works.
> The idea is that you can freeze a complete Moose tools and be able to take a 1.4 image and reload all the packages
> that were loaded when you snapshot it.
>
> I could reload the latest version of Moose in a 1.4 image.
> I published the result on ConfigurationOfMoose.
>
>
> Gofer new
>          url: 'http://smalltalkhub.com/mc/StephaneDucasse/MooseReloader/main'
>          username:  ''
>          password: '';
>     package: 'ReloaderForMoose';
>     load
>
>
>
> Here is the comment of this class.
>
>
>
> I'm a kind of saver/loader that knows how to save and load list of packages by recursively navigating metacello configurationOf. To work I need a metacello record and a place to save package version.
>
> Here are examples to create a spec of packages to be saved.
> ===========================================
> In an image containing the loaded configuration of the tools you want to version execute the following:
>
> Reloader new
> configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
> repositoryClass: MooseConfigurationRepositoryForPharo14;
> publishNewVersion
>
> Reloader new
> configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
> repositoryClass: ConfigurationOfMoose;
> publishNewVersion
>
> It will produce a method called scriptXxx in the repositoryClass you specify.
> Here is an example of such method.
>
>
> script5
>
> ^ #(
> #('ConfigurationOfFame-StephaneDucasse.6.mcz'  'http://www.squeaksource.com/Fame/'  'ConfigurationOfFame' )
> #('ConfigurationOfMooseAlgos-TudorGirba.28.mcz'  'http://www.squeaksource.com/MooseAlgos/'  'ConfigurationOfMooseAlgos' ) ......
> )
>
>
> You can then use this method as follows, for example in a ConfigurationOf you can
>
> flatVersion47: spec
> <version: '4.7-flat'>
>
> spec for: #common do: [
> self populateSpec: spec with: self script5 ]
>
> Note that the populateSpec:  with: is generated when necessary.  
>
>
> Reloading.
> ===================================
> In another image you can reload the configuration in two different ways:
> either by using metacello or by using the reloader.
>
> Using metacello is simple if you created a method similar to
> flatVersion47: spec
> <version: '4.7-flat'>
>
> spec for: #common do: [
> self populateSpec: spec with: self script5 ]
>
> just execute
>
> (ConfigurationOfMoose project version: '4.7-flat') load
>
>
>
> If you do not use a configurationOf you can simply invoke the method reload: with the number of the script
>
> using the method
>
> reload: aNumber
> and it will load all the packages you previously specified.
>
> reloadLatest
> will load the latest script version
>
> Typical use cases are:
> ------------------------------------
> Reloader new
> repositoryClass: MooseConfigurationRepositoryForPharo14;
> reload: 2
>
> Reloader new
> repositoryClass: SynectiqueCaseOneConfigurationRepository;
> publishNewVersion
>
> Reloader new
> repositoryClass: SynectiqueCaseOneConfigurationRepository;
> loginSpecification: {{ '*squeaksource*' . 'sd' . 'xyxyx'} . { '*ss3*' . 'StephaneDucasse' . 'xxxx'} . { '*' . '' . ''}};
> reload: 2
>
>
>
> ===================================================
> Implementation Notes.
> First version fully working on metacello records.
>
> Let me know if it works for you.
>
> Stef
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Freezing version Moose-based tools

Tudor Girba-2
Thank you, Stef!

This is very cool. Finally, we can have a process that can accommodate both working on the latest version and having reproducibility.

Cheers,
Doru


On Jan 29, 2013, at 12:44 AM, Stéphane Ducasse <[hidden email]> wrote:

> And I forgot but I want to thanks Dale for the help.
> He spotted the bug much faster than me.
>
> Stef
>
>
>> Hi guys
>>
>> I finished to find a stupid bug today. Now the moose reloader works.
>> The idea is that you can freeze a complete Moose tools and be able to take a 1.4 image and reload all the packages
>> that were loaded when you snapshot it.
>>
>> I could reload the latest version of Moose in a 1.4 image.
>> I published the result on ConfigurationOfMoose.
>>
>>
>> Gofer new
>>         url: 'http://smalltalkhub.com/mc/StephaneDucasse/MooseReloader/main'
>>         username:  ''
>>         password: '';
>>    package: 'ReloaderForMoose';
>>    load
>>
>>
>>
>> Here is the comment of this class.
>>
>>
>>
>> I'm a kind of saver/loader that knows how to save and load list of packages by recursively navigating metacello configurationOf. To work I need a metacello record and a place to save package version.
>>
>> Here are examples to create a spec of packages to be saved.
>> ===========================================
>> In an image containing the loaded configuration of the tools you want to version execute the following:
>>
>> Reloader new
>> configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
>> repositoryClass: MooseConfigurationRepositoryForPharo14;
>> publishNewVersion
>>
>> Reloader new
>> configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
>> repositoryClass: ConfigurationOfMoose;
>> publishNewVersion
>>
>> It will produce a method called scriptXxx in the repositoryClass you specify.
>> Here is an example of such method.
>>
>>
>> script5
>>
>> ^ #(
>> #('ConfigurationOfFame-StephaneDucasse.6.mcz'  'http://www.squeaksource.com/Fame/'  'ConfigurationOfFame' )
>> #('ConfigurationOfMooseAlgos-TudorGirba.28.mcz'  'http://www.squeaksource.com/MooseAlgos/'  'ConfigurationOfMooseAlgos' ) ......
>> )
>>
>>
>> You can then use this method as follows, for example in a ConfigurationOf you can
>>
>> flatVersion47: spec
>> <version: '4.7-flat'>
>>
>> spec for: #common do: [
>> self populateSpec: spec with: self script5 ]
>>
>> Note that the populateSpec:  with: is generated when necessary.  
>>
>>
>> Reloading.
>> ===================================
>> In another image you can reload the configuration in two different ways:
>> either by using metacello or by using the reloader.
>>
>> Using metacello is simple if you created a method similar to
>> flatVersion47: spec
>> <version: '4.7-flat'>
>>
>> spec for: #common do: [
>> self populateSpec: spec with: self script5 ]
>>
>> just execute
>>
>> (ConfigurationOfMoose project version: '4.7-flat') load
>>
>>
>>
>> If you do not use a configurationOf you can simply invoke the method reload: with the number of the script
>>
>> using the method
>>
>> reload: aNumber
>> and it will load all the packages you previously specified.
>>
>> reloadLatest
>> will load the latest script version
>>
>> Typical use cases are:
>> ------------------------------------
>> Reloader new
>> repositoryClass: MooseConfigurationRepositoryForPharo14;
>> reload: 2
>>
>> Reloader new
>> repositoryClass: SynectiqueCaseOneConfigurationRepository;
>> publishNewVersion
>>
>> Reloader new
>> repositoryClass: SynectiqueCaseOneConfigurationRepository;
>> loginSpecification: {{ '*squeaksource*' . 'sd' . 'xyxyx'} . { '*ss3*' . 'StephaneDucasse' . 'xxxx'} . { '*' . '' . ''}};
>> reload: 2
>>
>>
>>
>> ===================================================
>> Implementation Notes.
>> First version fully working on metacello records.
>>
>> Let me know if it works for you.
>>
>> Stef
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Sometimes the best solution is not the best solution."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Freezing version Moose-based tools

Tudor Girba-2
And thank you, Dale! :)

Doru


On Jan 29, 2013, at 5:40 AM, Tudor Girba <[hidden email]> wrote:

> Thank you, Stef!
>
> This is very cool. Finally, we can have a process that can accommodate both working on the latest version and having reproducibility.
>
> Cheers,
> Doru
>
>
> On Jan 29, 2013, at 12:44 AM, Stéphane Ducasse <[hidden email]> wrote:
>
>> And I forgot but I want to thanks Dale for the help.
>> He spotted the bug much faster than me.
>>
>> Stef
>>
>>
>>> Hi guys
>>>
>>> I finished to find a stupid bug today. Now the moose reloader works.
>>> The idea is that you can freeze a complete Moose tools and be able to take a 1.4 image and reload all the packages
>>> that were loaded when you snapshot it.
>>>
>>> I could reload the latest version of Moose in a 1.4 image.
>>> I published the result on ConfigurationOfMoose.
>>>
>>>
>>> Gofer new
>>>        url: 'http://smalltalkhub.com/mc/StephaneDucasse/MooseReloader/main'
>>>        username:  ''
>>>        password: '';
>>>   package: 'ReloaderForMoose';
>>>   load
>>>
>>>
>>>
>>> Here is the comment of this class.
>>>
>>>
>>>
>>> I'm a kind of saver/loader that knows how to save and load list of packages by recursively navigating metacello configurationOf. To work I need a metacello record and a place to save package version.
>>>
>>> Here are examples to create a spec of packages to be saved.
>>> ===========================================
>>> In an image containing the loaded configuration of the tools you want to version execute the following:
>>>
>>> Reloader new
>>> configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
>>> repositoryClass: MooseConfigurationRepositoryForPharo14;
>>> publishNewVersion
>>>
>>> Reloader new
>>> configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
>>> repositoryClass: ConfigurationOfMoose;
>>> publishNewVersion
>>>
>>> It will produce a method called scriptXxx in the repositoryClass you specify.
>>> Here is an example of such method.
>>>
>>>
>>> script5
>>>
>>> ^ #(
>>> #('ConfigurationOfFame-StephaneDucasse.6.mcz'  'http://www.squeaksource.com/Fame/'  'ConfigurationOfFame' )
>>> #('ConfigurationOfMooseAlgos-TudorGirba.28.mcz'  'http://www.squeaksource.com/MooseAlgos/'  'ConfigurationOfMooseAlgos' ) ......
>>> )
>>>
>>>
>>> You can then use this method as follows, for example in a ConfigurationOf you can
>>>
>>> flatVersion47: spec
>>> <version: '4.7-flat'>
>>>
>>> spec for: #common do: [
>>> self populateSpec: spec with: self script5 ]
>>>
>>> Note that the populateSpec:  with: is generated when necessary.  
>>>
>>>
>>> Reloading.
>>> ===================================
>>> In another image you can reload the configuration in two different ways:
>>> either by using metacello or by using the reloader.
>>>
>>> Using metacello is simple if you created a method similar to
>>> flatVersion47: spec
>>> <version: '4.7-flat'>
>>>
>>> spec for: #common do: [
>>> self populateSpec: spec with: self script5 ]
>>>
>>> just execute
>>>
>>> (ConfigurationOfMoose project version: '4.7-flat') load
>>>
>>>
>>>
>>> If you do not use a configurationOf you can simply invoke the method reload: with the number of the script
>>>
>>> using the method
>>>
>>> reload: aNumber
>>> and it will load all the packages you previously specified.
>>>
>>> reloadLatest
>>> will load the latest script version
>>>
>>> Typical use cases are:
>>> ------------------------------------
>>> Reloader new
>>> repositoryClass: MooseConfigurationRepositoryForPharo14;
>>> reload: 2
>>>
>>> Reloader new
>>> repositoryClass: SynectiqueCaseOneConfigurationRepository;
>>> publishNewVersion
>>>
>>> Reloader new
>>> repositoryClass: SynectiqueCaseOneConfigurationRepository;
>>> loginSpecification: {{ '*squeaksource*' . 'sd' . 'xyxyx'} . { '*ss3*' . 'StephaneDucasse' . 'xxxx'} . { '*' . '' . ''}};
>>> reload: 2
>>>
>>>
>>>
>>> ===================================================
>>> Implementation Notes.
>>> First version fully working on metacello records.
>>>
>>> Let me know if it works for you.
>>>
>>> Stef
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Sometimes the best solution is not the best solution."
>

--
www.tudorgirba.com

"There are no old things, there are only old ways of looking at them."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Freezing version Moose-based tools

Usman Bhatti
In reply to this post by Stéphane Ducasse
That's cool. We will start using it soon.

Usman


On Tue, Jan 29, 2013 at 12:39 AM, Stéphane Ducasse <[hidden email]> wrote:
Hi guys

I finished to find a stupid bug today. Now the moose reloader works.
The idea is that you can freeze a complete Moose tools and be able to take a 1.4 image and reload all the packages
that were loaded when you snapshot it.

I could reload the latest version of Moose in a 1.4 image.
I published the result on ConfigurationOfMoose.


Gofer new
          url: 'http://smalltalkhub.com/mc/StephaneDucasse/MooseReloader/main'
          username:  ''
          password: '';
     package: 'ReloaderForMoose';
     load



Here is the comment of this class.



I'm a kind of saver/loader that knows how to save and load list of packages by recursively navigating metacello configurationOf. To work I need a metacello record and a place to save package version.

Here are examples to create a spec of packages to be saved.
===========================================
In an image containing the loaded configuration of the tools you want to version execute the following:

Reloader new
        configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
        repositoryClass: MooseConfigurationRepositoryForPharo14;
        publishNewVersion

Reloader new
        configurationRecordInput: (((Smalltalk globals at: #ConfigurationOfMoose) project version: 'default') ignoreImage: true; record) ;
        repositoryClass: ConfigurationOfMoose;
        publishNewVersion

It will produce a method called scriptXxx in the repositoryClass you specify.
Here is an example of such method.


script5

        ^ #(
                #('ConfigurationOfFame-StephaneDucasse.6.mcz'  'http://www.squeaksource.com/Fame/'  'ConfigurationOfFame' )
                #('ConfigurationOfMooseAlgos-TudorGirba.28.mcz'  'http://www.squeaksource.com/MooseAlgos/'  'ConfigurationOfMooseAlgos' ) ......
        )


You can then use this method as follows, for example in a ConfigurationOf you can

flatVersion47: spec
        <version: '4.7-flat'>

        spec for: #common do: [
                self populateSpec: spec with: self script5 ]

Note that the populateSpec:  with: is generated when necessary.


Reloading.
===================================
In another image you can reload the configuration in two different ways:
either by using metacello or by using the reloader.

Using metacello is simple if you created a method similar to
flatVersion47: spec
        <version: '4.7-flat'>

        spec for: #common do: [
                self populateSpec: spec with: self script5 ]

        just execute

(ConfigurationOfMoose project version: '4.7-flat') load



If you do not use a configurationOf you can simply invoke the method reload: with the number of the script

using the method

        reload: aNumber
                and it will load all the packages you previously specified.

        reloadLatest
                will load the latest script version

Typical use cases are:
------------------------------------
Reloader new
        repositoryClass: MooseConfigurationRepositoryForPharo14;
        reload: 2

Reloader new
        repositoryClass: SynectiqueCaseOneConfigurationRepository;
        publishNewVersion

Reloader new
        repositoryClass: SynectiqueCaseOneConfigurationRepository;
        loginSpecification: {{ '*squeaksource*' . 'sd' . 'xyxyx'} . { '*ss3*' . 'StephaneDucasse' . 'xxxx'} . { '*' . '' . ''}};
        reload: 2



===================================================
Implementation Notes.
First version fully working on metacello records.

Let me know if it works for you.

Stef


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev