-
Notifications
You must be signed in to change notification settings - Fork 20
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
run_mypyc.sh
does not really use mypyc
?
#78
Labels
python
Python-specific
Comments
shish
added a commit
that referenced
this issue
Dec 5, 2022
This does appear to be correct, and some of the modules are using features that mypyc doesn't support D: |
shish
added a commit
that referenced
this issue
Dec 5, 2022
Looks like with things marked as Final, it is only cpu.py's use of match that isn't supported, but support for match was added very recently, so if we can get the latest build of mypyc hopefully that would work? |
shish
added a commit
that referenced
this issue
Dec 5, 2022
shish
added a commit
that referenced
this issue
Dec 5, 2022
shish
added a commit
that referenced
this issue
Dec 5, 2022
shish
added a commit
that referenced
this issue
Dec 5, 2022
will-ca
added a commit
to will-ca/rosettaboy
that referenced
this issue
Dec 6, 2022
Squashed commit of the following: commit c167245 Author: Shish <shish@shishnet.org> Date: Tue Dec 6 01:45:06 2022 +0000 [utils] python3.11 as default in docker commit d520b55 Author: Shish <shish@shishnet.org> Date: Mon Dec 5 23:54:10 2022 +0000 [all] use /usr/bin/env bash instead of /bin/bash commit 058f687 Author: Intralexical <37680486+will-ca@users.noreply.github.com> Date: Mon Dec 5 23:44:14 2022 +0000 [rs] Add `shell.nix`. commit 6d2550b Author: Intralexical <37680486+will-ca@users.noreply.github.com> Date: Mon Dec 5 23:44:08 2022 +0000 [py] Add `shell.nix`. commit c319ba5 Author: Intralexical <37680486+will-ca@users.noreply.github.com> Date: Mon Dec 5 23:44:02 2022 +0000 [php] Add `shell.nix`. commit b28b42b Author: Intralexical <37680486+will-ca@users.noreply.github.com> Date: Mon Dec 5 23:43:56 2022 +0000 [nim] Add `shell.nix`. commit a96097f Author: Intralexical <37680486+will-ca@users.noreply.github.com> Date: Mon Dec 5 23:43:50 2022 +0000 [go] Add `shell.nix`. commit e6e74d6 Author: Intralexical <37680486+will-ca@users.noreply.github.com> Date: Mon Dec 5 23:43:43 2022 +0000 [cpp] Add `shell.nix`. commit 177f282 Author: Shish <shish@shishnet.org> Date: Mon Dec 5 13:37:59 2022 +0000 [py] pass mypy --strict checks, see shish#78 commit d341b1c Author: Shish <shish@shishnet.org> Date: Mon Dec 5 12:31:48 2022 +0000 [py] mark static enums as Final, see shish#78
Using the latest version of mypy from git, this now works, for an ~8x speedup \o/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since
mypyc
compiles modules, it probably needs to be run on allsrc/*.py
files. Doing onlymypyc main.py
probably only compiles the entrypoint.E.G.:
src/cpu.py
,mypyc
still compiles successfully butModuleNotFoundError
s at run time. This presumably shows it's still trying to import the slow, uncompiledcpu.py
.build/__native.c
to read the generated code. It's not pretty, but it doesn't look like it's doing anything more than importing the uncompiled modules, running them, and exiting.No idea if it will even work if you try to compile everything— E.G. To get it running in Cython, I had to separate all the
exec()
-generated code incpu.py
out into actual code instead (....Which I see has been removed and made obsolete literally the day after I did that.... Gosh dangit!)—If that's needed for MyPy too, I can post that as a starting point.The text was updated successfully, but these errors were encountered: