[SR-14587] refactor-check-compiles
should generate both -dump-text
and dump-rewritten
from a single swift-refactor
invocation
#56939
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
good first issue
Good for newcomers
Additional Detail from JIRA
md5: 458dfb2ad5767bae122573a9d4e0a092
Issue Description:
At the moment
refactor-check-compiles
invokesswift-refactor
twice, once to generate the output for-dump-text
and once to generate the output for-dump-rewritten
. This is duplicated effort. We should instead add an option toswift-refactor
that outputs-dump-text
to stdout and the contents of-dump-rewritten
to a file. That way we could be generating both representations at the same time.If anyone wants to tackle this as a starter bug:
You would need to add a new flag like
-rewritten-output-file
in swift-refactor.cpp that dumps the rewritten text to the specified output file, just like theDumpType::REWRITTEN
case does today hereAfterwards, you’d need to update refactory-check-compiles.py to use that new argument to
swift-refactor
to retrieve the rewritten code together with the invocation that has-dump-rewritten
, getting rid of the path that calls-dump-text
and writes its stdout to the temp file.The text was updated successfully, but these errors were encountered: