René's URL Explorer Experiment


Title: [WIP] Make incremental not propagate staleness if the public interface of a module is unchanged by Michael0x2a · Pull Request #2002 · python/mypy · GitHub

Open Graph Title: [WIP] Make incremental not propagate staleness if the public interface of a module is unchanged by Michael0x2a · Pull Request #2002 · python/mypy

X Title: [WIP] Make incremental not propagate staleness if the public interface of a module is unchanged by Michael0x2a · Pull Request #2002 · python/mypy

Description: This pull request modifies incremental mode so that if a module is modified in a way such that the types for any of its publicly accessible symbols are unchanged, we recheck the file but don't queue up the importers to be rechecked. For example, if we change the contents of a certain function but not its type signature, we would ideally like to have to re-check only that file and not all the dependees. Or, more precisely, if module A imports module B and module B's public interface is unchanged, then we consider module B to be internally stale but not externally stale and consider module A to still be fresh. It does so by adding a new visitor named InterfaceExtractor within modinterface.py that makes a best-effort attempt at extracting the "public interface" of a module once its been parsed. Since this extraction happens at an early stage in the pipeline (in build.load_graph, which calls parse_file) it's not necessarily always possible to extract the actual types, so the extractor falls back to using a serialized form of the underlying symbol node in those cases. The public interface of a module consists of al imports, all top-level variables/functions/classes, and all methods/class attributes/nested class definitions. This is a work-in-progress. TODO: Figure out why two test cases are failing Add even more test cases Since imports are a part of the public interface, changing the public interface causes incremental to often revert back to its current behavior (propagate "staleness" to all importers). It would be nice to figure out how to also throttle this back.

Open Graph Description: This pull request modifies incremental mode so that if a module is modified in a way such that the types for any of its publicly accessible symbols are unchanged, we recheck the file but don't ...

X Description: This pull request modifies incremental mode so that if a module is modified in a way such that the types for any of its publicly accessible symbols are unchanged, we recheck the file but don&#3...

Opengraph URL: https://github.com/python/mypy/pull/2002

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6579b3ab-7e71-f841-7514-88e45a7abda7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB9B0:2148FB:20E67DE:2CA8AA8:6B001FD1
html-safe-nonce1bf051a612a9d6c2566d7e8adcc3be7df55fa573d3633560d7e23fccad36a937
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUIwOjIxNDhGQjoyMEU2N0RFOjJDQThBQTg6NkIwMDFGRDEiLCJ2aXNpdG9yX2lkIjoiMjM1MjA0NzI4NTYzMTcyMTQyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacabc0dbbb5959c6a6dc8172ddb1ace4eb5f0be37026eb6bc02e02061a63af5245
hovercard-subject-tagpull_request:80659071
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/mypy/pull/2002/files
twitter:imagehttps://avatars.githubusercontent.com/u/1424628?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1424628?s=400&v=4
og:image:altThis pull request modifies incremental mode so that if a module is modified in a way such that the types for any of its publicly accessible symbols are unchanged, we recheck the file but don't ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/2002/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F2002%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F2002%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/pull/2002/files
Reloadhttps://github.com/python/mypy/pull/2002/files
Reloadhttps://github.com/python/mypy/pull/2002/files
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fmypy%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fmypy%2Fissues%2Fnew%2Fchoose
Michael0x2ahttps://github.com/Michael0x2a
python:masterhttps://github.com/python/mypy/tree/master
Michael0x2a:incremental-interfacehttps://github.com/Michael0x2a/mypy/tree/incremental-interface
Conversation 1 https://github.com/python/mypy/pull/2002
Commits 7 https://github.com/python/mypy/pull/2002/commits
Checks 0 https://github.com/python/mypy/pull/2002/checks
Files changed https://github.com/python/mypy/pull/2002/files
Please reload this pagehttps://github.com/python/mypy/pull/2002/files
[WIP] Make incremental not propagate staleness if the public interface of a module is unchanged https://github.com/python/mypy/pull/2002/files#top
Show all changes 7 commits https://github.com/python/mypy/pull/2002/files
0495ced Add tests for interface-based incremental checks MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/0495cedca5680e2f678c396b2c30953bd6f43cec
d0c6fc7 Add a best-effort public interface extractor MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/d0c6fc76963afdc3a06a24653eee2440c050b161
990636b Make cache loader flag if a file is possibly stale MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/990636b5748a13cfe21f970a2a1fe24f3c896432
4af183b Store interface hash in meta files MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/4af183bb2f5b9eb58507f8471fcfdbd3d0f3cfde
4b76823 Modify incremental to check public interface MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/4b768236a154c3306c2dd654dbf7dc45f5a82154
9391470 Fix bug in string output for strings MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/9391470a013b567ef84882d235095f3b6ef9ae4d
71dd658 Disable interface extraction if not in incremental MichaelLeeDBX Aug 9, 2016 https://github.com/python/mypy/pull/2002/commits/71dd658100affba711fa4f30e428e58ceb346d7f
Clear filters https://github.com/python/mypy/pull/2002/files
Please reload this pagehttps://github.com/python/mypy/pull/2002/files
Please reload this pagehttps://github.com/python/mypy/pull/2002/files
build.py https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
modinterface.py https://github.com/python/mypy/pull/2002/files#diff-a201c6498c064c5826667f365320579c99968c4a836c5d2ee45552b37b32c17b
testcheck.py https://github.com/python/mypy/pull/2002/files#diff-a1728e8ba6e78bdc975a04007a7765fc56c65959bef3a8ca87b94fbf85370572
types.py https://github.com/python/mypy/pull/2002/files#diff-265bbd9d8b179bfc6a75071cd473edbad7afbf73f011b830ac42c38438b60664
check-incremental.test https://github.com/python/mypy/pull/2002/files#diff-9d27bf05ef2e69475128ad073eb20b12cd347361fef9982761aa1776ed1964a8
dict.py https://github.com/python/mypy/pull/2002/files#diff-f3387d34f773992a10d032ace69ecfa67a50853b8bc38c561405144b622700ca
mypy/build.pyhttps://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
View file https://github.com/Michael0x2a/mypy/blob/71dd658100affba711fa4f30e428e58ceb346d7f/mypy/build.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/mypy/pull/2002/{{ revealButtonHref }}
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
https://github.com/python/mypy/pull/2002/files#diff-ea1209369af1f6691068ac958d46d42ed5ab3a6d1529f63d891ca9cab58e3998
Please reload this pagehttps://github.com/python/mypy/pull/2002/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.