Metacello / metacello

Metacello is a package management system for Smalltalk
MIT License
87 stars 43 forks source link

Metacello-Platform for Pharo should override do:displaying: #466

Closed jecisc closed 7 years ago

jecisc commented 7 years ago

The Pharo plateform for Metacello should override #do:displaying:

The implementation is probably something like:

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 ]

See: https://pharo.fogbugz.com/f/cases/20618/Metacello-Platform-for-Pharo-should-override-do-displaying

krono commented 7 years ago

I cannot "see" this, it requires a login. Can you summarise?

jecisc commented 7 years ago

There is not much more of this issue. It's just to remember we should sync pharo and metacello once it will be done.

If you want more info you can check:

http://forum.world.st/Baseline-Configuration-loading-bars-td5003933.html

jecisc commented 7 years ago

The problem is that this method was introduced but only for Pharo 1.

dalehenrich commented 7 years ago

@jecisc do you know if the method from Pharo1.0 still works in Pharo 6/7? My assumptions is that it was left out of the build as of pharo2.0/3.0 because of incompatibility and it would surprise me if the api for this survived 5 years:)

jecisc commented 7 years ago

I tried to add the exact same. I did not get any error but I don't know if it has the expected result.

When I will have the time I can try but I will need to find a project that is compatible with Pharo 1 :)

dalehenrich commented 7 years ago

Haha, Metacello should be compatible with Pharo1.0 ... I was testing it using buildCI and only stopped because it became to difficult to use the old pharo vm:)

jecisc commented 7 years ago

I try to execute this:

Gofer new
  gemsource: 'metacello';
  package: 'ConfigurationOfMetacello';
  load.
"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
((Smalltalk at: #ConfigurationOfMetacello) project 
  version: #'previewBootstrap') load.

"Load the Preview version of Metacello from GitHub"
(Smalltalk at: #Metacello) new
  configuration: 'MetacelloPreview';
  version: #stable;
  repository: 'github://dalehenrich/metacello-work:configuration';
  load.
"Now load latest version of Metacello"
Metacello new
  baseline: 'Metacello';
  repository: 'github://dalehenrich/metacello-work:master/repository';
  get.
Metacello new
  baseline: 'Metacello';
  repository: 'github://dalehenrich/metacello-work:master/repository';
  onConflict: [:ex | ex allow];
  load

But I have a connection timeout for seaside.gemstone.com/ss/metacello

dalehenrich commented 7 years ago

seaside.gemstone.com is no longer available ... VMWare did not give us the gemstone.com domain ... replacing seaside.gemstone.com with seaside.gemtalksystems.com

jecisc commented 7 years ago

Apparently, from what I found, #displayProgressAt:from:to:during: has been deprecated in favor of displayProgressFrom:to:during:.

The fix should then be something like:

do: aBlock displaying: aString

    self bypassProgressBars ifTrue: [ ^super do: aBlock displaying: aString ].
    aString
        displayProgressFrom: 0 to: 2
        during: [:bar |
            bar value: 1.
            aBlock value.
bar value: 2 ]
dalehenrich commented 7 years ago

Okay, I can confirm that the method String>>displayProgressFrom:to:during: exists in 3.0, so if you want to issue a pull request we can get the change through travis and then we probably need some human attention to verify that it looks okay in Pharo3/4/5/6/7 ... we can split the load for manual testing if you want...

jecisc commented 7 years ago

I'll try to do a PR soon. Just fighting with Windows and long path right now :(

dalehenrich commented 7 years ago

Do you know about the dev_win-hack branch? I t has a hand-editted file name that should address the long path problem --- still need to root the checkout in a lettered drive ... if needed I can make sure that the latest master is merged into the branch ...

jecisc commented 7 years ago

I did not wanted to mess with my files so I just switched to my pro computer that is W10 and has a Windows Linux Subsystem :)

https://github.com/Metacello/metacello/pull/467

jecisc commented 7 years ago

Done.

jecisc commented 7 years ago

https://github.com/Metacello/metacello/pull/467