Monthly Archives: July 2017

How to publish github managed project to Pharo Catalog

Hi Norbert,

I manage some of my projects already in GitHub. For example Tealight which is also in catalog.

Anything you have to do is
1) to create a “tag” in git  (see https://stackoverflow.com/questions/18216991/create-a-tag-in-github-repository), I name the tags with the according version number like 0.0.2 following semantic versioning (http://semver.org)
2) provide a ConfigurationOf (as you had in the past) where the “version” references the “git tag” with the same name
a) also #stable has to point to the “version” as it was in the past
optional:  b) the #development should point to the Baseline in the git branch that you typically use for development (this allows for loading of bleeding edge as before)
3) upload the Configuration to a MetaRepo as before to appear in catalog

Example:
=======
1) I have two tagged versions for Tealight on Git (0.0.1 and 0.0.2)
https://github.com/astares/Tealight/releases

2) In my ConfigurationOfTealight (which I also manage in git) I reference the tag, for example in version 0.0.2 I reference the tag with the same name “github://astares/Tealight:0.0.2/repository”:
See  https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/v0_0_2..st

Side note: a) now you can use your #stable definition in the ConfigurationOf as before https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/stable..st
b) Your #development definition should point to the master branch (or whatever the development branch is)

https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/development..st
https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/dev..st

3) http://smalltalkhub.com/#!/~Pharo/MetaRepoForPharo60/packages/ConfigurationOfTealight

Iceberg is managed in a similar way (but is now included in the image and the catalog part is only for compatibility).

Hope this helps.

Thanks
Torsten

Advertisements

Pharo 6.1 (summer) released!

Hi,
We are releasing Pharo 6.1.
Usually, between each major version we just apply bugfixes changing the build number and not announcing new versions but this time is different since the fixes applied required a new VM.
The principal reason for the new version is to update Iceberg support, bringing it to macOS 64bits version.
So, now Pharo 6.1 comes with Iceberg 0.5.5, which includes:
– running on macOS 64bits
– adds cherry pick
– adds major improvements on performance for big repositories
– adds pull request review plugin
– repositories browser: group branches by remote
– adds bitbucket and gitlab to recognised providers on metacello integration
– uses libgit v0.25.1 as backend
– several bugfixes
Other important change:
– linux vm by default is now vm threaded heartbeat.
We still miss 64bits Windows (sorry for that), but we are getting there. I hope to have it running right after ESUG.
To download 6.1 version, you can go to http://pharo.org/download page, or with zeroconf:
wget -O- get.pharo.org | bash
Enjoy!

System Monitoring Images & Nagios

Hi,
I just made it nagios compatible. I developed it because I’m using munin [1]. You can look at this [2] blog post how to do it. If you have questions just ask.
Norbert

Segment.com API

I made a segment.com API tool here:

http://smalltalkhub.com/#!/~pdebruic/SegmentIO

and they take the logging events and can send it to any of these 200+ tools:

https://segment.com/catalog

Last time I checked it was working but its been a while.  Unless they’ve
changed things dramatically it should work.

Paul

Free Ephemeric Cloud for Members

Pharo cloud… is now available for free for Pharo association members.

https://association.pharo.org/news/4897928

Sista: the Optimizing JIT for Pharo getting open-alpha

Another great blog post from Clement Bera one of the main architect of the forth coming optimising JIT for Pharo

https://clementbera.wordpress.com/2017/07/19/sista-open-alpha-release/

Stef

Keccak-256 hashing algorithm

Hi there!

I am just releasing the first version of the Keccak-256 hashing algorithm. https://en.wikipedia.org/wiki/SHA-3
This  version is based on a javascript implementation: https://github.com/emn178/js-sha3
This implementation supports  as message: bytearray and ascii and utf-8 strings.
Soon i will be adding support to the rest of the Keccak family of hashing functions, since the implementations is quite configurable, is just need to add some constructors with specific configurations and tests for this other cases of usage.
Here a onliner for building an image with the version v0.1:
Hope you find it useful 🙂

[ANN] Iceberg 0.5 released

Hi all,
I’m releasing 0.5 version of iceberg.
This is the changelog:
Major changes:
—-
– works on 64bits
– adds cheery-pick
Other:
—-
This version also includes a list of fixes, most important one is this:
– branchs are kept inline with local working copy (so if you change a branch in command line or in another image it will indicate it correctly)
But there are many others, next version will have a full list, I promise 🙂
Now, to actually use it you will need to accomplish several steps (until I update the image)
1) You need to download the new stable VM for P7 (it does not matters if you are on P6).
Zeroconf:
64bits:
wget -O- get.pharo.org/64/vm70 | bash
wget -O- get.pharo.org/64/vmT70 | bash #If you are on linux
32bits:
wget -O- get.pharo.org/vm70 | bash
wget -O- get.pharo.org/vmT70 | bash #If you are on linux
then, to update, execute this (sorry, this is like that because we have still an older Metacello version):
#(‘Iceberg-UI’ ‘Iceberg-Plugin’ ‘Iceberg-Metacello-Integration’ ‘Iceberg-Libgit’ ‘Iceberg’ ‘BaselineOfIceberg’ ‘LibGit-Core’ ‘BaselineOfLibGit’)
do: [ :each | each asPackage removeFromSystem ].
Metacello new
  baseline: ‘Iceberg’;
  repository: ‘github://pharo-vcs/iceberg‘;
  load.
There will be a version of 6.1 that provide Iceberg 0.5 but it requires different version of C plugins hence a different VM.
cheers!

News from PR battle front

I prepared a script that should help you with the reviews of the pull requests on Pharo 7. We will later convert it into a more fancy tool. It does next steps:
– sets the basic information: pull request number, path to your pharo repository clone, name of your fork.
– registers the repository into Iceberg and sets pull and push target remotes
– switches branch to a particular commit from which the Pharo image was bootstrapped
– registers the repository into into Monticello packages to be able to do correct diffs
– gets basic information about the pull request from GitHub (original repository, branch name)
– registers the PR original repository into remotes if needed and fetches information from it
– creates a new local branch to merge the PR
– merges the PR branch
– displays a simple tool that shows differences in done in this merged branch
——–
pullRequest := 73.
target := ‘/path/pharo’ asFileReference.
myForkName := ‘myFork’.
repository := IceRepositoryCreator new location: target; subdirectory:’src’; createRepository.
repository register.
fork := repository remotes detect: [ :remote | remote remoteName = myForkName ].
repository pushRemote: fork.
repository pullRemote: repository origin.
repository checkoutBranch: (SystemVersion current commitHash).
fileTreeRepository := (MCFileTreeRepository new directory: target / #src; yourself).
repositoryGroup := MCRepositoryGroup withRepositories: { fileTreeRepository. MCCacheRepository uniqueInstance. }.
MCWorkingCopy allManagers
select: [ :wc | (wc repositoryGroup repositories reject: [ :repo | repo isCache ]) isEmpty ]
thenDo: [ :wc | wc repositoryGroup: repositoryGroup ].
stonString := (ZnEasy get: ‘https://api.github.com/repos/pharo-project/pharo/pulls/‘, pullRequest asString) contents.
head := (STONJSON fromString: stonString) at: ‘head’.
sshUrl := (head at: #repo) at: ‘ssh_url’.
branchName := head at: #ref.
user := (sshUrl withoutPrefix: ‘git@github.com:’) withoutSuffix: ‘/pharo.git’.
fork := repository remotes detect: [ :remote | remote remoteName = user ] ifNone: [
| newFork |
newFork := (IceRemote name: user url: (‘git@github.com:{1}/pharo.git’ format: {user})).
repository addRemote: newFork.
newFork ].
repository fetchFrom: fork.
prMergedBranchName := ‘pr’, pullRequest asString.
repository createBranch: prMergedBranchName.
repository checkoutBranch: prMergedBranchName.
commit := repository revparse: user, ‘/’, branchName.
bootstrapCommit := repository revparse: (SystemVersion current commitHash).
[ repository backend merge: commit id ]
on: IceMergeAborted
do: [ :error | repository mergeConflictsWith: commit   ] .
headCommit := repository revparse: ‘HEAD’.
browser := GLMTabulator new.
browser row: [:row | row column: #commits span: 2; column: #changes span: 3]; row: #diff.
browser transmit to: #commits.
browser transmit to: #changes; from: #commits; andShow: [ :a :commitInfo |
(IceDiffChangeTreeBuilder new entity: commitInfo; diff: (IceDiff from: commitInfo to: bootstrapCommit); buildOn: a) title: ‘Changes’. ].
browser transmit from: #commits; from: #changes;  to: #diff; andShow: [ :a |
a diff title: ‘Left: working copy / Right: incoming updates’; display: [ :commitInfo :change |
{ change theirVersion ifNil: ”. change myVersion ifNil: ”. }]].
browser openOn: {headCommit}.
——–
The merge operation only changes the Git working copy, no code is loaded into the image. If you want to test the PR code, currently you need to open Iceberg and reload all packages in the Pharo repository (Packages tab, Reload all)
Expect troubles 🙂
Cheers,
— Pavel

Iceberg 0.5.1 with Pull Request review tool

I just released Iceberg version 0.5.1 with a Pull Request tool Guille and I worked on since yesterday.
It allows you to list open Pull Requests (by right click on a repo, GitHub/Review pull requests… option):
unnamed.png
And then if you doubleclick on one (or select it with right button), you will see this:
unnamed-1.png
it allows you to see changes and
– merge changes into your image (in case you want to see more in details the code, run tests, etc.)
– accept a pull request
– reject a pull request
no, it does not shows (at least *yet*) comments, and it does not allows you to add comments, reviews, etc.
this could be done, but not time to implement it now, so for now this has to be enough.
Again, this can be loaded in a 6.0 image by executing this script:
#(‘Iceberg-UI’ ‘Iceberg-Plugin’ ‘Iceberg-Metacello-Integration’ ‘Iceberg-Libgit’ ‘Iceberg’ ‘BaselineOfIceberg’ ‘LibGit-Core’ ‘BaselineOfLibGit’) do: [ :each | each asPackage removeFromSystem ].
Metacello new
  baseline: ‘Iceberg’;
  repository: ‘github://pharo-vcs/iceberg:v0.5.1‘;
  load.
(and you still need to have the vm that is meant for Pharo7)
This tools are open for you to use on your projects… and to improve them, I accept pull requests on pharo-vcs/iceberg.
cheers!