Following the PBE2 draft chapter, I evaluated the following:
MetacelloToolBox releaseDevelopmentVersionIn: ConfigurationOfSimpleApplescript description: '-- release version 1.0'. When I checked my version, I saw my original: spec description: 'initial development version'. Should releaseDevelopmentVersionIn:description: update the version description? Thanks for the toolbox! Metacello is much easier for me to use now :) |
Sean,
'Should it?' is a good question. Right now the message is used just for the commit of the configuration ... Personally, I have tended to not include a 'release' message in the description as the 'release' is indicated by the blessing. With that said, I would agree that the name of the method is a bit misleading. It's worth discussing a bit more whether the release message should be in the description. I don't have strong feelings one way or the other. The description field has been evolving towards a summary of the configuration commits, so from that perspective it would make sense to include the release message... The toolbox is quite powerful and not all of the power has been exposed, so if you find yourself wanting to perform certain operations we can add additional top-level calls ... Dale ----- Original Message ----- | From: "Sean DeNigris" <[hidden email]> | To: "Metacello" <[hidden email]> | Sent: Tuesday, December 6, 2011 8:04:05 AM | Subject: [Metacello] Releasing a version | | Following the PBE2 draft chapter, I evaluated the following: | | MetacelloToolBox | releaseDevelopmentVersionIn: ConfigurationOfSimpleApplescript | description: '-- release version 1.0'. | | When I checked my version, I saw my original: | spec description: 'initial development version'. | | Should releaseDevelopmentVersionIn:description: update the version | description? | | Thanks for the toolbox! Metacello is much easier for me to use now :) | |
> The toolbox is quite powerful and not all of the power has been exposed, so if you find yourself wanting to perform certain operations we can add additional top-level calls ...
One thing I ran into right away was depending on an external package (CommandShell-Piping) without a Metacello configuration. With the MetacelloToolBox, I did: dependencies: { ('SimpleApplescript' -> #('CommandShell-Piping')) } And then I manually edited the baseline to: package: 'CommandShell-Piping' with: [ spec requires: #('OSProcess' ). ]; But it was only as easy as it was because I had the draft PBE2 chapter in hand. At first, I was trying to tell the Toolbox to do this. |
Sean,
So it wasn't easy to express the baseline edit from the toolbox? Or did it look like you could but it didn't work? Dale ----- Original Message ----- | From: "Sean DeNigris" <[hidden email]> | To: "Metacello" <[hidden email]> | Sent: Tuesday, December 6, 2011 8:49:41 AM | Subject: [Metacello] Re: Releasing a version | | > The toolbox is quite powerful and not all of the power has been | > exposed, so if you find yourself wanting to perform certain | > operations we can add additional top-level calls ... | | One thing I ran into right away was depending on an external package | (CommandShell-Piping) without a Metacello configuration. With the | MetacelloToolBox, I did: | dependencies: { ('SimpleApplescript' -> #('CommandShell-Piping')) } | | And then I manually edited the baseline to: | package: 'CommandShell-Piping' with: [ | spec requires: #('OSProcess' ). ]; | | But it was only as easy as it was because I had the draft PBE2 | chapter | in hand. At first, I was trying to tell the Toolbox to do this. | |
> So it wasn't easy to express the baseline edit from the toolbox? Or did it look like you could but it didn't work?
Sorry, I cut and pasted from the wrong method version. The one above was the one generated by the toolbox. I edited it to below: package: 'CommandShell-Piping' with: [ spec repository: 'http://www.squeaksource.com/CommandShell'; "added this line manually" requires: #('OSProcess' ). ]; |
Ah, so adding the repository wasn't in the api? If so, I'll submit an issue for doing that sort of edit ...
Dale ----- Original Message ----- | From: "Sean DeNigris" <[hidden email]> | To: "Metacello" <[hidden email]> | Sent: Tuesday, December 6, 2011 9:24:24 AM | Subject: [Metacello] Re: Releasing a version | | > So it wasn't easy to express the baseline edit from the toolbox? Or | > did it look like you could but it didn't work? | | Sorry, I cut and pasted from the wrong method version. The one above | was the one generated by the toolbox. I edited it to below: | package: 'CommandShell-Piping' with: [ | spec | repository: 'http://www.squeaksource.com/CommandShell'; "added | this line manually" | requires: #('OSProcess' ). ]; | |
On Dec 6, 12:37 pm, Dale Henrichs <[hidden email]> wrote:
> Ah, so adding the repository wasn't in the api? If so, I'll submit an issue for doing that sort of edit ... I'm just learning, but since packages are represented by strings, I didn't see a way to attach a repository for a specific external package without a configuration. I wrote a blog post about using the tool for the first time at http://seandenigris.com/blog/?p=844 |
Sean,
Once you've created a version you can use the following method to make specific changes to the existing specification: MetacelloTooBox class>>modifyVersion:section:for:repository:requiredProjects:packages:dependencies:includes:files:repositories:preLoadDoIts:postLoadDoIts:supplyingAnswers:groups: In MetacelloTooBoxAPITestCase>>testComplexModifyBaseline, the following was used to add a package and a dependency to version '1.1-baseline': MetacelloToolBox modifyVersion: '1.1-baseline' section: #'common' for: self configurationName asString repository: nil requiredProjects: #() packages: #('GoferFoo') dependencies: {('GeauxFaux' -> #('GoferFoo'))} includes: #() files: #() repositories: #() preLoadDoIts: #() postLoadDoIts: #() supplyingAnswers: #() groups: #(). To add a repository for a particular package (say GoferFoo) you would do the following: MetacelloToolBox modifyVersion: '1.1-baseline' section: #'common' for: self configurationName asString repository: nil requiredProjects: #() packages: #(') dependencies: #() includes: #() files: #() repositories: {('GoferFoo' -> #('http://www.squeaksource.com/CommandShell'))} preLoadDoIts: #() postLoadDoIts: #() supplyingAnswers: #() groups: #(). The comment in the method should describe the nature of the various arguments. Note that you can target a specific section (#common, #pharo, etc.) with your edit. As with Alexandre's question I am interested in any feedback on making the api easier to use. BTW, this discusions is also being recorded in Issue 157[1] and Issue 158[2]. This API does not edit the source code of the version specification methods (the methods in your configuration). These methods actually evaluate the methods, creating an instance of MetacelloMCVersionSpec that is then updated based upon the supplied specs and finally the source code of the method is regenerated based upon the new version spec. Dale [1] http://code.google.com/p/metacello/issues/detail?id=157 [2] http://code.google.com/p/metacello/issues/detail?id=158 ----- Original Message ----- | From: "Sean DeNigris" <[hidden email]> | To: "Metacello" <[hidden email]> | Sent: Tuesday, December 6, 2011 10:17:12 AM | Subject: [Metacello] Re: Releasing a version | | On Dec 6, 12:37 pm, Dale Henrichs <[hidden email]> wrote: | > Ah, so adding the repository wasn't in the api? If so, I'll submit | > an issue for doing that sort of edit ... | | I'm just learning, but since packages are represented by strings, I | didn't see a way to attach a repository for a specific external | package without a configuration. I wrote a blog post about using the | tool for the first time at http://seandenigris.com/blog/?p=844 | |
Free forum by Nabble | Edit this page |