Of Metacello, Git, Scripting and Things ESUG 2012 Dale Henrichs VMware Thursday, September 20, 2012
May 17, 2015
Of Metacello, Git, Scripting and Things
ESUG 2012Dale Henrichs
VMware
Thursday, September 20, 2012
“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
“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
FileTree directory structure
Thursday, September 20, 2012
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
“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
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
Why Git?
Git makes it possible to leverage GitHub’s most excellent tools.
Thursday, September 20, 2012
“[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
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
GitHub: Pull Request
https://github.com/github/github-services/pull/377
Thursday, September 20, 2012
GitHub: Pull Request
https://github.com/github/github-services/pull/373
Thursday, September 20, 2012
GitHub: Commit Comments
https://github.com/github/github-services/pull/373#issuecomment-7586837
Thursday, September 20, 2012
GitHub: Pull Request Comments
https://github.com/github/github-services/pull/373
GitHub: Commit Comments
Thursday, September 20, 2012
TravisCI automatically runs build against Pull Rquests
https://github.com/dalehenrich/builderCI/pull/14
Thursday, September 20, 2012
GitHub: continuous integration w/Travis CI
http://travis-ci.org/#!/dalehenrich/builderCI/builds/2205547
Thursday, September 20, 2012
Sample TravisCI log
http://travis-ci.org/#!/dalehenrich/builderCI/jobs/2205548
Thursday, September 20, 2012
travisCI.st for Sample project
https://github.com/dalehenrich/sample/blob/master/tests/baselineTravisCI.st
Thursday, September 20, 2012
Why Git for Smalltalk?
Git can bring sophisticated branch-based workflow to Smalltalk without having to build it from scratch!
Thursday, September 20, 2012
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
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
https://github.com/CampSmalltalk/Cypress/blob/master/img/CypressStructure-STIC2012.png
Cypress spec
Thursday, September 20, 2012
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
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
filetree://
filetree:// <path>
filetree:///opt/git/filetree/packages
Thursday, September 20, 2012
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
BaselineOf
single #baseline: method in the BaselinOf class
Thursday, September 20, 2012
ConfigurationOf
Metacello version numbers become tags for git commits
Thursday, September 20, 2012
Scripting APIInvented API to replace the “standard” load expression:
with this expression:
Thursday, September 20, 2012
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
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