Following PR #3374, tlin now successfully identifies deprecated functions, but the -fix flag doesn't actually implement the suggested replacements.
For example:
stefan@DESKTOP-27RFF3F:gno/examples/gno.land/r/gnolend$ tlin -fix ./gnolend.gno
Fixed issues in ./gnolend.gno
stefan@DESKTOP-27RFF3F:gno/examples/gno.land/r/gnolend$ tlin ./
error: deprecated
--> gnolend.gno:95:12
|
95 | caller := std.PrevRealm().Addr()
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= Use of deprecated function. please use Address instead.
suggestion:
|
95 | Address
|
error: deprecated
--> gnolend.gno:95:12
|
95 | caller := std.PrevRealm().Addr()
| ^^^^^^^^^^^^^^^^
|
= Use of deprecated function. please use std.PreviousRealm instead.
suggestion:
|
95 | std.PreviousRealm
|
The -fix flag should automatically implement these suggested replacements to make the migration process smoother. Currently users have to manually replace each deprecated function even after running tlin -fix.
Following PR #3374, tlin now successfully identifies deprecated functions, but the
-fixflag doesn't actually implement the suggested replacements.For example:
The
-fixflag should automatically implement these suggested replacements to make the migration process smoother. Currently users have to manually replace each deprecated function even after runningtlin -fix.