Skip to content

Fix interaction between --incremental and --silent-imports. #1383

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

Merged
merged 3 commits into from
Apr 15, 2016
Merged

Conversation

gvanrossum
Copy link
Member

If a dependency appears or disappears we now mark the dependent module as stale.

Tested manually by toggling the presence of a file on the command line in a simple scenario.

If a dependency appears or disappears we now mark the dependent module as stale.
@ddfisher
Copy link
Collaborator

I'm not that familiar with this part of the code, but I wonder if it would be possible (and a bit conceptually cleaner) to stop removing suppressed imports from dependencies and then add a special serialization mode for them. I think that might make it Just Work with the rest of the current logic, which would be pretty nice.

@gvanrossum
Copy link
Member Author

gvanrossum commented Apr 15, 2016 via email

@@ -318,6 +318,7 @@ def default_lib_path(data_dir: str, pyversion: Tuple[int, int],
('dependencies', List[str]),
('data_mtime', float), # mtime of data_json
('data_json', str), # path of <id>.data.json
('suppressed', List[str]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add comment

('data_mtime', float), # mtime of data_json
('data_json', str), # path of <id>.data.json
('suppressed', List[str]),
('suppressed', List[str]), # dependencies that weren't imported
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is still a little ambiguous, as we can skip some modules due to conditional imports as well. I suggest explaining what this is used for and when.

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 15, 2016

Looks reasonable to me, other than the nit about a comment. The logic is pretty delicate so it would be nice to have tests for this -- if you don't want to do this now, please create an issue for it.

('data_mtime', float), # mtime of data_json
('data_json', str), # path of <id>.data.json
('suppressed', List[str]), # dependencies that weren't imported
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is still a little ambiguous, as we can skip some modules due to conditional imports as well. I suggest explaining what this is used for and when. [I think that github incorrectly hid my previous comment.]

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 15, 2016

Have a look at the hidden comment just below the second commit -- github is hiding it for me for some reason.

@gvanrossum
Copy link
Member Author

gvanrossum commented Apr 15, 2016 via email

@gvanrossum gvanrossum merged commit d84bdea into master Apr 15, 2016
@gvanrossum gvanrossum deleted the i-s branch April 18, 2016 01:49
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