[squeak-dev] Overrides in newest Monticellos?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Overrides in newest Monticellos?

Janko Mivšek
Dear all,

Is there any new Monticello which deals with overrides right? 1.5? 2.0?

I just published my packages and again incorrectly because some methods
are overridden in extensions of another package. If you do that in
current MC, you loose those methods in an original package. Bad!

I'm willing to migrate to such MC immediately if available. I think
working with overrides is such a powerful feature (not to mention that
VisualWorks have that) that Squeak needs the proper support as soon as
possible.

Best regards
Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Michael Rueger-6
Janko Mivšek wrote:
> Dear all,
>
> Is there any new Monticello which deals with overrides right? 1.5? 2.0?
>
> I just published my packages and again incorrectly because some methods
> are overridden in extensions of another package. If you do that in
> current MC, you loose those methods in an original package. Bad!

A way around that is to use configuration maps. They do a "sort of
atomic" loading, so methods or classes moved between packages don't get
lost.

Michael

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Colin Putney
In reply to this post by Janko Mivšek

On 13-Jul-08, at 10:56 AM, Janko Mivšek wrote:

> Is there any new Monticello which deals with overrides right? 1.5?  
> 2.0?
>
> I just published my packages and again incorrectly because some  
> methods
> are overridden in extensions of another package. If you do that in
> current MC, you loose those methods in an original package. Bad!
>
> I'm willing to migrate to such MC immediately if available. I think
> working with overrides is such a powerful feature (not to mention that
> VisualWorks have that) that Squeak needs the proper support as soon as
> possible.

MC2 doesn't have a concept of overrides as such, but it does allow  
packages to overlap, and uses versioning history to determine which of  
the two versions of a method should be used.

I'm doing the final clean up for the first release, which will be Real  
Soon Now™.

Colin
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Janko Mivšek
Hi Colin,

Colin Putney wrote:

>> I'm willing to migrate to such MC immediately if available. I think
>> working with overrides is such a powerful feature (not to mention that
>> VisualWorks have that) that Squeak needs the proper support as soon as
>> possible.
>
> MC2 doesn't have a concept of overrides as such, but it does allow
> packages to overlap, and uses versioning history to determine which of
> the two versions of a method should be used.
>
> I'm doing the final clean up for the first release, which will be Real
> Soon Now™.

That means if I extend some method in another package and it happens
that the method has the same name (this is regarded as override in VW
for nistance), MC2 will deal with that situation right and won't change
an original package as that this method is removed there?

Janko


--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Philippe Marschall
In reply to this post by Janko Mivšek
http://gbracha.blogspot.com/2008/03/monkey-patching.html

2008/7/13 Janko Mivšek <[hidden email]>:

> Dear all,
>
> Is there any new Monticello which deals with overrides right? 1.5? 2.0?
>
> I just published my packages and again incorrectly because some methods
> are overridden in extensions of another package. If you do that in
> current MC, you loose those methods in an original package. Bad!
>
> I'm willing to migrate to such MC immediately if available. I think
> working with overrides is such a powerful feature (not to mention that
> VisualWorks have that) that Squeak needs the proper support as soon as
> possible.
>
> Best regards
> Janko
>
> --
> Janko Mivšek
> AIDA/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Janko Mivšek
Philippe Marschall wrote:
> http://gbracha.blogspot.com/2008/03/monkey-patching.html

I agree with Gilad that extensions and specially overrides (aka monkey
patching) are dangerous thing to do if you aren't aware of consequences,
but on the other hand he also concluded that there isn't better and
established way to solve the problem.

I myself try to follow two rules:

- never override stuff from other,
- do overrides only of my own stuff, in my control and in my images.

That means that I make overrides only in end packages, for instance
customer specific ones, which are at the end of chain, not overriden
with any more package.

That way clashes with others overriding the same stuff are more or less
avoided while advantages of overrides are preserved.

Janko

>
> 2008/7/13 Janko Mivšek <[hidden email]>:
>> Dear all,
>>
>> Is there any new Monticello which deals with overrides right? 1.5? 2.0?
>>
>> I just published my packages and again incorrectly because some methods
>> are overridden in extensions of another package. If you do that in
>> current MC, you loose those methods in an original package. Bad!
>>
>> I'm willing to migrate to such MC immediately if available. I think
>> working with overrides is such a powerful feature (not to mention that
>> VisualWorks have that) that Squeak needs the proper support as soon as
>> possible.
>>
>> Best regards
>> Janko
>>
>> --
>> Janko Mivšek
>> AIDA/Web
>> Smalltalk Web Application Server
>> http://www.aidaweb.si
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

keith1y
Janko Mivšek wrote:

> Philippe Marschall wrote:
>> http://gbracha.blogspot.com/2008/03/monkey-patching.html
>
> I agree with Gilad that extensions and specially overrides (aka monkey
> patching) are dangerous thing to do if you aren't aware of
> consequences, but on the other hand he also concluded that there isn't
> better and established way to solve the problem.
>
> I myself try to follow two rules:
>
> - never override stuff from other,
> - do overrides only of my own stuff, in my control and in my images.
>
> That means that I make overrides only in end packages, for instance
> customer specific ones, which are at the end of chain, not overriden
> with any more package.
>
> That way clashes with others overriding the same stuff are more or
> less avoided while advantages of overrides are preserved.
>
> Janko
Getting overrides to work correctly was the whole reason for working on
MC1.5, though judging from the answers so far it doesnt seem like many
people are aware of this.  Personally I cant understand how anyone
actually uses squeak for anything serious without it.

The best way to load MC1.5 is with LPF see:
http://installer.pbwiki.com/LevelPlayingField

Keith


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Colin Putney
In reply to this post by Janko Mivšek

On 13-Jul-08, at 1:01 PM, Janko Mivšek wrote:

> Hi Colin,
>
> Colin Putney wrote:
>
>>> I'm willing to migrate to such MC immediately if available. I think
>>> working with overrides is such a powerful feature (not to mention  
>>> that
>>> VisualWorks have that) that Squeak needs the proper support as  
>>> soon as
>>> possible.
>> MC2 doesn't have a concept of overrides as such, but it does allow  
>> packages to overlap, and uses versioning history to determine which  
>> of the two versions of a method should be used.
>> I'm doing the final clean up for the first release, which will be  
>> Real Soon Now™.
>
> That means if I extend some method in another package and it happens  
> that the method has the same name (this is regarded as override in  
> VW for nistance), MC2 will deal with that situation right and won't  
> change an original package as that this method is removed there?

Right, more or less.

There's really no distinction between "orignal package" and  
"overriding package." Only one variant of the method can be loaded at  
a time, but both packages will consider the method to be part of the  
package.

A common case will be wanting to change a method in another package.  
Say I have a web app in AIDA/Web, and I want to change on of the base  
methods. I add the method to my package, and make my change. When I  
save a snapshot of my web app, it'll include the history of that  
method, and as long as the base version doesn't change, my version  
will supersede it. But if you then change the method in AIDA/Web, I'll  
get a conflict when I load my web app, which I'll have to resolve, by  
choosing your new version, my existing version, or some new version  
that I write taking both into account.

Colin
Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] Overrides in newest Monticellos?

Ramon Leon-5
In reply to this post by keith1y
>  Personally I cant understand how anyone
> actually uses squeak for anything serious without it.
>
> The best way to load MC1.5 is with LPF see:
> http://installer.pbwiki.com/LevelPlayingField
>
> Keith

How about because some of us consider overrides evil and avoid them like the
plague, including avoiding using packages that use them when we're aware of
it.  Extensions are ok, but if I see a package overriding stuff, I just
don't trust it.

Ramon Leon
http://onsmaltalk.com


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Bert Freudenberg
In reply to this post by Colin Putney

Am 13.07.2008 um 22:53 schrieb Colin Putney:

>
> On 13-Jul-08, at 1:01 PM, Janko Mivšek wrote:
>
>> Hi Colin,
>>
>> Colin Putney wrote:
>>
>>>> I'm willing to migrate to such MC immediately if available. I think
>>>> working with overrides is such a powerful feature (not to mention  
>>>> that
>>>> VisualWorks have that) that Squeak needs the proper support as  
>>>> soon as
>>>> possible.
>>> MC2 doesn't have a concept of overrides as such, but it does allow  
>>> packages to overlap, and uses versioning history to determine  
>>> which of the two versions of a method should be used.
>>> I'm doing the final clean up for the first release, which will be  
>>> Real Soon Now™.
>>
>> That means if I extend some method in another package and it  
>> happens that the method has the same name (this is regarded as  
>> override in VW for nistance), MC2 will deal with that situation  
>> right and won't change an original package as that this method is  
>> removed there?
>
> Right, more or less.
>
> There's really no distinction between "orignal package" and  
> "overriding package." Only one variant of the method can be loaded  
> at a time, but both packages will consider the method to be part of  
> the package.
>
> A common case will be wanting to change a method in another package.  
> Say I have a web app in AIDA/Web, and I want to change on of the  
> base methods. I add the method to my package, and make my change.  
> When I save a snapshot of my web app, it'll include the history of  
> that method, and as long as the base version doesn't change, my  
> version will supersede it. But if you then change the method in AIDA/
> Web, I'll get a conflict when I load my web app, which I'll have to  
> resolve, by choosing your new version, my existing version, or some  
> new version that I write taking both into account.


Actually, PackageInfo looks back in the changes file for previous  
versions of the method belonging to other packages. The whole point of  
overrides is that if you override a method in another package, that  
package is *not* changed.

Yes, that does sound fragile because it is.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

Janko Mivšek
In reply to this post by Ramon Leon-5


Ramon Leon wrote:

>>  Personally I cant understand how anyone
>> actually uses squeak for anything serious without it.
>>
>> The best way to load MC1.5 is with LPF see:
>> http://installer.pbwiki.com/LevelPlayingField
>>
>> Keith
>
> How about because some of us consider overrides evil and avoid them like the
> plague, including avoiding using packages that use them when we're aware of
> it.  Extensions are ok, but if I see a package overriding stuff, I just
> don't trust it.

For those like you the overrides should be clearly shown, in red as in
VisualWorks for instance.

Janko


>
> Ramon Leon
> http://onsmaltalk.com
>
>
>

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

keith1y
In reply to this post by Ramon Leon-5
Ramon Leon wrote:

>>  Personally I cant understand how anyone
>> actually uses squeak for anything serious without it.
>>
>> The best way to load MC1.5 is with LPF see:
>> http://installer.pbwiki.com/LevelPlayingField
>>
>> Keith
>>    
>
> How about because some of us consider overrides evil and avoid them like the
> plague, including avoiding using packages that use them when we're aware of
> it.  Extensions are ok, but if I see a package overriding stuff, I just
> don't trust it.
>  
So the question remains how do you achieve anything?

Keith


Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] Overrides in newest Monticellos?

Ramon Leon-5
> Ramon Leon wrote:
> >>  Personally I cant understand how anyone
> >> actually uses squeak for anything serious without it.
> >>
> >> The best way to load MC1.5 is with LPF see:
> >> http://installer.pbwiki.com/LevelPlayingField
> >>
> >> Keith
> >>    
> >
> > How about because some of us consider overrides evil and
> avoid them like the
> > plague, including avoiding using packages that use them
> when we're aware of
> > it.  Extensions are ok, but if I see a package overriding
> stuff, I just
> > don't trust it.
> >  
> So the question remains how do you achieve anything?
>
> Keith

I honestly don't know what you're talking about, my development image is
based off Damien's 3.9.1 dev image and it all works fine for me.  From what
I see so far, I'll be switching to Pharo shortly and with Colin working hard
on Monticello2, I'm not sure I see what'd I'd want with MC1.5.  Maybe you
can enlighten me?

Ramon Leon
http://onsmalltalk.com


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Overrides in newest Monticellos?

NorbertHartl
In reply to this post by keith1y
On Sun, 2008-07-13 at 22:46 +0100, Keith Hodges wrote:

> Ramon Leon wrote:
> >>  Personally I cant understand how anyone
> >> actually uses squeak for anything serious without it.
> >>
> >> The best way to load MC1.5 is with LPF see:
> >> http://installer.pbwiki.com/LevelPlayingField
> >>
> >> Keith
> >>    
> >
> > How about because some of us consider overrides evil and avoid them like the
> > plague, including avoiding using packages that use them when we're aware of
> > it.  Extensions are ok, but if I see a package overriding stuff, I just
> > don't trust it.
> >  
> So the question remains how do you achieve anything?
>
I personally open images, load packages, develop stuff and
save packages afterwards. No problem so far. The only thing
I disvovered not working is overrides. And I had a hard time
learning why.

So, what do you mean? People have achieved things before there
was Monticello.

Norbert