-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codemod crashes on my code #3759
Comments
I think your problem is simply that I guess we could do better by warning on files which are invalid syntax. It might also be a nice performance upgrade to skip the processing |
Aha, it had not occured to me to check, I assumed that |
Actually no, the
|
Huh. Can you provide an input file which triggers this? It sounds like we have a real bug somewhere! |
Yep you can check out the repo and commit I listed on the original report.
I just ran it on the whole directory but there are only a couple of files
in it.
…On Mon, 2 Oct 2023, 23:15 Zac Hatfield-Dodds, ***@***.***> wrote:
Huh. Can you provide an input file which triggers this? It sounds like we
have a real big somewhere!
—
Reply to this email directly, view it on GitHub
<#3759 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWNWKZ2GLGXFO3UXBVLJZLX5MVHFAVCNFSM6AAAAAA5OREEWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTG43TONJRGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hey Zac did you intend to close the issue? I think that PR was originally marked as fixing it but then IIUC you changed your mind in your previous comment. |
Oops, yeah - the PR turns this crash into a warning so we can process other files, but doesn't fully fix it. |
Unfortunately I still can't reproduce this. I've tried running codemods on the files, on the whole directory, from the Python interface, etc., and it plainly works. Combined with your report that it takes several minutes for this to trigger, I suspect that you have something like a symlink involved, which is causing the codemods to be applied to a much larger set of files than you expected. If we can find a reproducing file which triggers this issue I'll be happy to reopen again, but I think it really is fixed. |
If I checkout
git@github.com:bjackman/git-dissect.git
at commitc5ab19c8097ea22
(if you do this and expose your mind to the code in there, please forgive me)And run
hypothesis codemod .
, my fans spin for a while (not sure how long, maybe a minute or 2?), then I get thisThis is not a problem for me, I was only running that command out of pure curiosity! This is just an FYI, I guess Something Is Wrong.
Here are the relevant versions of stuff (I am using
venv
). I was surprised there is nohypothesis[cli]
in thepip freeze
output. I assume the[cli]
thing is some Pip magic that I am ignorant of.I hope this is useful/interesting!
The text was updated successfully, but these errors were encountered: