Re: find used deprecated methods when moving from pharo2 to pharo3

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

Re: find used deprecated methods when moving from pharo2 to pharo3

Sabine Manaa
Hi Ben,

ok, I collect all I find and will report them after finishing.

>>maybe it would be good for the opening screen of the Pharo 3 release to link to a tutorial on how to run those Deprecated-Rules-only on a package.

The description was clear and easy. I am not sure if I understood.
I made a movie with an example, do you think sth like this?

(BTW adding only Pharo3 was not possible - walkback) 

Sabine




On Fri, Jan 17, 2014 at 1:50 PM, btc [via Smalltalk] <[hidden email]> wrote:
Can you report those to be added?

btw, maybe it would be good for the opening screen of the Pharo 3 release to link to a tutorial on how to run those Deprecated-Rules-only on a package.

cheers -ben

Sabine Knöfel wrote:
Hi Andre,

thanks, I used it and it worked fine but as you said - several methods are not covered.

Sabine


On Thu, Jan 16, 2014 at 2:02 PM, Andre Hora [via Smalltalk] <[hidden email]> wrote:
Hello Sabine,

I have a set of smalllint rules I have created by mining code history between Pharo 2.0 and 3.0.
Note however they do not cover all deprecated methods and classes.

If you want to give a try, just load them (using the code below), and run the rules using the Critic Browser to find the violations and the replacement **suggestion**.

Gofer new
   package: 'Rules-Pharo30';
   load.

The is also this report for a fast overview of the changes (note that some may be false positives):

hope that it helps,

-- 
Andre Hora


On Thu, Jan 16, 2014 at 12:21 PM, Sabine Knöfel <[hidden email]> wrote:
Hi,

I am currently moving my application from pharo2 to pharo3.

I am asking myself if there is an easy way to find all deprecated methods I
used in my app.
The only way I see currently is to use the app and testing for walkbacks and
run the test cases.

How did others manage this?

Sabine



--
View this message in context: http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




--
Andre Hora



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737198.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML



View this message in context: Re: find used deprecated methods when moving from pharo2 to pharo3

Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737498.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: find used deprecated methods when moving from pharo2 to pharo3

Stephan Eggermont-3
What you can do is load your code in a Moose image, and tell it to calculate the invocations
In deprecationFinder I used

findDeprecationsFor: aVersion in: aProject
        | mooseModel |
        mooseModel := (MooseMonticelloHTTPImporter new setRepositoryCache: aProject monticelloRepository;
                importFileNamed: (aVersion at: #filename)).
        mooseModel allInvocations do: [ :each|
                aProject addInvocation: each inVersion: aVersion ]

and

addInvocation: aFAMIXInvocation inVersion: aDictionary
        |sigs|
        self signatures add: aFAMIXInvocation signature.
        sigs := aDictionary at: #signatures ifAbsentPut: Set new.
        sigs add: aFAMIXInvocation signature.

monticelloRepository
        ^ MCSmalltalkhubRepository owner: self owner project: self projectName

You can then at least check if methods with the same signature are still in the Pharo3 image

If you use a Pharo2 based Moose to build the list, you’ll be able to resolve more invocations

Stephan