Issue 7178 in pharo: Saving extension methods with MC is badly broken

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

Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug

New issue 7178 by [hidden email]: Saving extension methods with MC is  
badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

Browse the package, which i saved:

SqS/AsmJit/AsmJit-Legacy-IgorStasenko.1

without installing it..

Look at method categories it saved...

Attachments:
        AsmJit-Legacy-IgorStasenko.1.mcz  1.1 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo
Updates:
        Labels: Importance-High Milestone-2.0

Comment #1 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

When we save a package that has class with extensions, the extensions  
should not be saved with that package.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo

Comment #2 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

The bug occurs when we recategorized a method from one extension to another  
one.
Why?
Because


snapshot
        ....
        packageInfo methods
                do: [:ea | definitions add: ea asMCMethodDefinition]
                displayingProgress: [ :ea| 'Snapshotting methods...' ].
               
        ....


asMCMethodDefinition is caching methods but testing identity.

asMCMethodDefinition
    "Creates a MCMethodDefinition from the receiver"
        ^ MCMethodDefinition cachedDefinitions
                at: self compiledMethod
                ifAbsentPut: [ self basicAsMCMethodDefinition ].



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo

Comment #3 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

One hack to get the system working is to disable the cache in snapshot. But  
this is not the real solution.

snapshot
        | packageInfo definitions categories |
        packageInfo := self packageSet.
        definitions := OrderedCollection new.
        categories := packageInfo systemCategories.
       
        "Flushing cache as a temporary patch to work around bug #7178,
        http://code.google.com/p/pharo/issues/detail?id=7178
         "
        MCMethodDefinition flushMethodCache.
       
       


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo

Comment #4 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

A probably better solution is to define asMCMethodDefinition as:

asMCMethodDefinition
    "Creates a MCMethodDefinition from the receiver"
        ^ MCMethodDefinition cachedDefinitions
                at: self
                ifAbsentPut: [ self basicAsMCMethodDefinition ].


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo

Comment #5 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

Now this notion of cache is strange because instead of putting self  
compiledMethod or self
putting a hash based on the = of a ring object would make more sense


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo

Comment #6 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

Now one of the problem is that

methods
        ^methods ifNil: [ methods := (self collectFromAllPackages: #methods)  
collect: #asRingDefinition ]

create a new instance of asRingDefinition.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo
Updates:
        Status: FixToInclude

Comment #7 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

Because of this fix the cache may provide different information than before  
and produce correct results
resulting in methods moving between packages in the conflict merge tool.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo
Updates:
        Status: FixReviewNeeded

Comment #8 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

Marcus esteban, this fix is important but I will try it first to see how it  
behaves.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo

Comment #9 on issue 7178 by [hidden email]: Saving extension methods  
with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

As I suspected introducing this changes touches a lot of packages.
And now it loops forever when I want to integrate.

So probably a first approach is to reset the cache systematically to see  
which packages are touched.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7178 in pharo: Saving extension methods with MC is badly broken

pharo
In reply to this post by pharo
Updates:
        Summary: Saving extension methods with MC is badly broken

Comment #16 on issue 7178 by [hidden email]: Saving extension  
methods with MC is badly broken
http://code.google.com/p/pharo/issues/detail?id=7178

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker