facebook / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
6.87k stars 437 forks source link

Pyre check failing with internal exception #700

Open ephraimrothschild opened 1 year ago

ephraimrothschild commented 1 year ago

Pyre Bug

Bug description A previously working configuration of pyre has started mysteriously failing with the following error:

ƛ  Pyre encountered an internal exception.
ƛ  Raised at file "src/string.ml", line 96, characters 7-22
ƛ Called from file "src/string.ml", line 610, characters 14-54
ƛ Called from file "src/string.ml", line 628, characters 11-33
ƛ 
ƛ Check command exited with non-zero return code: 1.

Reproduction steps I have no idea if this will produce on other computers or other codebases, but the steps that cause this to reproduce this for me seems like the normal use case and is as follows:

Expected behavior This should typecheck the project as it did previously (as far as I'm aware I haven't done anything to change the pyre configuration or version since it was last working)

Logs pyre_rage.log

Additional context I am running on a 2016 intel macbook pro with MacOS version 12.6.1

ephraimrothschild commented 1 year ago

Update - I seem to have found the issue here, which is that this happens when either:

  1. There is a React app inside the source directory
  2. There are additional (not active) virtual environments inside the source directory

I was able to work around this by adding the following to my .pyre_configuration:

  "exclude": [
    "/Users/ephraim/project/ui/*",
    "/Users/ephraim/adronite/project-venv/*"
  ],

This is still a bug that should probably be fixed though, since there is no reason for pyre to be attempting to check javascript files or anything else that isn't python.