Configuring Metacello with github on Squeak

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

Configuring Metacello with github on Squeak

Albert Vonpupp
Hello,

This is my first post, I'm a total newbie to Squeak but so far I'm finding it very interesting. I have to develop an academic project with a classmate and so far I've used Squeak alone by my own without sharing anything so this new requirements raised some questions.

I managed to use Montecello fine but It seems to do a version control like on packed files (like a jar, doing a Java analogy). I thought of using Montecello over Dropbox with my friend. Is this solution reliable / recommended?

For me it seems more intuitive using git versioning over code files instead of packed files. To accomplish that I've read something about Metacello, but the Squeak installation seems *very* confusing to me. I managed to create a filetree repository but I don't know how to link it to my git repo: https://github.com/poo2013pos/FLOdactic with the spec file and how to proceed then (over Squeak or over the console with the git command). I've read both manuals of Metacello, the one on Github and the one on Google Code but no luck so far. Can anyone please help me with this?

Thanks a lot!

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Configuring Metacello with github on Squeak

Dale Henrichs
Albert,

I've embedded my comments in-line...

Dale

----- Original Message -----
| From: "Albert Vonpupp" <[hidden email]>
| To: [hidden email]
| Sent: Sunday, April 14, 2013 5:43:45 PM
| Subject: [Metacello] Configuring Metacello with github on Squeak
|
| Hello,
|
| This is my first post, I'm a total newbie to Squeak but so far I'm finding
| it very interesting. I have to develop an academic project with a classmate
| and so far I've used Squeak alone by my own without sharing anything so
| this new requirements raised some questions.
|
| I managed to use Montecello fine but It seems to do a version control like
| on packed files (like a jar, doing a Java analogy). I thought of using
| Montecello over Dropbox with my friend. Is this solution reliable /
| recommended?

If you keep your Dropbox folder up-to-date and merge regularly, I would think that that would work well ... this is the model that Monticello was designed for ...
|
| For me it seems more intuitive using git versioning over code files instead
| of packed files.

Yes, using Monticello takes a bit of getting used to, but if you are sharing a single package, it can work quite well, once you develop the habit of using the MonticelloBrowser to merge changes when starting work and then checking for updates and merging before/during saving your work back ...

| To accomplish that I've read something about Metacello,
| but the Squeak installation seems *very* confusing to me.

Metacello was invented to address the issues of managing multiple Monticello packages, projects that have dependencies upon other projects and projects that may have platform-dependent packages ... things that Monticello doesn't do well ...

Metacello is still in the process of being adopted by Squeak and Pharo (Pharo2.0 is the first release with Metacello pre-loaded) so you're experiencing a bit of the early adopter pain:) ... I have a new release "in the oven" that should make bootstrapping a bit easier, but it isn't quite ready for prime time, so the bootstrap process is still a bit awkward ...

| I managed to
| create a filetree repository but I don't know how to link it to my git
| repo: https://github.com/poo2013pos/FLOdactic with the spec file and how to
| proceed then (over Squeak or over the console with the git command). I've
| read both manuals of Metacello, the one on Github and the one on Google
| Code but no luck so far. Can anyone please help me with this?
|

Ah yes, I guess there is a hole in the documentation there... First you need to clone your github repository to your local drive:

  git clone https://github.com/poo2013pos/FLOdactic.git

Then using the MonticelloBrowser, you create a filetree repository by selecting the FLOdactic folder that contains your cloned git repository.

With the MonticelloBrowser, you can then simply load the packages manually using Gofer or Installer referencing the FileTree repository ... If you don't have a lot of packages or don't depend upon other projects this option should work pretty well (i.e., not using Metacello at all).

You also use the MonticelloBrowse to save new versions of the file to your git repository, then you use the os command line to manually commit and push the contents of your repository using `git` commands...

If you want to hook up the Metacello Preview, then you need to follow the directions here[1] to bootstrap the preview. Next you would want to create a BaselineOf for your project. I suggest that you look at the Sample repository[2] for inspiration and for you BaselineOfFLOdactic you should take a look at BaslineOfSample>>baseline method[3].

Basically you create the BaselineOfFLOdactic class, save it in the FLOdactic repository, then you can use the Metacello Scripting API (in the Metacello Preview release) to load your code with the following expression:

  Metacello new
    baseline: 'FLOdactic';
    repository: 'filetree://<path to local FLOdactic git repository>';
    load.

The final step would be to create a ConfigurationOfFLOdactic and again you can look at the configuration branch of the Sample project[4] for inspiration. In this case you create sets of version* methods that look like ConfigurationOfSample>>version091:[5] ... The configuration references the BaselineOfSample so there's no need to create a baseline method when using Configurations with github repositories. Finally you can use the Metacello Scripting api to load your code directly from the github repository:

  Metacello new
    configuration: 'FLOdactic';
    version: '1.0'; "or whatever"
    repository: 'github://poo2013pos/FLOdactic:configuration';
    load.

Note that when you load directly from the github, the repository is readonly ... the big missing piece for this scheme at the moment is git/image integration, so to you need to do manual git clone and filetree repository if you want to commit changes ...

Hopefully, I've answered your questions and given some better pointers,

Dale

[1] https://github.com/dalehenrich/metacello-work/blob/master/README.md
[2] https://github.com/dalehenrich/sample
[3] https://github.com/dalehenrich/sample/blob/master/repository/BaselineOfSample.package/BaselineOfSample.class/instance/baseline..st
[4] https://github.com/dalehenrich/sample/blob/configuration/
[5] https://github.com/dalehenrich/sample/blob/configuration/ConfigurationOfSample.package/ConfigurationOfSample.class/instance/version091..st

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Configuring Metacello with github on Squeak

Albert Vonpupp
Many thanks for your great and kind answer Dale!

Your post helped me a lot! I think I'm going to stuck to filetree and git right now until I gain some knowledge. So far it seems to work for my needs.

Regards!

On Monday, April 15, 2013 10:09:07 PM UTC-3, Dale wrote:
Albert,

I've embedded my comments in-line...

Dale

----- Original Message -----
| From: "Albert Vonpupp" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WLmh-aVDuvcJ">von...@...>
| To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WLmh-aVDuvcJ">meta...@...
| Sent: Sunday, April 14, 2013 5:43:45 PM
| Subject: [Metacello] Configuring Metacello with github on Squeak
|
| Hello,
|
| This is my first post, I'm a total newbie to Squeak but so far I'm finding
| it very interesting. I have to develop an academic project with a classmate
| and so far I've used Squeak alone by my own without sharing anything so
| this new requirements raised some questions.
|
| I managed to use Montecello fine but It seems to do a version control like
| on packed files (like a jar, doing a Java analogy). I thought of using
| Montecello over Dropbox with my friend. Is this solution reliable /
| recommended?

If you keep your Dropbox folder up-to-date and merge regularly, I would think that that would work well ... this is the model that Monticello was designed for ...
|
| For me it seems more intuitive using git versioning over code files instead
| of packed files.

Yes, using Monticello takes a bit of getting used to, but if you are sharing a single package, it can work quite well, once you develop the habit of using the MonticelloBrowser to merge changes when starting work and then checking for updates and merging before/during saving your work back ...

| To accomplish that I've read something about Metacello,
| but the Squeak installation seems *very* confusing to me.

Metacello was invented to address the issues of managing multiple Monticello packages, projects that have dependencies upon other projects and projects that may have platform-dependent packages ... things that Monticello doesn't do well ...

Metacello is still in the process of being adopted by Squeak and Pharo (Pharo2.0 is the first release with Metacello pre-loaded) so you're experiencing a bit of the early adopter pain:) ... I have a new release "in the oven" that should make bootstrapping a bit easier, but it isn't quite ready for prime time, so the bootstrap process is still a bit awkward ...

| I managed to
| create a filetree repository but I don't know how to link it to my git
| repo: https://github.com/poo2013pos/FLOdactic with the spec file and how to
| proceed then (over Squeak or over the console with the git command). I've
| read both manuals of Metacello, the one on Github and the one on Google
| Code but no luck so far. Can anyone please help me with this?
|

Ah yes, I guess there is a hole in the documentation there... First you need to clone your github repository to your local drive:

  git clone https://github.com/poo2013pos/FLOdactic.git

Then using the MonticelloBrowser, you create a filetree repository by selecting the FLOdactic folder that contains your cloned git repository.

With the MonticelloBrowser, you can then simply load the packages manually using Gofer or Installer referencing the FileTree repository ... If you don't have a lot of packages or don't depend upon other projects this option should work pretty well (i.e., not using Metacello at all).

You also use the MonticelloBrowse to save new versions of the file to your git repository, then you use the os command line to manually commit and push the contents of your repository using `git` commands...

If you want to hook up the Metacello Preview, then you need to follow the directions here[1] to bootstrap the preview. Next you would want to create a BaselineOf for your project. I suggest that you look at the Sample repository[2] for inspiration and for you BaselineOfFLOdactic you should take a look at BaslineOfSample>>baseline method[3].

Basically you create the BaselineOfFLOdactic class, save it in the FLOdactic repository, then you can use the Metacello Scripting API (in the Metacello Preview release) to load your code with the following expression:

  Metacello new
    baseline: 'FLOdactic';
    repository: 'filetree://<path to local FLOdactic git repository>';
    load.

The final step would be to create a ConfigurationOfFLOdactic and again you can look at the configuration branch of the Sample project[4] for inspiration. In this case you create sets of version* methods that look like ConfigurationOfSample>>version091:[5] ... The configuration references the BaselineOfSample so there's no need to create a baseline method when using Configurations with github repositories. Finally you can use the Metacello Scripting api to load your code directly from the github repository:

  Metacello new
    configuration: 'FLOdactic';
    version: '1.0'; "or whatever"
    repository: 'github://poo2013pos/FLOdactic:configuration';
    load.

Note that when you load directly from the github, the repository is readonly ... the big missing piece for this scheme at the moment is git/image integration, so to you need to do manual git clone and filetree repository if you want to commit changes ...

Hopefully, I've answered your questions and given some better pointers,

Dale

[1] https://github.com/dalehenrich/metacello-work/blob/master/README.md
[2] https://github.com/dalehenrich/sample
[3] https://github.com/dalehenrich/sample/blob/master/repository/BaselineOfSample.package/BaselineOfSample.class/instance/baseline..st
[4] https://github.com/dalehenrich/sample/blob/configuration/
[5] https://github.com/dalehenrich/sample/blob/configuration/ConfigurationOfSample.package/ConfigurationOfSample.class/instance/version091..st

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.