Project dependency management with Iceberg

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

Project dependency management with Iceberg

Vitor Medina Cruz
Hello,

How do I do project dependency management with Iceberg? I tried sometime ago but I was unable to understand how it work together with Metacello, is there some tutorial available?

Regards,
Vitor
Reply | Threaded
Open this post in threaded view
|

Re: Project dependency management with Iceberg

Guillermo Polito
Hi,

On Tue, Jun 19, 2018 at 3:16 PM Vitor Medina Cruz <[hidden email]> wrote:
Hello,

How do I do project dependency management with Iceberg?

This is still Metacello.
 
I tried sometime ago but I was unable to understand how it work together with Metacello, is there some tutorial available?

Well, there is a chapter in the Deep Into Pharo book


But that covers ConfigurationOf only. The technical part on how you define a dependency does not change too much between Configurations and Baselines.
The main difference is that 
- a ConfigurationOf will store inside it several baselines (in baseline methods) and several versions (in version methods)
- a BaselineOf defines a single baseline in a baseline method. And versions are declared in the VCS using whatever you like the most, most commonly being tags.

Then, inside a BaselineOf, if you want to define a dependency to a project in github for example, you can specify it like this:

spec
baseline: 'Tonel' 
with: [ spec repository: 'github://pharo-vcs/tonel:v1.0.9/src' ]
 
Where Tonel is the name of the project and the strangish url is then used to construct a github url. So it's something like

[provider]://[owner-name]/[project-name][:version][/subdirectory]

- provider can be (so far) any of github, bitbucket, gitorious
- If version is ommited then it will just download the main branch (usually master)
- Otherwise you can specify any commitish (commit hash, tag name, branch name)
- If your source code is stored in a subdirectory of the repository, you can specify it after the version.

Then, to load project you can either 
- use the Metacello plugin from Iceberg (right click -> Metacello -> Install baseline)
- evaluate a Metacello expression in the playground

Metacello new 
    baseline: 'Tonel'; 
    repository: 'github://pharo-vcs/tonel:v1.0.9/src' ; 
    load 

Of course you can then just look for senders of #baseline:with: to see other examples in the image.

Cheers,
Guille
Reply | Threaded
Open this post in threaded view
|

Re: Project dependency management with Iceberg

Vitor Medina Cruz
thanks.

On Tue, Jun 19, 2018 at 10:59 AM, Guillermo Polito <[hidden email]> wrote:
Hi,

On Tue, Jun 19, 2018 at 3:16 PM Vitor Medina Cruz <[hidden email]> wrote:
Hello,

How do I do project dependency management with Iceberg?

This is still Metacello.
 
I tried sometime ago but I was unable to understand how it work together with Metacello, is there some tutorial available?

Well, there is a chapter in the Deep Into Pharo book


But that covers ConfigurationOf only. The technical part on how you define a dependency does not change too much between Configurations and Baselines.
The main difference is that 
- a ConfigurationOf will store inside it several baselines (in baseline methods) and several versions (in version methods)
- a BaselineOf defines a single baseline in a baseline method. And versions are declared in the VCS using whatever you like the most, most commonly being tags.

Then, inside a BaselineOf, if you want to define a dependency to a project in github for example, you can specify it like this:

spec
baseline: 'Tonel' 
with: [ spec repository: 'github://pharo-vcs/tonel:v1.0.9/src' ]
 
Where Tonel is the name of the project and the strangish url is then used to construct a github url. So it's something like

[provider]://[owner-name]/[project-name][:version][/subdirectory]

- provider can be (so far) any of github, bitbucket, gitorious
- If version is ommited then it will just download the main branch (usually master)
- Otherwise you can specify any commitish (commit hash, tag name, branch name)
- If your source code is stored in a subdirectory of the repository, you can specify it after the version.

Then, to load project you can either 
- use the Metacello plugin from Iceberg (right click -> Metacello -> Install baseline)
- evaluate a Metacello expression in the playground

Metacello new 
    baseline: 'Tonel'; 
    repository: 'github://pharo-vcs/tonel:v1.0.9/src' ; 
    load 

Of course you can then just look for senders of #baseline:with: to see other examples in the image.

Cheers,
Guille