1. Of Metacello, Git,
Scripting and Things
ESUG 2012
Dale Henrichs
VMware
Thursday, September 20, 2012
2. “It is not sufficient to manage Smallatlk source files in git
...
for Smalltalk we need to manage package structure”
Dale Henrichs
before January 2012
Thursday, September 20, 2012
3. “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 Behrens
January 2012
http://forum.world.st/Smalltalk-for-small-projects-only-tt4336237.html#a4339381
Thursday, September 20, 2012
5. 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
6. Why Git?
“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 Driessen
http://nvie.com/posts/a-successful-git-branching-model/
Thursday, September 20, 2012
7. Git-Flow
A successful Git branching model
“Git-Flow”
January 2010
Vincent Driessen
http://nvie.com/posts/a-successful-git-branching-model/
Thursday, September 20, 2012
8. Why Git?
Git makes it possible to leverage GitHub’s most excellent
tools.
Thursday, September 20, 2012
9. “[Git-Flow is] more complicated than I think most developers
and development teams actually require”
GitHub Flow
August 2011
Scott Chacon
http://scottchacon.com/2011/08/31/github-flow.html
Thursday, September 20, 2012
10. 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 Flow
August 2011
Scott Chacon
http://scottchacon.com/2011/08/31/github-flow.html
Thursday, September 20, 2012
11. GitHub: Pull Request
https://github.com/github/github-services/pull/377
Thursday, September 20, 2012
12. GitHub: Pull Request
https://github.com/github/github-services/pull/373
Thursday, September 20, 2012
13. GitHub: Commit Comments
https://github.com/github/github-services/pull/373#issuecomment-7586837
Thursday, September 20, 2012
15. TravisCI automatically runs build against Pull Rquests
https://github.com/dalehenrich/builderCI/pull/14
Thursday, September 20, 2012
16. GitHub: continuous integration w/Travis CI
http://travis-ci.org/#!/dalehenrich/builderCI/builds/2205547
Thursday, September 20, 2012
17. Sample TravisCI log
http://travis-ci.org/#!/dalehenrich/builderCI/jobs/2205548
Thursday, September 20, 2012
18. travisCI.st for Sample project
https://github.com/dalehenrich/sample/blob/master/tests/baselineTravisCI.st
Thursday, September 20, 2012
19. Why Git for Smalltalk?
Git can bring sophisticated branch-based workflow
to Smalltalk without having to build it from scratch!
Thursday, September 20, 2012
20. Git/GitHub Ecosystem
• Cypress
• Cross-dialect package structure
• FileTree
• Monticello integration w/Git
• MetacelloPreview
• filetree:// and github:// repo types
• BaselineOf and ConfigurationOf
• Scripting API
Thursday, September 20, 2012
21. 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
22. Cypress spec
https://github.com/CampSmalltalk/Cypress/blob/master/img/CypressStructure-STIC2012.png
Thursday, September 20, 2012
24. 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
25. filetree://
filetree:// <path>
filetree:///opt/git/filetree/packages
Thursday, September 20, 2012
27. BaselineOf
single #baseline: method in the BaselinOf class
Thursday, September 20, 2012
28. ConfigurationOf
Metacello version numbers become tags for git commits
Thursday, September 20, 2012
29. Scripting API
Invented API to replace the “standard” load
expression:
with this expression:
Thursday, September 20, 2012
30. 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
31. Resources/Questions
mailing list: http://groups.google.com/group/metacello
preview installation & docs: https://github.com/dalehenrich/metacello-work/blob/master/README.md
Metacello Dr. will be IN today and Thursday
All questions will be answered!
Thursday, September 20, 2012