Top Banner
Of Metacello, Git, Scripting and Things ESUG 2012 Dale Henrichs VMware Thursday, September 20, 2012
31

Of metacello, git, scripting and things

May 17, 2015

Download

Technology

ESUG

Talk of ESUG 2012, Ghent
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Of metacello, git, scripting and things

Of Metacello, Git, Scripting and Things

ESUG 2012Dale Henrichs

VMware

Thursday, September 20, 2012

Page 2: Of metacello, git, scripting and things

“It is not sufficient to manage Smallatlk source files in git ...

for Smalltalk we need to manage package structure”

Dale Henrichsbefore January 2012

Thursday, September 20, 2012

Page 3: Of metacello, git, scripting and things

“We've built a little package [FileTree] that allows us to save all our source in git.

...In short, we save and load all the monticello packages on our project as smalltalk source files. We use git to merge and not

monticello....

We are 5-6 developers on the project, committing numerous times a day. We currently have about 1100 classes and 23500

methods managed in this way.”

Otto BehrensJanuary 2012

http://forum.world.st/Smalltalk-for-small-projects-only-tt4336237.html#a4339381

Thursday, September 20, 2012

Page 4: Of metacello, git, scripting and things

FileTree directory structure

Thursday, September 20, 2012

Page 5: Of metacello, git, scripting and things

What is Git?

• Disk-based, Distributed Version Control System for source code

• `Clone` repository to local disk for off-line work

• Each `clone` is a complete copy of repository

• Merge changes to/from any other `clone`

Thursday, September 20, 2012

Page 6: Of metacello, git, scripting and things

“Git really changed the way developers think of merging and branching.

...merging/branching has always been considered a bit scary

...with Git, these actions are extremely cheap and simple, and they

are considered one of the core parts of your daily workflow”

A successful Git branching model “Git-Flow” January 2010

Vincent Driessenhttp://nvie.com/posts/a-successful-git-branching-model/

Why Git?

Thursday, September 20, 2012

Page 7: Of metacello, git, scripting and things

A successful Git branching model“Git-Flow” January 2010

Vincent Driessenhttp://nvie.com/posts/a-successful-git-branching-model/

Git-Flow

Thursday, September 20, 2012

Page 8: Of metacello, git, scripting and things

Why Git?

Git makes it possible to leverage GitHub’s most excellent tools.

Thursday, September 20, 2012

Page 9: Of metacello, git, scripting and things

“[Git-Flow is] more complicated than I think most developers and development teams actually require”

GitHub FlowAugust 2011

Scott Chaconhttp://scottchacon.com/2011/08/31/github-flow.html

Thursday, September 20, 2012

Page 10: Of metacello, git, scripting and things

GitHub Flow

• Use named branches off master for all development

• use PULL request to review and merge work into master branch

• deploy as soon as you merge into the master branch

GitHub FlowAugust 2011

Scott Chaconhttp://scottchacon.com/2011/08/31/github-flow.html

Thursday, September 20, 2012

Page 11: Of metacello, git, scripting and things

GitHub: Pull Request

https://github.com/github/github-services/pull/377

Thursday, September 20, 2012

Page 12: Of metacello, git, scripting and things

GitHub: Pull Request

https://github.com/github/github-services/pull/373

Thursday, September 20, 2012

Page 13: Of metacello, git, scripting and things

GitHub: Commit Comments

https://github.com/github/github-services/pull/373#issuecomment-7586837

Thursday, September 20, 2012

Page 14: Of metacello, git, scripting and things

GitHub: Pull Request Comments

https://github.com/github/github-services/pull/373

GitHub: Commit Comments

Thursday, September 20, 2012

Page 15: Of metacello, git, scripting and things

TravisCI automatically runs build against Pull Rquests

https://github.com/dalehenrich/builderCI/pull/14

Thursday, September 20, 2012

Page 16: Of metacello, git, scripting and things

GitHub: continuous integration w/Travis CI

http://travis-ci.org/#!/dalehenrich/builderCI/builds/2205547

Thursday, September 20, 2012

Page 17: Of metacello, git, scripting and things

Sample TravisCI log

http://travis-ci.org/#!/dalehenrich/builderCI/jobs/2205548

Thursday, September 20, 2012

Page 18: Of metacello, git, scripting and things

travisCI.st for Sample project

https://github.com/dalehenrich/sample/blob/master/tests/baselineTravisCI.st

Thursday, September 20, 2012

Page 19: Of metacello, git, scripting and things

Why Git for Smalltalk?

Git can bring sophisticated branch-based workflow to Smalltalk without having to build it from scratch!

Thursday, September 20, 2012

Page 20: Of metacello, git, scripting and things

Git/GitHub Ecosystem• Cypress

• Cross-dialect package structure

• FileTree

• Monticello integration w/Git

• MetacelloPreview

• filetree:// and github:// repo types

• BaselineOf and ConfigurationOf

• Scripting APIThursday, September 20, 2012

Page 21: Of metacello, git, scripting and things

Cypress

“The goal of the Cypress project is to have a version controlled environment for cross-dialect projects.

We do not aim to replace existing dialect solutions.”

https://github.com/CampSmalltalk/Cypress

Thursday, September 20, 2012

Page 22: Of metacello, git, scripting and things

https://github.com/CampSmalltalk/Cypress/blob/master/img/CypressStructure-STIC2012.png

Cypress spec

Thursday, September 20, 2012

Page 23: Of metacello, git, scripting and things

Cypress implementations

• Amber (amber-cypress)

• Cuis (cuis-cypress)

• GemStone (FileTree)

• Pharo (FileTree)

• Squeak (FileTree)

• VW (STIG)

https://github.com/CampSmalltalk/Cypress#cypress-implementations

Thursday, September 20, 2012

Page 24: Of metacello, git, scripting and things

FileTree

FileTree is a fully functional Monticello repository type where packages are stored in Cypress format instead

of .mcz fomat.

FileTree is SCM neutral and can be used with git, mercurial, svn, etc.

https://github.com/dalehenrich/filetree

Thursday, September 20, 2012

Page 25: Of metacello, git, scripting and things

filetree://

filetree:// <path>

filetree:///opt/git/filetree/packages

Thursday, September 20, 2012

Page 26: Of metacello, git, scripting and things

github://github:// <user> / <project> [ : <SHA> ] [ / <path> ]

github://dalehenrich/filetree:master/packages github://dalehenrich/filetree:1.0/packages github://dalehenrich/filetree:a772ac2ecc/packages

Thursday, September 20, 2012

Page 27: Of metacello, git, scripting and things

BaselineOf

single #baseline: method in the BaselinOf class

Thursday, September 20, 2012

Page 28: Of metacello, git, scripting and things

ConfigurationOf

Metacello version numbers become tags for git commits

Thursday, September 20, 2012

Page 29: Of metacello, git, scripting and things

Scripting APIInvented API to replace the “standard” load expression:

with this expression:

Thursday, September 20, 2012

Page 30: Of metacello, git, scripting and things

Current Status

• Metacello class for scripts will be included in base images for Pharo2.0 and Squeak4.4.

• MetacelloPreview 1.0-beta.32.2

• looking for a few git savvy users to use the preview release

• FsGit

• in-image support for Git

Thursday, September 20, 2012

Page 31: Of metacello, git, scripting and things

Resources/Questions

mailing list: http://groups.google.com/group/metacellopreview installation & docs: https://github.com/dalehenrich/metacello-work/blob/master/README.md

Metacello Dr. will be IN today and ThursdayAll questions will be answered!

Thursday, September 20, 2012