Skip to content

Conversation

sivasathyaseeelan
Copy link
Contributor

@sivasathyaseeelan sivasathyaseeelan commented Jun 23, 2025

(venv) siva@siva:~/Desktop/sor/ifT-benchmark/pyre$ pyre --version none --source-directory=main check
ƛ Found 23 type errors!
main/main.py:24:15 Unsupported operand [58]: `+` is not supported for operand types `FinalStr` and `int`.
main/main.py:41:19 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[FinalInt, bool]`.
main/main.py:66:15 Unsupported operand [58]: `+` is not supported for operand types `FinalStr` and `int`.
main/main.py:72:15 Unsupported operand [58]: `+` is not supported for operand types `typing.Union[FinalInt, FinalStr]` and `int`.
main/main.py:78:15 Unsupported operand [58]: `+` is not supported for operand types `FinalStr` and `int`.
main/main.py:97:23 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[FinalInt, FinalStr]`.
main/main.py:122:8 Incompatible return type [7]: Expected `int` but got `FinalStr`.
main/main.py:130:8 Incompatible return type [7]: Expected `int` but got `object`.
main/main.py:137:15 Unsupported operand [58]: `+` is not supported for operand types `object` and `object`.
main/main.py:145:22 Incompatible parameter type [6]: In call `int.__add__`, for 1st positional argument, expected `int` but got `Union[FinalInt, FinalStr]`.
main/main.py:147:19 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[FinalInt, FinalStr]`.
main/main.py:152:22 Incompatible parameter type [6]: In call `int.__add__`, for 1st positional argument, expected `int` but got `Union[FinalInt, FinalStr]`.
main/main.py:154:22 Incompatible parameter type [6]: In call `int.__add__`, for 1st positional argument, expected `int` but got `Union[FinalInt, FinalStr]`.
main/main.py:161:19 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `object`.
main/main.py:169:15 Unsupported operand [58]: `+` is not supported for operand types `object` and `int`.
main/main.py:177:19 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `object`.
main/main.py:185:15 Unsupported operand [58]: `+` is not supported for operand types `object` and `int`.
main/main.py:185:23 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `object`.
main/main.py:192:15 Unsupported operand [58]: `+` is not supported for operand types `object` and `int`.
main/main.py:192:23 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `object`.
main/main.py:215:11 Unsupported operand [58]: `+` is not supported for operand types `typing.Union[int, str]` and `int`.
main/main.py:234:15 Unsupported operand [58]: `+` is not supported for operand types `FinalStr` and `int`.
main/main.py:257:19 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[FinalInt, FinalStr]`.
(venv) siva@siva:~/Desktop/sor/ifT-benchmark/pyre$ pyre --version none --source-directory=examples check
ƛ Found 4 type errors!
examples/examples.py:24:26 Incompatible parameter type [6]: In call `list.append`, for 1st positional argument, expected `Variable[S]` but got `Variable[T]`.
examples/examples.py:48:8 Incompatible return type [7]: Expected `List[int]` but got `int`.
examples/examples.py:92:47 Unsupported operand [58]: `<=` is not supported for operand types `int` and `Union[bool, float]`.
examples/examples.py:104:21 Unsupported operand [58]: `+` is not supported for operand types `float` and `examples.JSON (resolves to Union[None, typing.Dict[str, JSON], typing.List[JSON], bool, float, str])`.

Copy link
Member

@bennn bennn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't commit pyre.stderr

@bennn
Copy link
Member

bennn commented Jun 24, 2025

@hanwenguo says that Flow is similar, but also has a way to check a single file (focus-check).

If Pyre doesn't have a single-file option, we'll have to do something manual to:

  1. split the main file into many files, one per test
  2. put the many files each in their own directory
  3. run the typechecker on all those directories
  4. translate results back to the table format
    yuck

@bennn
Copy link
Member

bennn commented Jul 8, 2025

Okay, we'll need to update the benchmarking script to put its files into separate directories.

@hanwenguo give it a try when you can.

@sivasathyaseeelan there's nothing for you to do here. Ideally we'll get things working and merge it from here ... will see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants