Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request modifies
build.py
to add an extra "version_id" attribute to the cache metadata. If the version id specified inmypy/version.py
differs from the id stored in the cached data, mypy will automatically invalidate that cached data.This pull request will also modify
setup.py
to automatically edit the installedmypy/version.py
file during installation to include the git hash if applicable.If
setup.py
is not being run from a git repo, or if a git executable can't be found in the system, mypy will default to using the original version id.The net effect should be that...
version.py
files edited during installation to include the git commit hash. However, their cache will still be invalidated whenever they update since we manually change the__version__
variable per each release.version.py
files edited during installation to include the git commit hash. That means their cache will be automatically invalidated even if the__version__
variable is the same as before.Fixes #1354.