Skip to content
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

Don't rely on reprocessing of targets with errors in fine grained mode #4801

Open
ilevkivskyi opened this issue Mar 27, 2018 · 1 comment
Open

Comments

@ilevkivskyi
Copy link
Member

Consider this test case:

[case testWarnUnusedIgnoresFine]
# flags: --warn-unused-ignores
import a
[file a.py]
import b
b.x  # type: ignore
[file b.py]
# empty
[file b.py.2]
x = 1
[out]
==
a.py:2: note: unused 'type: ignore' comment

Currently it fails, presumably because we don't reprocess a.py. This however points to a larger potential problem, currently we are relying on reprocessing targets with errors. However, a better idea might be to only rely on fine grained dependencies. Of course, we can cache errors and just show them if a target had errors and was not reprocessed.

@msullivan
Copy link
Collaborator

I've been pondering this idea some and think it is a good idea, if we can make it work. I was not able to (in the time I've spent thinking about it) come up with an example that should rely on reprocessing errored targets in any fundamental way, but I might be missing something.

From an engineering perspective, update is currently structured around clearing the errors before looking at each file and then reprocessing errored targets in order to collect all the errors, but I think it shouldn't be too hard to just clear the errors for code we reprocess

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

No branches or pull requests

2 participants