Replace MacroTools with ExprTools & Base.remove_lines! #2425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Briefly discussed this on twitter with @ChrisRackauckas
This lets us drop the direct dependency on MacroTools (though we still have like a dozen indirect dependencies on it)
ExprTools is a smaller dependency that is more comprehensively tested than MacroTools, and does actually catch several cases that MacroTools misses.
I will note that
Base.remove_linenum!
is not part of the public API of Base (JuliaLang/julia#52904) however it is already used several times in MacroTools.I am not super fussed, but if this PR is approved I will try and put a PR in each day or so to remove MacroTools from another package in the SciML ecosystem. Its a nice little exercise to wake brain up in the morning.