Stephane Ducasse-3 wrote
I wonder if we packaged somewhere the removed deprecated method. We should do that but since we do it manually I guess that this is ad-hoc.
Stef
On Sun, Nov 12, 2017 at 2:45 PM, Alistair Grant <
akgrant0710@
> wrote:
Hi Stef,
On 12 November 2017 at 14:34, Stephane Ducasse <
stepharo.self@
> wrote:
Hi alistair
If you run your program the code will be automatically transformed (I cannot check the deprecation definitino right now)
Else have a look at tests of the ParseTreeRewriter.
Stef
On Sun, Nov 12, 2017 at 2:12 PM, Alistair Grant <
akgrant0710@
> wrote:
Hi Everyone,
I'm loading some code in to Pharo 7 that tries to use #ifNotNilDo:.
There's already a transformation to re-write it to the correct #ifNotNil: - RBRuleIfNotNilDo.
How can I apply the transformation to all existing methods in the image that call #ifNotNilDo:?
Thanks, Alistair
Thanks!
#ifNotNilDo: was deprecated in Pharo 6, and the method was removed completely in Pharo 7.
The easiest thing to do is to port #ifNotNilDo: forward to Pharo 7 so that the methods are automatically re-written.
And then get the offending libraries to be updated. But that's another story.
Thanks again, Alistair
It would also be possible to force the issue, and instead of keeping the definitions in image + rewrite on use, add the rules to a CompilerPlugin, either loaded by default when importing code, or as a "rewrite deprecated sends on import" toggle in the settings somewhere. Cheers, Henry -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html