[Pharo-project] urgent rpackage fix
please include ASAP https://code.google.com/p/pharo/issues/detail?id=6648 fixes broken classtag updates when performing a refactoring
camillo what is "added hierarchical RPackage lookup" ? Why do we need that beast? Stef On Sep 11, 2012, at 1:21 PM, Camillo Bruni wrote:
please include ASAP
https://code.google.com/p/pharo/issues/detail?id=6648
fixes broken classtag updates when performing a refactoring
On 2012-09-11, at 16:41, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
camillo
what is "added hierarchical RPackage lookup" ? Why do we need that beast?
Because right now RPackageOrganizer does a wrong lookup for classes see RPackageOrganizer>>#systemClassRenamedActionFrom: which does a #packageNamed: class category which fails if the class is not in a toplevel package. Let's say I refactor a class TestFoo in the category 'Tests-Foo-Bar' the message send to #packageNamed: will try to find a package named 'Tests-Foo-Bar' but the actual existing package is only 'Tests' and the rest is the tag part. => you have to find the RPackage with the most common name lookup? 'Tests-Foo-Bar' => fail! lookup? 'Tests-Foo' => fail! lookup? 'Tests' => success! 'Tests' => lookup tag? 'Foo-Bar' => success!
On Sep 11, 2012, at 4:47 PM, Camillo Bruni wrote:
On 2012-09-11, at 16:41, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
camillo
what is "added hierarchical RPackage lookup" ? Why do we need that beast?
Because right now RPackageOrganizer does a wrong lookup for classes see RPackageOrganizer>>#systemClassRenamedActionFrom: which does a #packageNamed: class category which fails if the class is not in a toplevel package.
I see. and probably class category is not mapped to the correct place.
Let's say I refactor a class TestFoo in the category 'Tests-Foo-Bar' the message send to #packageNamed: will try to find a package named 'Tests-Foo-Bar' but the actual existing package is only 'Tests' and the rest is the tag part.
Yes bitten by the pattern shit again.
=> you have to find the RPackage with the most common name lookup? 'Tests-Foo-Bar' => fail! lookup? 'Tests-Foo' => fail! lookup? 'Tests' => success! 'Tests' => lookup tag? 'Foo-Bar' => success!
I hate that! Fucking extra complexity. Tx that you fix it. This is exactly what I want to remove. So in Pharo 3.0 I will kill this lookup. Stef
but that's with the "old new implementation" in the "new new implementation", TestFoo in "Test-Foo-Bar" will produce: lookup? 'Tests-Foo-Bar' => success! lookup? 'Tests-Foo' => fail! lookup? 'Tests' => fail! but... RPackageSet ("Tests" or "Tests-Foo") lookup will succeed. That's why I asked you to wait... all changes you do now could have no sense or change tomorrow :) Esteban On Sep 11, 2012, at 4:47 PM, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2012-09-11, at 16:41, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
camillo
what is "added hierarchical RPackage lookup" ? Why do we need that beast?
Because right now RPackageOrganizer does a wrong lookup for classes see RPackageOrganizer>>#systemClassRenamedActionFrom: which does a #packageNamed: class category which fails if the class is not in a toplevel package.
Let's say I refactor a class TestFoo in the category 'Tests-Foo-Bar' the message send to #packageNamed: will try to find a package named 'Tests-Foo-Bar' but the actual existing package is only 'Tests' and the rest is the tag part.
=> you have to find the RPackage with the most common name lookup? 'Tests-Foo-Bar' => fail! lookup? 'Tests-Foo' => fail! lookup? 'Tests' => success! 'Tests' => lookup tag? 'Foo-Bar' => success!
On 2012-09-11, at 16:54, Esteban Lorenzano <estebanlm@gmail.com> wrote:
but that's with the "old new implementation"
in the "new new implementation", TestFoo in "Test-Foo-Bar" will produce:
lookup? 'Tests-Foo-Bar' => success! lookup? 'Tests-Foo' => fail! lookup? 'Tests' => fail!
but... RPackageSet ("Tests" or "Tests-Foo") lookup will succeed.
That's why I asked you to wait... all changes you do now could have no sense or change tomorrow :)
indeed for that fix I will wait. first I thought it's a local problem of not properly updating tags, but behold! there is more to it ;)
participants (3)
-
Camillo Bruni -
Esteban Lorenzano -
Stéphane Ducasse