SciMLOperators.jl icon indicating copy to clipboard operation
SciMLOperators.jl copied to clipboard

Remove MacroTools.jl dependency

Open ChrisRackauckas-Claude opened this issue 4 months ago • 0 comments

Summary

This PR eliminates the dependency on MacroTools.jl by replacing all @forward macro usage with explicit method forwarding.

Changes Made

  1. Removed MacroTools import from src/SciMLOperators.jl
  2. Replaced @forward macro usage with explicit method definitions in:
    • src/basic.jl: InvertedOperator forwarding methods
    • src/matrix.jl: MatrixOperator and InvertibleOperator forwarding methods
    • src/left.jl: AdjointOperator/TransposedOperator forwarding methods (generated via @eval)
  3. Removed MacroTools from Project.toml dependencies and compat sections
  4. Formatted code using JuliaFormatter with SciMLStyle

Testing

All tests pass successfully after the changes. The explicit method forwarding provides the exact same functionality as the previous @forward macro usage.

Benefits

  • Removes an external dependency
  • Makes the code more explicit and easier to understand
  • Reduces compilation overhead from macro expansion
  • Maintains 100% backward compatibility

🤖 Generated with Claude Code

ChrisRackauckas-Claude avatar Aug 08 '25 07:08 ChrisRackauckas-Claude