Avoid changing the sigils of files not bumped#90
Conversation
| + file1.rb | ||
|
|
||
| Run `spoom bump --from false --to true` to bump them | ||
| OUT |
There was a problem hiding this comment.
Is it possible to not even make this suggestion in the first place?
There was a problem hiding this comment.
I honestly don't know how to do so.
One way would be to parse the error message for file2.rbi and see that the first help section points to file1.rb. But the help sections points to a bad method more often than the other way around.
Any idea?
There was a problem hiding this comment.
Isn't it safe to assume if an already true file gave a redefined without matching argument count error it would have to be the file inside help section? We can also make sure that the file inside help section was bumped.
This solution does assume typecheck passes before running spoom.
There was a problem hiding this comment.
As per our conversation on Slack: let's merge as this and improve later 👍
7288a85 to
e438866
Compare
Fixes #85. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
e438866 to
8dc5bd7
Compare
Let's consider this RBI file:
We can create a conflict of signature when turning this file to
true:When this happens an error will be reported for both
file1.rbiandfile2.rbwhich promptedspoom bumpto revert the file totyped: falseeven if it was not bumped in the first place.This PR fixes this behaviour by reverting only the sigil for files that were bumped.
Fixes #85.