Thursday, February 20, 2014

FileTree and Cypress support in upcoming Pharo 3.0

One of the interesting additions in soon to be released Pharo 3.0 is the out of the box support for FileTree repositories in Monticello. With this you can easily store your source code also in the file system and use external versioning systems if you like.

A short example:

Create a new package "MyPackage" and add a new class:

Object subclass: #Foo
instanceVariableNames: ''
classVariableNames: ''
category: 'MyPackage'

In the Monticello Browser (after adding the package) click on "+Repository" to add a new repository and select "filetree://" to the package. The system will come up with a file dialog to query for a folder to use.

Now save your package and you will see that a subfolder "MyPackage.package" is created. It will also include files with the source code. Now yoou can use any external versioning system if you like.

Regarding the file format: the Cypress project is used here - a cross Smalltalk dialect, disk-based package import/export format. More infos can be found on https://github.com/CampSmalltalk/Cypress

With this right built in it should also be much easier to exchange code between other Smalltalk Systems and Pharo.

No comments:

Post a Comment