Showing posts with label package management. Show all posts
Showing posts with label package management. Show all posts

Wednesday, 4 November 2015

The code packaging system in Pharo. A summary

RPackage is Pharo’s internal representation of a package. One way to organize classes in the system.

RPackages should (by design) correspond to a Monticello package, where Monticello is the code-package repository and versioning system

Metacello is a package management system that manages dependencies between different Monticello packages (providing the equivalent of the facilities such as maven, npm, apt-get)

Versionner helps you to generate Metacello configurations

The Configuration Browser allows you to browse the Metacello configurations from a given repository, and load them.

- Guillermo Polito

Tuesday, 3 November 2015

Groups - as used in the System Browser's Packages pane

System Browser groups

These are just to help you group packages that you need in development.

They are different from groups in Metacello.

If you open the system browser "Nautilus":

in Pharo 4, there are three items at the top of the list of packages in the packages pane.
   Last Modified Classes.
   Most Viewed Classes and
   Work )
in Pharo 5 there are two types of item at the top of the list of packages in the packages pane.
   _____s, of which there is one
      Last Modified Methods
   Groups (of which there are two)
      Configurations
      Work

"Configurations" includes all the "ConfigurationOfXXX" packages. You don't usually want to see them in the list of code packages, as you'll use the System Browser for viewing and amending the code packages, and Versionner to amend and manage the Configuration packages, so they've been corralled into this category in the System Browser.

In an initial image the "Work" group is empty.

If you like you can put the package you are currently developing into this group.

Just right click on the "Work" tree node and select "Open group manager". You can put packages in or
create own custom groups for browsing code packages.

This means that when you're working on a package starting with a letter late in the alphabet, (like, say, "Zinc-HTTP") you are saved from having to scroll-down through the list of all packages to get to it, each time.  Instead, you can get to it in the Work group (or any other group you add it to), up at the top of the packages pane of the System Browser.

Configuration Browser

Problem : Loading a Monticello package without using the configurationOf or baselineOf containing the dependency information causes problem in loading the package.

Solution: Learn to load via a configuration

The convention for where these ConfigurationOf / baselineOf things are kept, and the way to check for their existence.

The Configuration Browser

The Pharo image holds a meta-repository of configurations, and a baseline is usually kept along with the packages.  The Configuration Browser is a GUI to access it.

To check on a Pharo version, open the ConfigurationBrowser

Monticello is a browser for Packages in the image.  (and contains tools for loading in new packages, if there are no inter-package dependencies), and for saving updated versions of the packages

Metacello is a browser for Projects. (A Project is a group of packages + dependencies)

The Configuration Browser knows about unloaded Packages held in Repositories - if they are listed in that Pharo image's meta repository.

So an image has a sort-of Pharo core of things which are actually in the image.  And also a sort of Pharo fringe of things that the Image knows about, within its Meta Repository, which it knows how to load in a working configuration

Configurations will add repositories and fetch packages, e.g. the configuration for SandstoneDb in the ConfigurationBrowser of Pharo 4.

Usability issue:
For the naive user
Having two buttons on the Configuration Browser is confusing:
Either alone seem to have obvious visibility
Both together have low visibility, and suggest there is some learning I need to do to be able to use it