-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
The mother of all pull requests: add --incremental #1292
Conversation
… every type occurring in mypy.
…ough check on what we wrote.
…ion of OverloadedFuncDef (type was missing).
…ping/abc cluster.
… to use transitive closure.
Awesome! Looks like you caught quite a few things (and found a lot of
prints :-). Hopefully I can add finishing this as one of our OKRs for the
next half-sprint.
|
…for error conditions instead.
Serialize some additional fields, clarify a few places, add some comments, replace a print() with an assert.
Made a few things non-optional, removed some duplicate defs, added a TODO comment.
- Add/update many docstrings and comments. - Remove dead code at end of write_cache(). - Turn cache inconsistency into assert False. - Use keyword args for State() constructor calls.
Hi @JukkaL, I've pushed a new version that incorporates my responses to all your feedback except for the long last one (starting with "Also L1089 in build.py"). I decided not to write individual "done / no, here's why" responses but instead just do everything or explain what's going on in comments. Next I'm going to work on testing. |
…ockers. Also move normalize_error_messages() to helpers, where it belongs. This is in preparation of introducing tests for incremental mode. CompileError is still raised for blockers.
Jukka, I now have a decent start on the unittest infrastructure.
|
So I think I have addressed everything in your review now except
I think I'd like to leave all those unaddressed. |
@@ -630,7 +653,7 @@ def is_generic(self) -> bool: | |||
return self.info.is_generic() | |||
|
|||
def serialize(self) -> JsonDict: | |||
# Not serialized: defs, base_type_exprs | |||
# Not serialized: defs, base_type_exprs,d ecorators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: d ecorators
OK, looks good now! Feel free to merge whenever you like. After merging I suggest filing some new issues (for 0.3.2, I assume):
I'm not sure either sure whether the old code used DFS, but I have a vague feeling that it might. |
tl;dr: Please review in this order: semanal.py+tests; nodes.py+types.py; fixup.py; build.py; main.py.
See this Google Doc for some technical debt (read the paper from the top for a more complete overview).
Despite that technical debt I'd like to merge this into master in the current state, because at this point it works well enough and in particular I've tested it with typeshed's runtests.py script as well as with the selection of files in the internal Dropbox server repo. Some considerations:
-i/--incremental
is usedDon't be fooled by the large number of commits! There are a lot of dead ends and U-turns that you can ignore. Most of the changes are limited to a small number of files:
-i/--incremental
optionSomehow GitHub refuses to show the diffs for build.py. Sorry about this; I guess you have to view them locally. You could also try to view the incremental diffs to this file starting with 0b4ef76. (Also note that the dates GitHub lists for the diffs are bogus -- they represent the most recent rebase. The actual work started over a month ago.)
Some questions about how to merge this monster into master. I've got a feeling that the detailed commits from my branch are not that useful. I propose the following order, as separate commits to master:
This may also represent a reasonable review order.