Administrator
|
https://github.com/dalehenrich/metacello-work/issues/64
should be using #current: instead of #value: do: aBlock displaying: aString self bypassProgressBars ifTrue: [ ^super do: aBlock displaying: aString ]. aString displayProgressAt: Sensor cursorPoint from: 0 to: 2 during: [:bar | bar current: 1. aBlock value. bar current: 2 ] Discussion and fix at http://forum.world.st/MetacelloPharoPlatform-gt-gt-do-displaying-td4636668.html
Cheers,
Sean |
Administrator
|
I had noticed this when working on the minimal bootstrap, but wasn't sure what to name the Platform branch now that there's Pharo 1.4/2.0-specific code.
Cheers,
Sean |
Sean,
Where's the Pharo1.4 specific code? For Pharo-2.0: Metacello-Platform.pharo20 Are you going to chase this one down? Dale ----- Original Message ----- | From: "Sean P. DeNigris" <[hidden email]> | To: [hidden email] | Sent: Tuesday, June 26, 2012 5:59:21 AM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | | Sean P. DeNigris wrote | > | > should be using #current: instead of #value: | > | | I had noticed this when working on the minimal bootstrap, but wasn't | sure | what to name the Platform branch now that there's Pharo | 1.4/2.0-specific | code. | | -- | View this message in context: | http://forum.world.st/MetacelloPharoPlatform-do-displaying-for-Pharo-2-0-tp4636679p4636680.html | Sent from the Metacello mailing list archive at Nabble.com. | |
Administrator
|
For 1.4:
MetacelloPharoPlatform>>do: aBlock displaying: aString self bypassProgressBars ifTrue: [ ^super do: aBlock displaying: aString ]. aString displayProgressAt: Sensor cursorPoint from: 0 to: 2 during: [:bar | bar value: 1. aBlock value. bar value: 2 ] For 2.0, "bar value: ..." -> "bar current: ..." as in the fileout.
Cheers,
Sean |
Ah ... you're referring to the current Pharo1.x solution ... I thought I'd missed a Pharo1.4 specific change:)
Metacello-Platform.pharo - common pharo code Metacello-Platform.pharo10 - Pharo-1.x code (MetacelloPharoPlatform>>do:displaying:) Metacello-Platform.pharo20 - Pharo-2.x code (MetacelloPharoPlatform>>do:displaying:) Let me know if you've got this one ... otherwise I'll dig in. Dale ----- Original Message ----- | From: "Sean P. DeNigris" <[hidden email]> | To: [hidden email] | Sent: Tuesday, June 26, 2012 9:18:36 AM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | For 1.4: | MetacelloPharoPlatform>>do: aBlock displaying: aString | | self bypassProgressBars ifTrue: [ ^super do: aBlock displaying: | aString ]. | aString | displayProgressAt: Sensor cursorPoint | from: 0 to: 2 | during: [:bar | | bar value: 1. | aBlock value. | bar value: 2 ] | | For 2.0, "bar value: ..." -> "bar current: ..." as in the fileout. | | -- | View this message in context: | http://forum.world.st/MetacelloPharoPlatform-do-displaying-for-Pharo-2-0-tp4636679p4636706.html | Sent from the Metacello mailing list archive at Nabble.com. | |
Administrator
|
On Jun 26, 2012, at 12:32 PM, Dale Henrichs [via Smalltalk] wrote:
> Metacello-Platform.pharo10 - Pharo-1.x code (MetacelloPharoPlatform>>do:displaying:) > Metacello-Platform.pharo20 - Pharo-2.x code (MetacelloPharoPlatform>>do:displaying:) Should these versions start at 1, or 28 (e.g. Metacello-Platform.pharo10-SeanDeNigris.28), since they are based off of Metacello-Platform.pharo-dkh.27
Cheers,
Sean |
28 .. although the mcz history will be preserved which ever name you choose ..
Dale ----- Original Message ----- | From: "Sean P. DeNigris" <[hidden email]> | To: [hidden email] | Sent: Tuesday, June 26, 2012 9:48:48 AM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | On Jun 26, 2012, at 12:32 PM, Dale Henrichs [via Smalltalk] wrote: | > Metacello-Platform.pharo10 - Pharo-1.x code | > (MetacelloPharoPlatform>>do:displaying:) | > Metacello-Platform.pharo20 - Pharo-2.x code | > (MetacelloPharoPlatform>>do:displaying:) | Should these versions start at 1, or 28 (e.g. | Metacello-Platform.pharo10-SeanDeNigris.28), since they are based | off of Metacello-Platform.pharo-dkh.27 | | View this message in context: Re: | MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | Sent from the Metacello mailing list archive at Nabble.com. | |
Administrator
|
In reply to this post by Dale Henrichs
I started the fix, but then realized that MC considers all of the above to be the "Metacello-Platform" package. How can we have, for instance for 2.0, Metacello-Platform.pharo & Metacello-Platform.pharo20 coexist? Don't we need the other method (e.g. Platform & PlatformPharo20)? Let me know. Once we decide on package naming, the fix will be trivial... Sean
Cheers,
Sean |
Of course ... I'm going to go off and strangle a couple of bunnies and then let you know:)
I've got to run to an appt. Dale ----- Original Message ----- | From: "Sean P. DeNigris" <[hidden email]> | To: [hidden email] | Sent: Tuesday, June 26, 2012 9:15:26 PM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | | Dale Henrichs wrote | > | > Metacello-Platform.pharo - common pharo code | > Metacello-Platform.pharo10 - Pharo-1.x code | > (MetacelloPharoPlatform>>do:displaying:) | > Metacello-Platform.pharo20 - Pharo-2.x code | > (MetacelloPharoPlatform>>do:displaying:) | > | | I started the fix, but then realized that MC considers all of the | above to | be the "Metacello-Platform" package. How can we have, for instance | for 2.0, | Metacello-Platform.pharo & Metacello-Platform.pharo20 coexist? Don't | we need | the other method (e.g. Platform & PlatformPharo20)? | | Let me know. Once we decide on package naming, the fix will be | trivial... | | Sean | | -- | View this message in context: | http://forum.world.st/MetacelloPharoPlatform-do-displaying-for-Pharo-2-0-tp4636679p4636821.html | Sent from the Metacello mailing list archive at Nabble.com. | |
In reply to this post by Sean P. DeNigris
Sean,
Let's go this route: Metacello-Platform.pharo - Pharo-1.x code Metacello-Platform.pharo20 - Pharo-2.x code Metacello-Platform.pharo20 will be a complete copy of Metacello-Platform.pharo with the one difference (to start with) being the MetacelloPharoPlatform>>do:displaying: change. We'll just load one or the other ... Moving forward, the Pharo-2.x changes can be made without regard to the impact on Pharo common code and without affecting the packaging for Pharo-1.x.... The code in the platform packages doesn't change that frequently, so duplication of code won't be a high maintenance item ... Dale ----- Original Message ----- | From: "Sean P. DeNigris" <[hidden email]> | To: [hidden email] | Sent: Tuesday, June 26, 2012 9:15:26 PM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | | Dale Henrichs wrote | > | > Metacello-Platform.pharo - common pharo code | > Metacello-Platform.pharo10 - Pharo-1.x code | > (MetacelloPharoPlatform>>do:displaying:) | > Metacello-Platform.pharo20 - Pharo-2.x code | > (MetacelloPharoPlatform>>do:displaying:) | > | | I started the fix, but then realized that MC considers all of the | above to | be the "Metacello-Platform" package. How can we have, for instance | for 2.0, | Metacello-Platform.pharo & Metacello-Platform.pharo20 coexist? Don't | we need | the other method (e.g. Platform & PlatformPharo20)? | | Let me know. Once we decide on package naming, the fix will be | trivial... | | Sean | | -- | View this message in context: | http://forum.world.st/MetacelloPharoPlatform-do-displaying-for-Pharo-2-0-tp4636679p4636821.html | Sent from the Metacello mailing list archive at Nabble.com. | |
Administrator
|
In reply to this post by Sean P. DeNigris
Okay, here's a new config... Dale, would you check it before I commit...
* Create version '1.0-beta.31.1.4', which loads Platform.pharo for 1.x and Platform.pharo20 for 2.x (Required for Issue 64) * Edit version '1.0-beta.32' - Update with same change as above - change spaces indenting to tabs * Update stable for #'common' to version '1.0-beta.31.1.4'. * Fix class-side #load, which is supposed to load the minimum necessary to load configs, to load the 'batch' group ConfigurationOfMetacello-SeanDeNigris.704.mcz (136K) Download Attachment
Cheers,
Sean |
Administrator
|
In reply to this post by Sean P. DeNigris
"Need to add the new package to a (new) baseline:"
I think because .pharo20 is only a branch of the Metacello-Platform package that the package structure is the same, so I used the same baseline and put the line you have above in the new literal version. Although I had to make a new version (still off dkh.703) because I forgot to update the Platform package version in the bootstrap. It now loads correctly in 2.0. b.t.w. did you know there was a drop-through in the bootstrap if the platform is neither squeak or pharo? I refactored bootstrapMetacelloFrom:, which was getting a little long after adding my changes, and noticed it returns self in that case... Name: ConfigurationOfMetacello-SeanDeNigris.705 Ancestors: ConfigurationOfMetacello-dkh.703 * Create version '1.0-beta.31.1.4', which loads Platform.pharo for 1.x and Platform.pharo20 for 2.x (Required for Issue 64) * Edit version '1.0-beta.32' - Update with same change as above - change spaces indenting to tabs * Update stable for #'common' to version '1.0-beta.31.1.4'. * Fix class-side #load, which is supposed to load the minimum necessary to load configs, to load the 'batch' group * Update bootstrap packages in #bootstrapMetacelloFrom: and refactor for clarity Cheers, Sean ConfigurationOfMetacello-SeanDeNigris.705.mcz (137K) Download Attachment
Cheers,
Sean |
You update the baseline with because if someone decides to load the baseline itself (which is allowed), you ensure that they get the correct branch for Pharo2.0...
The logic still isn't quite correct with your new #platformPackage method .. now instead of nil, you end up with a class in the array of package names ... Metacello is only supported on 3 platforms (squeak, pharo, gemstone) and Metacello is installed by default in GemStone, so the only other platforms that are expected to work are squeak and pharo, so the old logic was sufficient ... for completeness the following should work: bootstrapMetacelloFrom: repositoryUrl "Corresponds to version 1.0-beta.29" self ensureGoferVersion: 'Gofer-Core-lr.115' repositoryUrl: repositoryUrl. #('Metacello-Base-DaleHenrichs.19' 'Metacello-Core-dkh.465' 'Metacello-MC-dkh.522') do: [ :pkg | self bootstrapPackage: pkg from: repositoryUrl ]. Smalltalk at: #'SystemVersion' ifPresent: [ :cl | | versionString platformPkg | versionString := cl current version. platformPkg := (versionString beginsWith: 'Squeak') ifTrue: [ (versionString beginsWith: 'Squeak3') ifTrue: [ 'Metacello-Platform.squeak-dkh.5' ] ifFalse: [ 'Metacello-Platform.squeak-dkh.10' ] ] ifFalse: [ 'Metacello-Platform.pharo-dkh.27' ] ]. self bootstrapPackage: platformPkg from: repositoryUrl ] Dale ----- Original Message ----- | From: "DeNigris Sean" <[hidden email]> | To: [hidden email] | Sent: Wednesday, June 27, 2012 5:01:33 PM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | "Need to add the new package to a (new) baseline:" | I think because .pharo20 is only a branch of the Metacello-Platform | package that the package structure is the same, so I used the same | baseline and put the line you have above in the new literal version. | | Although I had to make a new version (still off dkh.703) because I | forgot to update the Platform package version in the bootstrap. It | now loads correctly in 2.0. | | b.t.w. did you know there was a drop-through in the bootstrap if the | platform is neither squeak or pharo? I refactored | bootstrapMetacelloFrom:, which was getting a little long after | adding my changes, and noticed it returns self in that case... | | Name: ConfigurationOfMetacello-SeanDeNigris.705 | Ancestors: ConfigurationOfMetacello-dkh.703 | | * Create version '1.0-beta.31.1.4', which loads Platform.pharo for | 1.x and Platform.pharo20 for 2.x (Required for Issue 64) | * Edit version '1.0-beta.32' | - Update with same change as above | - change spaces indenting to tabs | * Update stable for #'common' to version '1.0-beta.31.1.4'. | * Fix class-side #load, which is supposed to load the minimum | necessary to load configs, to load the 'batch' group | * Update bootstrap packages in #bootstrapMetacelloFrom: and refactor | for clarity | | Cheers, | Sean | | |
Administrator
|
In reply to this post by Sean P. DeNigris
Dale, thanks for bearing with me while I learn...
<quote author="Dale Henrichs"> You update the baseline with because if someone decides to load the baseline itself (which is allowed), you ensure that they get the correct branch for Pharo2.0... </quote> Ah, bleedingEdge, of course... <quote author="Dale Henrichs"> The logic still isn't quite correct with your new #platformPackage method .. now instead of nil, you end up with a class in the array of package names ... Metacello is only supported on 3 platforms (squeak, pharo, gemstone) and Metacello is installed by default in GemStone, so the only other platforms that are expected to work are squeak and pharo </quote> That makes perfect sense now. <quote author="Dale Henrichs">so the old logic was sufficient</quote> Absolutely, it was just getting unwieldy once I added the Pharo 2.0 branch. Just the platform package logic became 10 lines with three levels of nested conditionals. Would you accept this. I think it's correct based on your last post: platformPackage Smalltalk at: #SystemVersion ifPresent: [ :sysVersion | | versionString | versionString := sysVersion current version. (versionString beginsWith: 'Squeak') ifTrue: [ ^ (versionString beginsWith: 'Squeak3') ifTrue: [ 'Metacello-Platform.squeak-dkh.5' ] ifFalse: [ 'Metacello-Platform.squeak-dkh.10' ] ]. (versionString beginsWith: 'Pharo') ifTrue: [ ^ (versionString beginsWith: 'Pharo2') ifTrue: [ 'Metacello-Platform.pharo20-SeanDeNigris.28' ] ifFalse: [ 'Metacello-Platform.pharo-dkh.27' ] ] ]. ^ nil. I think the explicit nil is clearer for us new Metacello-ers. I was baffled by the nil return from at:ifPresent: until you mentioned it. And... bootstrapMetacelloFrom: repositoryUrl "Corresponds to version 1.0-beta.31.1.4" | minimumPackages | self ensureGoferVersion: 'Gofer-Core-lr.115' repositoryUrl: repositoryUrl. minimumPackages := OrderedCollection withAll: #( 'Metacello-Base-DaleHenrichs.19' 'Metacello-Core-dkh.465' 'Metacello-MC-dkh.522'). self platformPackage ifNotNil: [ :pkg | minimumPackages add: pkg ]. minimumPackages do: [ :pkg | self bootstrapPackage: pkg from: repositoryUrl ]. Tested on Pharo 2.0. Here's one more version with the above changes, the baseline edit, and a slight refactor to 31.1.4 (just moved the pharo1.x block back into pharo, like you have in the baseline)... If you give the green light, I'll commit it... Sean ConfigurationOfMetacello-SeanDeNigris.706.mcz (137K) Download Attachment
Cheers,
Sean |
Looks good ... ship it ...
I appreciate your help, so no problem ... Dale ----- Original Message ----- | From: "DeNigris Sean" <[hidden email]> | To: [hidden email] | Sent: Wednesday, June 27, 2012 8:35:00 PM | Subject: [Metacello] Re: MetacelloPharoPlatform>>#do:displaying: for Pharo 2.0 | | Dale, thanks for bearing with me while I learn... | | <quote author="Dale Henrichs"> | You update the baseline with because if someone decides to load the | baseline itself (which is allowed), you ensure that they get the | correct branch for Pharo2.0... | </quote> | Ah, bleedingEdge, of course... | | <quote author="Dale Henrichs"> | The logic still isn't quite correct with your new #platformPackage | method .. now instead of nil, you end up with a class in the array | of package names ... | | Metacello is only supported on 3 platforms (squeak, pharo, gemstone) | and Metacello is installed by default in GemStone, so the only other | platforms that are expected to work are squeak and pharo | </quote> | That makes perfect sense now. | | <quote author="Dale Henrichs">so the old logic was sufficient</quote> | Absolutely, it was just getting unwieldy once I added the Pharo 2.0 | branch. Just the platform package logic became 10 lines with three | levels of nested conditionals. | | Would you accept this. I think it's correct based on your last post: | platformPackage | | Smalltalk at: #SystemVersion ifPresent: [ :sysVersion | | | versionString | | versionString := sysVersion current version. | | (versionString beginsWith: 'Squeak') ifTrue: [ | ^ (versionString beginsWith: 'Squeak3') | ifTrue: [ 'Metacello-Platform.squeak-dkh.5' ] | ifFalse: [ 'Metacello-Platform.squeak-dkh.10' ] ]. | | (versionString beginsWith: 'Pharo') ifTrue: [ | ^ (versionString beginsWith: 'Pharo2') | ifTrue: [ 'Metacello-Platform.pharo20-SeanDeNigris.28' ] | ifFalse: [ 'Metacello-Platform.pharo-dkh.27' ] ] ]. | ^ nil. | | I think the explicit nil is clearer for us new Metacello-ers. I was | baffled by the nil return from at:ifPresent: until you mentioned it. | And... | | bootstrapMetacelloFrom: repositoryUrl | "Corresponds to version 1.0-beta.31.1.4" | | | minimumPackages | | self ensureGoferVersion: 'Gofer-Core-lr.115' repositoryUrl: | repositoryUrl. | minimumPackages := OrderedCollection withAll: #( | 'Metacello-Base-DaleHenrichs.19' | 'Metacello-Core-dkh.465' | 'Metacello-MC-dkh.522'). | self platformPackage ifNotNil: [ :pkg | minimumPackages add: pkg ]. | minimumPackages do: [ :pkg | self bootstrapPackage: pkg from: | repositoryUrl ]. | | Tested on Pharo 2.0. | | Here's one more version with the above changes, the baseline edit, | and a slight refactor to 31.1.4 (just moved the pharo1.x block back | into pharo, like you have in the baseline)... If you give the green | light, I'll commit it... | | Sean | |
Administrator
|
Done... pushed the new config (ConfigurationOfMetacello-SeanDeNigris.706) to http://squeaksource.com/MetacelloRepository and http://seaside.gemstone.com/ss/metacello
Cheers,
Sean |
Free forum by Nabble | Edit this page |