SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
&
www.cea.fr
Thierry Goubier
CEA List,
F91191 Gif-Sur-Yvette Cedex
thierry.goubier@cea.fr
Professional Source
Code Management
with Pharo
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 2&
Source Code Management in Pharo
●
Pharo has native tools for version control
– Monticello
– Metacello
●
That is:
– Packages
– Versionning (history)
– Merging
– Configurations
– Scripting configurations
– Remote / local repositories
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 3&
Source Code Management in Pharo
●
Monticello
– A package is a .mcz, a zip file containing
●
a binary snapshot (for the current version)
●
a source snapshot (for the current version)
●
metadata: the version
●
the version history
– Mcz is named: package-author.versionNo.mcz
– A package contains only the current version code
●
even if the version metadata contains the versionning history
– There is no explicit support for branches
●
System only represent an author and a version number
●
Versions have UUIDs
●
But they are not allways used: select by file name often
– Two different packages versions may have same name but different UUIDs
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 4&
Source Code Management in Pharo
●
Monticello
– Merge
●
Three way merges:
– between two versions, find a common ancestor : the merge version starting point
– apply changes from ancestor to each version in the merge version
– if both versions have changes at the same place : merge conflict: ask user
●
Three way merge is the standard, modern feature of version control system
●
Require access to all history...
– which is not guaranteed in Monticello repositories: merge failed for missing history
– Branches
●
Supported but ... not obvious.
– Not apparent in the tools, not apparent in the package name.
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 5&
Source Code Management in Pharo
●
Metacello
– Notion of a version of a project
●
Tie one package (or multiple packages) to a single point
– A release tag ?
– v1.0
– stable
– bleeding edge
●
A configuration object
– More about that later
– Load a configuration version:
●
load all refered packages at a specific point
●
or the latest version of all (development or bleeding edge)
– Can track dependencies
– Fairly complete and complex
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 6&
Source Code Management in Pharo
●
Scripting
– Gofer
Gofer it
url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30';
package: 'ConfigurationOfRoassal2';
load
– Metacello
●
an example later ...
●
Remote repositories, hosting
– Squeaksource / Smalltalkhub
– FTP / HTTP
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 7&
Professional Source Code Management
●
Professional Source Code Management ?
– What is in use in the Company trying / using Pharo!
●
RCS / Software Configuration Management
– Can't be changed.
– Is tied to the company
●
Coding / development rules
●
Culture
●
Quality process
– Can Pharo adapt:
●
Yes!
●
But pay attention to features and processes
– Is Monticello or our tools up to date?
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 8&
Professional SCM with Pharo
●
Professional SCM features
– Branches
– Control
– Integration
●
Branches
– Multiple branches for usual work
– Three broad categories
●
Releases
●
Bug fixes
●
Development(s)
– More or less flexible
– Integrated tagging
●
release points, snapshots, baselines
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 9&
Example: a bit of FileTree
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 10&
Professional SCM with Pharo
●
Control
– Who is in charge of integrating / releasing
●
Not collegial but hierarchical
– Enforced by the tools ?
●
Integration
– merge
– reviews
– tests
●
fairly "company culture"
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 11&
Professional SCM with Pharo
●
How Pharo fits in?
– Format: all RCS are text oriented
●
FileTree
– Map a Monticello package onto text files
– Everything: methods, class definitions, class comments, extensions, version history
– Standard on Pharo >= 3.0
– Integrates into Monticello / Metacello
– Merge: the RCS should merge, not Monticello
●
For correct tracking and sync with the non-Pharo part of the project
●
Merge may not work properly over Smalltalk code and metadata
– Merge conflicts.
– Commit and all operations of the RCS
●
Done outside Pharo
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 12&
Professional SCM with Pharo : Git
●
Pharo + FileTree
– One package = one directory in the git repository
– Multiple packages inside a FileTree repository directory in the git repository
●
Multiple FileTree repositories possible inside the git repository
– Git use on the command line
●
clone commit checkout branch push pull merge ...
●
or on the GUI: meld, gitg, gitk, ...
– Can combine with Makefiles
●
To build a customized Pharo image: versionned configuration management
– Fit within any workflow with git
●
Issue 1: desynchronisation between Monticello and git repository
●
Issue 2: merge conflicts with the Monticello metadata in FileTree
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 13&
Professional SCM with Pharo: Git
●
Pharo + FileTree + Branches
– Shows only the branch history
– Isolate from changes on other branches (team work / features / bug fixes dev)
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 14&
Professional SCM with Pharo: Git
●
Pharo + FileTree + Branches + Baseline
– Baseline
●
Current project configuration is top of the branch
●
Just list packages in the Baseline
●
Store Baseline as FileTree inside that branch
Metacello new
baseline: 'AltBrowser';
repository: 'filetree://home/thierry/src/AltBrowser';
load
●
will work on the pharo3.0 branch, will work on the pharo4.0 branch, etc...
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 15&
Professional SCM with Pharo: Git
●
Pharo + FileTree + Branches + Baseline + Metacello
– Deployment with specific large scale repositories
●
A Baseline per branch /= per tag (semantic versions)
●
github:// urls for github.com projects (bitbucket:// urls for bitbucket.org)
Metacello new
baseline: 'SmaCC';
repository: 'github://ThierryGoubier/SmaCC:v2.0.4';
load
– Configurations?
●
Just point to the right branch or version tag, load baseline.
●
With qualifiers, can track bugfixes /minor releases
– (v2.0.* will track 2.0.4, 2.0.5 ...)
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 16&
Professional SCM with Pharo: Git
●
Pharo + FileTree + Branches + Baseline + Metacello +
GitFileTree
– Automate usual Git commands from Pharo
●
clone push pull commit checkout
– Extract Git versionning info inside Pharo
– Avoid desynchronisation / simplify workflow
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 17&
Professional SCM with Pharo: Git
●
Pharo + FileTree + Branches + Baseline + Metacello +
GitFileTree + MergeDriver
– Add a merge driver to git to handle merges of Monticello metadata
●
Command line tool written in Pharo,
●
Used in non-Pharo projects :)
– Resolve merge conflicts
– Experimental?
Cliquez pour modifier le style du titre
DACLE Division| January 2015© CEA. All rights reserved | 18&
Professional SCM with Pharo: X
●
Pharo + FileTree + Branches + Baseline + Metacello
+ ... for X
– Where X is SVN, mercurial, bazaar, CVS, etc...
●
Git integration:
– Template for integrating external RCS commands
– And extracting version info from the RCS inside Pharo
●
Can be reused for X
– Base: Monticello + FileTree + Metacello + Baseline
– Estimation : 1, 2 man month work (adaptation of existing template)
●
Not the same issue as
– Moving Pharo development to Git / Github.
Centre de Grenoble
17 rue des Martyrs
38054 Grenoble Cedex
Centre de Saclay
Nano-Innov PC 172
91191 Gif sur Yvette Cedexcontact.dacle@cea.fr
Thank you

Weitere ähnliche Inhalte

Andere mochten auch

PharoDAYS 2015: Graphics and Visualization by Yuriy Tymchuk
PharoDAYS 2015: Graphics and Visualization by Yuriy TymchukPharoDAYS 2015: Graphics and Visualization by Yuriy Tymchuk
PharoDAYS 2015: Graphics and Visualization by Yuriy TymchukPharo
 
PharoDAYS 2015: Publishing libraries and frameworks by Sven Van Caekenberghe
PharoDAYS 2015: Publishing libraries and frameworks by Sven Van CaekenberghePharoDAYS 2015: Publishing libraries and frameworks by Sven Van Caekenberghe
PharoDAYS 2015: Publishing libraries and frameworks by Sven Van CaekenberghePharo
 
PharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban Lorenzano
PharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban LorenzanoPharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban Lorenzano
PharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban LorenzanoPharo
 
PharoDAYS 2015: Seaside in 10 minutes by Johan Brichau
PharoDAYS 2015: Seaside in 10 minutes by Johan BrichauPharoDAYS 2015: Seaside in 10 minutes by Johan Brichau
PharoDAYS 2015: Seaside in 10 minutes by Johan BrichauPharo
 
PharoDAYS 2015: Using Spec to Build a UI by Johan Fabry
PharoDAYS 2015: Using Spec to Build a UI by Johan FabryPharoDAYS 2015: Using Spec to Build a UI by Johan Fabry
PharoDAYS 2015: Using Spec to Build a UI by Johan FabryPharo
 
Pharo Hands-On: 01 welcome
Pharo Hands-On: 01 welcomePharo Hands-On: 01 welcome
Pharo Hands-On: 01 welcomePharo
 
Pharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo
 
Pharo Hands-on: 05 object model
Pharo Hands-on: 05 object modelPharo Hands-on: 05 object model
Pharo Hands-on: 05 object modelPharo
 
Pharo Hand-Ons: 06 finding information
Pharo Hand-Ons: 06 finding informationPharo Hand-Ons: 06 finding information
Pharo Hand-Ons: 06 finding informationPharo
 
PharoDAYS 2015: On Relational Databases by Guille Polito
PharoDAYS 2015: On Relational Databases by Guille PolitoPharoDAYS 2015: On Relational Databases by Guille Polito
PharoDAYS 2015: On Relational Databases by Guille PolitoPharo
 

Andere mochten auch (10)

PharoDAYS 2015: Graphics and Visualization by Yuriy Tymchuk
PharoDAYS 2015: Graphics and Visualization by Yuriy TymchukPharoDAYS 2015: Graphics and Visualization by Yuriy Tymchuk
PharoDAYS 2015: Graphics and Visualization by Yuriy Tymchuk
 
PharoDAYS 2015: Publishing libraries and frameworks by Sven Van Caekenberghe
PharoDAYS 2015: Publishing libraries and frameworks by Sven Van CaekenberghePharoDAYS 2015: Publishing libraries and frameworks by Sven Van Caekenberghe
PharoDAYS 2015: Publishing libraries and frameworks by Sven Van Caekenberghe
 
PharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban Lorenzano
PharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban LorenzanoPharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban Lorenzano
PharoDAYS 2015: FFI - The good, the bad and the ugly by Esteban Lorenzano
 
PharoDAYS 2015: Seaside in 10 minutes by Johan Brichau
PharoDAYS 2015: Seaside in 10 minutes by Johan BrichauPharoDAYS 2015: Seaside in 10 minutes by Johan Brichau
PharoDAYS 2015: Seaside in 10 minutes by Johan Brichau
 
PharoDAYS 2015: Using Spec to Build a UI by Johan Fabry
PharoDAYS 2015: Using Spec to Build a UI by Johan FabryPharoDAYS 2015: Using Spec to Build a UI by Johan Fabry
PharoDAYS 2015: Using Spec to Build a UI by Johan Fabry
 
Pharo Hands-On: 01 welcome
Pharo Hands-On: 01 welcomePharo Hands-On: 01 welcome
Pharo Hands-On: 01 welcome
 
Pharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntaxPharo Hands-On: 02 syntax
Pharo Hands-On: 02 syntax
 
Pharo Hands-on: 05 object model
Pharo Hands-on: 05 object modelPharo Hands-on: 05 object model
Pharo Hands-on: 05 object model
 
Pharo Hand-Ons: 06 finding information
Pharo Hand-Ons: 06 finding informationPharo Hand-Ons: 06 finding information
Pharo Hand-Ons: 06 finding information
 
PharoDAYS 2015: On Relational Databases by Guille Polito
PharoDAYS 2015: On Relational Databases by Guille PolitoPharoDAYS 2015: On Relational Databases by Guille Polito
PharoDAYS 2015: On Relational Databases by Guille Polito
 

Ähnlich wie PharoDAYS 2015: Professional Source Code Management with Pharo by Thierry Goubier

TaraVault Overview Presentation (2021)
TaraVault Overview Presentation (2021)TaraVault Overview Presentation (2021)
TaraVault Overview Presentation (2021)Inflectra
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101Mathew Beane
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*Haggai Philip Zagury
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineElasTest Project
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101Mathew Beane
 
OSMC 2022 | Git Good – How knowing git can make your life easier by Feu Mourek
OSMC 2022 | Git Good – How knowing git can make your life easier by Feu MourekOSMC 2022 | Git Good – How knowing git can make your life easier by Feu Mourek
OSMC 2022 | Git Good – How knowing git can make your life easier by Feu MourekNETWAYS
 
BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)Drupal Portugal
 
Unify logz with fluentd
Unify logz with fluentdUnify logz with fluentd
Unify logz with fluentdSoluto
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...hamidsamadi
 
Magento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions DistributionMagento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions DistributionSergii Shymko
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionMeet Magento Italy
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Mathew Beane
 
Git Workflows
Git WorkflowsGit Workflows
Git WorkflowsNoam Kfir
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 

Ähnlich wie PharoDAYS 2015: Professional Source Code Management with Pharo by Thierry Goubier (20)

TaraVault Overview Presentation (2021)
TaraVault Overview Presentation (2021)TaraVault Overview Presentation (2021)
TaraVault Overview Presentation (2021)
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Git ops & Continuous Infrastructure with terra*
Git ops  & Continuous Infrastructure with terra*Git ops  & Continuous Infrastructure with terra*
Git ops & Continuous Infrastructure with terra*
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
OSMC 2022 | Git Good – How knowing git can make your life easier by Feu Mourek
OSMC 2022 | Git Good – How knowing git can make your life easier by Feu MourekOSMC 2022 | Git Good – How knowing git can make your life easier by Feu Mourek
OSMC 2022 | Git Good – How knowing git can make your life easier by Feu Mourek
 
vvvvReadme
vvvvReadmevvvvReadme
vvvvReadme
 
Git workshop
Git workshopGit workshop
Git workshop
 
BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)BRANCHING MODELS (workshop)
BRANCHING MODELS (workshop)
 
Unify logz with fluentd
Unify logz with fluentdUnify logz with fluentd
Unify logz with fluentd
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
 
Magento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions DistributionMagento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions Distribution
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions Distribution
 
Magento 2 Deploy Strategies
Magento 2 Deploy StrategiesMagento 2 Deploy Strategies
Magento 2 Deploy Strategies
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Git Workflows
Git WorkflowsGit Workflows
Git Workflows
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
 

Mehr von Pharo

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years laterPharo
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a previewPharo
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in PharoPharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Pharo
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with SpecPharo
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPharo
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPIPharo
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlPharo
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksPharo
 
XmppTalk
XmppTalkXmppTalk
XmppTalkPharo
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchainPharo
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and PharoPharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017Pharo
 
Pharo 6
Pharo 6Pharo 6
Pharo 6Pharo
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoPharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bitsPharo
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the RefactoringsPharo
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM PerformancePharo
 
Git with Style
Git with StyleGit with Style
Git with StylePharo
 

Mehr von Pharo (20)

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years later
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a preview
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in Pharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with Spec
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alpha
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous Integration
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPI
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowl
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorks
 
XmppTalk
XmppTalkXmppTalk
XmppTalk
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchain
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and Pharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017
 
Pharo 6
Pharo 6Pharo 6
Pharo 6
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with Pharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bits
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the Refactorings
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM Performance
 
Git with Style
Git with StyleGit with Style
Git with Style
 

PharoDAYS 2015: Professional Source Code Management with Pharo by Thierry Goubier

  • 1. & www.cea.fr Thierry Goubier CEA List, F91191 Gif-Sur-Yvette Cedex thierry.goubier@cea.fr Professional Source Code Management with Pharo
  • 2. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 2& Source Code Management in Pharo ● Pharo has native tools for version control – Monticello – Metacello ● That is: – Packages – Versionning (history) – Merging – Configurations – Scripting configurations – Remote / local repositories
  • 3. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 3& Source Code Management in Pharo ● Monticello – A package is a .mcz, a zip file containing ● a binary snapshot (for the current version) ● a source snapshot (for the current version) ● metadata: the version ● the version history – Mcz is named: package-author.versionNo.mcz – A package contains only the current version code ● even if the version metadata contains the versionning history – There is no explicit support for branches ● System only represent an author and a version number ● Versions have UUIDs ● But they are not allways used: select by file name often – Two different packages versions may have same name but different UUIDs
  • 4. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 4& Source Code Management in Pharo ● Monticello – Merge ● Three way merges: – between two versions, find a common ancestor : the merge version starting point – apply changes from ancestor to each version in the merge version – if both versions have changes at the same place : merge conflict: ask user ● Three way merge is the standard, modern feature of version control system ● Require access to all history... – which is not guaranteed in Monticello repositories: merge failed for missing history – Branches ● Supported but ... not obvious. – Not apparent in the tools, not apparent in the package name.
  • 5. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 5& Source Code Management in Pharo ● Metacello – Notion of a version of a project ● Tie one package (or multiple packages) to a single point – A release tag ? – v1.0 – stable – bleeding edge ● A configuration object – More about that later – Load a configuration version: ● load all refered packages at a specific point ● or the latest version of all (development or bleeding edge) – Can track dependencies – Fairly complete and complex
  • 6. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 6& Source Code Management in Pharo ● Scripting – Gofer Gofer it url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30'; package: 'ConfigurationOfRoassal2'; load – Metacello ● an example later ... ● Remote repositories, hosting – Squeaksource / Smalltalkhub – FTP / HTTP
  • 7. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 7& Professional Source Code Management ● Professional Source Code Management ? – What is in use in the Company trying / using Pharo! ● RCS / Software Configuration Management – Can't be changed. – Is tied to the company ● Coding / development rules ● Culture ● Quality process – Can Pharo adapt: ● Yes! ● But pay attention to features and processes – Is Monticello or our tools up to date?
  • 8. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 8& Professional SCM with Pharo ● Professional SCM features – Branches – Control – Integration ● Branches – Multiple branches for usual work – Three broad categories ● Releases ● Bug fixes ● Development(s) – More or less flexible – Integrated tagging ● release points, snapshots, baselines
  • 9. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 9& Example: a bit of FileTree
  • 10. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 10& Professional SCM with Pharo ● Control – Who is in charge of integrating / releasing ● Not collegial but hierarchical – Enforced by the tools ? ● Integration – merge – reviews – tests ● fairly "company culture"
  • 11. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 11& Professional SCM with Pharo ● How Pharo fits in? – Format: all RCS are text oriented ● FileTree – Map a Monticello package onto text files – Everything: methods, class definitions, class comments, extensions, version history – Standard on Pharo >= 3.0 – Integrates into Monticello / Metacello – Merge: the RCS should merge, not Monticello ● For correct tracking and sync with the non-Pharo part of the project ● Merge may not work properly over Smalltalk code and metadata – Merge conflicts. – Commit and all operations of the RCS ● Done outside Pharo
  • 12. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 12& Professional SCM with Pharo : Git ● Pharo + FileTree – One package = one directory in the git repository – Multiple packages inside a FileTree repository directory in the git repository ● Multiple FileTree repositories possible inside the git repository – Git use on the command line ● clone commit checkout branch push pull merge ... ● or on the GUI: meld, gitg, gitk, ... – Can combine with Makefiles ● To build a customized Pharo image: versionned configuration management – Fit within any workflow with git ● Issue 1: desynchronisation between Monticello and git repository ● Issue 2: merge conflicts with the Monticello metadata in FileTree
  • 13. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 13& Professional SCM with Pharo: Git ● Pharo + FileTree + Branches – Shows only the branch history – Isolate from changes on other branches (team work / features / bug fixes dev)
  • 14. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 14& Professional SCM with Pharo: Git ● Pharo + FileTree + Branches + Baseline – Baseline ● Current project configuration is top of the branch ● Just list packages in the Baseline ● Store Baseline as FileTree inside that branch Metacello new baseline: 'AltBrowser'; repository: 'filetree://home/thierry/src/AltBrowser'; load ● will work on the pharo3.0 branch, will work on the pharo4.0 branch, etc...
  • 15. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 15& Professional SCM with Pharo: Git ● Pharo + FileTree + Branches + Baseline + Metacello – Deployment with specific large scale repositories ● A Baseline per branch /= per tag (semantic versions) ● github:// urls for github.com projects (bitbucket:// urls for bitbucket.org) Metacello new baseline: 'SmaCC'; repository: 'github://ThierryGoubier/SmaCC:v2.0.4'; load – Configurations? ● Just point to the right branch or version tag, load baseline. ● With qualifiers, can track bugfixes /minor releases – (v2.0.* will track 2.0.4, 2.0.5 ...)
  • 16. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 16& Professional SCM with Pharo: Git ● Pharo + FileTree + Branches + Baseline + Metacello + GitFileTree – Automate usual Git commands from Pharo ● clone push pull commit checkout – Extract Git versionning info inside Pharo – Avoid desynchronisation / simplify workflow
  • 17. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 17& Professional SCM with Pharo: Git ● Pharo + FileTree + Branches + Baseline + Metacello + GitFileTree + MergeDriver – Add a merge driver to git to handle merges of Monticello metadata ● Command line tool written in Pharo, ● Used in non-Pharo projects :) – Resolve merge conflicts – Experimental?
  • 18. Cliquez pour modifier le style du titre DACLE Division| January 2015© CEA. All rights reserved | 18& Professional SCM with Pharo: X ● Pharo + FileTree + Branches + Baseline + Metacello + ... for X – Where X is SVN, mercurial, bazaar, CVS, etc... ● Git integration: – Template for integrating external RCS commands – And extracting version info from the RCS inside Pharo ● Can be reused for X – Base: Monticello + FileTree + Metacello + Baseline – Estimation : 1, 2 man month work (adaptation of existing template) ● Not the same issue as – Moving Pharo development to Git / Github.
  • 19. Centre de Grenoble 17 rue des Martyrs 38054 Grenoble Cedex Centre de Saclay Nano-Innov PC 172 91191 Gif sur Yvette Cedexcontact.dacle@cea.fr Thank you