resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

Inlining-based refactorings

Open jackfirth opened this issue 1 year ago • 0 comments

When libraries deprecate functions, those functions can often still be trivially expressed in terms of the library's other public APIs. Migrating users away from those functions is a trivial refactoring: just inline the function everywhere. It should be possible for library owners to declare that Resyntax should inline those functions. For instance, say a library has this code:

(provide foo bar)

;; Deprecated, use bar instead
(define/recommend-inlining (foo x mode)
  (bar x #:mode mode))

(define (bar x #:mode mode)
  ...)

Resyntax should be able to migrate all (foo x mode) expressions to (bar x #:mode mode) automatically.

jackfirth avatar Oct 03 '24 21:10 jackfirth