The Metacello Preview release (1.0-beta.32.2) is ready for preview!
The Metacello Preview release provides the following features: - Metacello Scripting API (user guide[1] and reference[2]) - Metacello-Base package for inclusion in Squeak/Pharo base images - support for git and GitHub (filetree:// and github:// repository loaded) During the preview period I hope to get feedback from you guys as you use the scripting api in your day-to-day work. Of course I'm looking for bug reports, but I am also looking for feedback on how the api works for you: - are there things that "you still can't do" - are there things that are "still too complicated" - are there things that could be "done better" - are there things that "should be covered" As I work with the API, I can see additional features,etc. But I needed to cut off enhancements and get it in the hands of users before going any farther. The set of functionality currently presented covers the major points of functionality and creates a foundation for further enhancements. Before deciding to go with the preview be aware that during the preview process it is very likely that there will be changes to the Scripting APi and git/GitHub support. I will make a best effort to maintain compatibility, but I make no guarantees. 1.0-beta.32.2 and each successive preview release won't be changing out from under you but some features may not survive the preview period. To install the Metacello Preview release, follow the instructions here[8]. The Scripting API was created with a couple of goals in mind: - simplify the ubiquitous "installation two-step" - provide a small self-booting kernel for inclusion in base images - provide more control over Metacello's decision making process - provide support for git-based development - support for Semantic Versioning[3] ##Installation two-step You are all familiar with the one-two installation involving Gofer and Metacello: Gofer new package: 'ConfigurationOfSeaside30'; squeaksource: 'MetacelloRepository'; load. ((Smalltalk at: #ConfigurationOfSeaside30) version: #stable) load. and of course if you use Squeak you have to translate the use of Gofer to Installer. Here's the same load using the Scripting API: Metacello new configuration: 'Seaside30'; version: #stable; squeaksource: 'MetacelloRepository'; load. Once the self-booting kernel is included in Squeak and Pharo, the above expression will work for "all Smalltalks" out of the box. The Scripting API contains 7 major commands: - load/fetch/record - get - lock/unlock - list I encourage you to read through the User Guide[2] to get an overview of the API. The more detailed and not-quite-finished Scripting API Reference[1] goes into more detail. ##Self-booting kernel The self-booting kernel includes just three small classes: - Metacello[4] - ConfigurationOf[5] - BaselineOf[6] By including the Metacello class in the base image, users will not have to use a dialect-specific expression to install the configuration into the image. When one of the Metacello scripting commands is executed, Metacello bootstraps itself into the image. The ConfigurationOf and BaselineOf classes provide common superclasses for configurations making it no longer necessary to copy a template class to create a configuration. The class comments for three classes[4][5][6] have detailed instructions for using the classes. ##Control over Metacello loads During a load when Metacello is faced with a conflict between the currently loaded version and the required version of project, Metacello has always chosen to disallow downgrades and allow upgrades. This policy has worked pretty well over time, but it isn't applicable in all cases. Another common problem is that your application is designed to work with a specific version of a project, but when you load addons, Metacello automatically upgrades your project. This can be very annoying and difficult to control with the current system. There are three aspects of the scripting API that give you greater control over upgrading/downgrading during the Metacello load process: - project registry - onUpgrade: and onDowngrade: messages - lock command Each project that is loaded into your image by Metacello is recorded in the *project registry*. The registry records the configuration class, version and repository from which the configuration was loaded. During the load process Metacello looks in the project registry to find out which version of the project is loaded. Metacello no longer uses the *currentVersion* calculation to dynamically calculate which version is loaded and this lead to much faster load times. By default, Metacello still will disallow downgrades and allow upgrades, but the onUpgrade: and onDowngrade: messages allow you override the default behavior. For example to disallow all upgrades during a Seaside load, you can use the following load expression: Metacello new configuration: 'Seaside30'; version: #stable; squeaksource: 'MetacelloRepository'; onUpgrade: [:ex :existing :new| ex disallow ]; load. Of course disallowing all upgrades my not be exactly what you want either. The `lock` command allows you to identify the projects that you'd like to control. After locking a project an error will be thrown if there is an attempt to downgrade or upgrade the locked project during a Metacello load. Please read the documentation[1][2] for more detailed information. ##Git and GitHub For this point in time, I prefer to focus on getting the Scripting API correct. The code for the Metacello Preview is using the FileTree and GitHub repositories and I will be doing work with git and GitHub, but I am not quite prepared to document all of the bits and pieces, yet. ##Semantic Versioning When you subclass ConfigurationOf to create a configuration, the default version class is MetacelloSemanticVersionNumber[7] which supports Semantic Versioning[3] by enforcing the standard for version strings and supporting the sort order for versions. [1] https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloScriptingAPI.md [2] https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md [3] https://github.com/mojombo/semver/blob/master/semver.md [4] https://github.com/dalehenrich/metacello-work/blob/master/repository/Metacello-Base.package/Metacello.class [5] https://github.com/dalehenrich/metacello-work/blob/master/repository/Metacello-Base.package/ConfigurationOf.class [6] https://github.com/dalehenrich/metacello-work/blob/master/repository/Metacello-Base.package/BaselineOf.class [7] https://github.com/dalehenrich/metacello-work/tree/master/repository/Metacello-Core.package/MetacelloSemanticVersionNumber.class [8] https://github.com/dalehenrich/metacello-work/blob/master/README.md |
Administrator
|
Thanks, Dale!!
Cheers,
Sean |
On Sunday, July 29, 2012 5:34:42 PM UTC+1, Sean DeNigris wrote:
Indeed - awesome work!
|
In reply to this post by Dale Henrichs
Hi Dale. Thanks for all your great work.
Several months/weeks ago I reported a problem I faced when using my ConfigurationOfMariano where I grouped all the confs I usually use. The problem was that even if I say (ConfigurationOfMariano project version: 'xx') load: 'yyy' , Metacello first tried to download all the rest of the project references of the baseline, or even update to new version of some packages/projects of the baseline were already present. In my case, when I do load: 'yyy' I just want to update/install ONLY 'yyy' and not all the baseline. You told me the new version of Metacello was going to support that. So...is this working now? I ask because it is difficult to test exactly if it works...
Thanks!
On Sun, Jul 29, 2012 at 5:54 PM, Dale Henrichs <[hidden email]> wrote: The Metacello Preview release (1.0-beta.32.2) is ready for preview! Mariano http://marianopeck.wordpress.com |
Do you have a more specific reference/description to/of the issue? Was there a bug filed? I recall the discussion, but not the details ... a link to discussion would help.
I just recently came across Issue 178[1] and I need to check that I've incorporated that fix, but in that case you confirmed that it fixed your problem so I am suspicious that you must be referring to something else. As I think about this, I don't think that I explicitly fixed the issue, but if you use the Metacello scripting api to load your configurations, I don't think you should experience this particular problem because with the Metacello scripting API Metacello doesn't use the image state to determine what version of a package is loaded (it seems that parts of the project were loaded in the base image and that was what "confused" Metacello)... The scripting api uses a project registry and projects are only registered when they are loaded via the scripting api. So, if you haven't directly loaded a project (or indirectly loaded it via dependencies) then the project won't be registered and Metacello shouldn't go down the path of "updating it incorrectly". Sooo, I think that you'll have a better experience if you use the scripting api... One of the main ideas of the scripting api is to give the developer control over the decisions that Metacello makes during the load process. Dale [1] http://code.google.com/p/metacello/issues/detail?id=178 ----- Original Message ----- | From: "Mariano Martinez Peck" <[hidden email]> | To: [hidden email] | Sent: Wednesday, August 1, 2012 7:43:59 AM | Subject: Re: [Metacello] Metacello Preview release 1.0-beta.32.2 | | Hi Dale. Thanks for all your great work. | Several months/weeks ago I reported a problem I faced when using my | ConfigurationOfMariano where I grouped all the confs I usually use. | The problem was that even if I say (ConfigurationOfMariano project | version: 'xx') load: 'yyy' , Metacello first tried to download all | the rest of the project references of the baseline, or even update | to new version of some packages/projects of the baseline were | already present. In my case, when I do load: 'yyy' I just want to | update/install ONLY 'yyy' and not all the baseline. You told me the | new version of Metacello was going to support that. So...is this | working now? I ask because it is difficult to test exactly if it | works... | | | Thanks! | | | On Sun, Jul 29, 2012 at 5:54 PM, Dale Henrichs < [hidden email] | > wrote: | | | The Metacello Preview release (1.0-beta.32.2) is ready for preview! | | The Metacello Preview release provides the following features: | | - Metacello Scripting API (user guide[1] and reference[2]) | - Metacello-Base package for inclusion in Squeak/Pharo base images | - support for git and GitHub (filetree:// and github:// repository | loaded) | | During the preview period I hope to get feedback from you guys as you | use the scripting api in your day-to-day work. Of course I'm looking | for bug reports, but I am also looking for feedback on how the api | works for you: | | - are there things that "you still can't do" | - are there things that are "still too complicated" | - are there things that could be "done better" | - are there things that "should be covered" | | As I work with the API, I can see additional features,etc. But I | needed to cut off enhancements and get it in the hands of users | before going any farther. The set of functionality currently | presented covers the major points of functionality and creates a | foundation for further enhancements. | | Before deciding to go with the preview be aware that during the | preview process it is very likely that there will be changes to the | Scripting APi and git/GitHub support. I will make a best effort to | maintain compatibility, but I make no guarantees. 1.0-beta.32.2 and | each successive preview release won't be changing out from under you | but some features may not survive the preview period. | | To install the Metacello Preview release, follow the instructions | here[8]. | | The Scripting API was created with a couple of goals in mind: | | - simplify the ubiquitous "installation two-step" | - provide a small self-booting kernel for inclusion in base images | - provide more control over Metacello's decision making process | - provide support for git-based development | - support for Semantic Versioning[3] | | ##Installation two-step | | You are all familiar with the one-two installation involving Gofer | and Metacello: | | Gofer new | package: 'ConfigurationOfSeaside30'; | squeaksource: 'MetacelloRepository'; | load. | ((Smalltalk at: #ConfigurationOfSeaside30) version: #stable) load. | | and of course if you use Squeak you have to translate the use of | Gofer to Installer. Here's the same load using the Scripting API: | | Metacello new | configuration: 'Seaside30'; | version: #stable; | squeaksource: 'MetacelloRepository'; | load. | | Once the self-booting kernel is included in Squeak and Pharo, the | above expression will work for "all Smalltalks" out of the box. | | The Scripting API contains 7 major commands: | | - load/fetch/record | - get | - lock/unlock | - list | | I encourage you to read through the User Guide[2] to get an overview | of the API. The more detailed and not-quite-finished Scripting API | Reference[1] goes into more detail. | | ##Self-booting kernel | | The self-booting kernel includes just three small classes: | | - Metacello[4] | - ConfigurationOf[5] | - BaselineOf[6] | | By including the Metacello class in the base image, users will not | have to use a dialect-specific expression to install the | configuration into the image. When one of the Metacello scripting | commands is executed, Metacello bootstraps itself into the image. | | The ConfigurationOf and BaselineOf classes provide common | superclasses for configurations making it no longer necessary to | copy a template class to create a configuration. | | The class comments for three classes[4][5][6] have detailed | instructions for using the classes. | | ##Control over Metacello loads | | During a load when Metacello is faced with a conflict between the | currently loaded version and the required version of project, | Metacello has always chosen to disallow downgrades and allow | upgrades. This policy has worked pretty well over time, but it isn't | applicable in all cases. | | Another common problem is that your application is designed to work | with a specific version of a project, but when you load addons, | Metacello automatically upgrades your project. This can be very | annoying and difficult to control with the current system. | | There are three aspects of the scripting API that give you greater | control over upgrading/downgrading during the Metacello load | process: | | - project registry | - onUpgrade: and onDowngrade: messages | - lock command | | Each project that is loaded into your image by Metacello is recorded | in the *project registry*. The registry records the configuration | class, version and repository from which the configuration was | loaded. During the load process Metacello looks in the project | registry to find out which version of the project is loaded. | Metacello no longer uses the *currentVersion* calculation to | dynamically calculate which version is loaded and this lead to much | faster load times. | | By default, Metacello still will disallow downgrades and allow | upgrades, but the onUpgrade: and onDowngrade: messages allow you | override the default behavior. For example to disallow all upgrades | during a Seaside load, you can use the following load expression: | | Metacello new | configuration: 'Seaside30'; | version: #stable; | squeaksource: 'MetacelloRepository'; | onUpgrade: [:ex :existing :new| ex disallow ]; | load. | | Of course disallowing all upgrades my not be exactly what you want | either. The `lock` command allows you to identify the projects that | you'd like to control. After locking a project an error will be | thrown if there is an attempt to downgrade or upgrade the locked | project during a Metacello load. | | Please read the documentation[1][2] for more detailed information. | | ##Git and GitHub | | For this point in time, I prefer to focus on getting the Scripting | API correct. The code for the Metacello Preview is using the | FileTree and GitHub repositories and I will be doing work with git | and GitHub, but I am not quite prepared to document all of the bits | and pieces, yet. | | ##Semantic Versioning | | When you subclass ConfigurationOf to create a configuration, the | default version class is MetacelloSemanticVersionNumber[7] which | supports Semantic Versioning[3] by enforcing the standard for | version strings and supporting the sort order for versions. | | | [1] | https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloScriptingAPI.md | [2] | https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md | [3] https://github.com/mojombo/semver/blob/master/semver.md | [4] | https://github.com/dalehenrich/metacello-work/blob/master/repository/Metacello-Base.package/Metacello.class | [5] | https://github.com/dalehenrich/metacello-work/blob/master/repository/Metacello-Base.package/ConfigurationOf.class | [6] | https://github.com/dalehenrich/metacello-work/blob/master/repository/Metacello-Base.package/BaselineOf.class | [7] | https://github.com/dalehenrich/metacello-work/tree/master/repository/Metacello-Core.package/MetacelloSemanticVersionNumber.class | [8] | https://github.com/dalehenrich/metacello-work/blob/master/README.md | | | | | -- | Mariano | http://marianopeck.wordpress.com | | |
Free forum by Nabble | Edit this page |